Amazon web services 使用AWS cli将自定义域迁移到其他API终结点时出现问题

Amazon web services 使用AWS cli将自定义域迁移到其他API终结点时出现问题,amazon-web-services,aws-api-gateway,aws-cli,Amazon Web Services,Aws Api Gateway,Aws Cli,我按照AWS说明将边缘自定义域迁移到区域域: 但我收到了以下错误: Error parsing parameter '--patch-operations': Invalid JSON: [ 我会感谢你的帮助。基于评论,谢谢 通过使用更新域名解决了该问题: aws apigateway update-domain-name \ --domain-name 'api.example.com' \ --patch-operations op='add',path='/endpoin

我按照AWS说明将边缘自定义域迁移到区域域:

但我收到了以下错误:

Error parsing parameter '--patch-operations': Invalid JSON:
[
我会感谢你的帮助。基于评论,谢谢

通过使用更新域名解决了该问题:

aws apigateway update-domain-name \
    --domain-name 'api.example.com' \
    --patch-operations op='add',path='/endpointConfiguration/types',value='REGIONAL' op='add',path='/regionalCertificateArn',value='arn:aws:acm:us-west-2:123456789012:certificate/cd833b28-58d2-407e-83e9-dce3fd852149'

非常奇怪的语法。你能试一下常规的方法吗:
——补丁操作op='add',path='/endpointConfiguration/types',value='REGIONAL'op='add',path='/regionalCertificateArn',value='arn:aws:acm:us-west-2:123456789012:certificate/cd833b28-58d2-407e-83e9-dce3fd852149'
?@Marcin谢谢!这似乎奏效了。现在我要处理下一个问题,那就是删除边缘自定义域。路径与另一个不同(它没有/),没有值。您是否介意看一看,请
aws apigateway更新域名\--域名api.example.com \--补丁操作[\{op:'remove',path:'/endpointConfiguration/types',value:'EDGE'},\{op:'remove',path:'certificateName'},\{op:'remove',path:'CertificateLearn'}]
很高兴它成功了。如果你不介意的话,我将为第一个问题提供答案。对于第二个问题,你也在使用这种“奇怪”的语法。你试过转换成标准版吗?你可以针对这个新问题提出新问题。仅凭评论很难推断出会发生什么。
aws apigateway update-domain-name \
    --domain-name 'api.example.com' \
    --patch-operations op='add',path='/endpointConfiguration/types',value='REGIONAL' op='add',path='/regionalCertificateArn',value='arn:aws:acm:us-west-2:123456789012:certificate/cd833b28-58d2-407e-83e9-dce3fd852149'