AWS API网关覆盖此方法

时间:2017-11-20 13:37:33

标签: amazon-web-services aws-api-gateway

将API部署到AWS API Gateway中的阶段时,它会为每种方法显示以下两个选项: - 1.继承舞台 2.覆盖此方法

这些设置很容易从AWS控制台更改。

如何使用aws cli或使用boto3 SDK以编程方式完成?

1 个答案:

答案 0 :(得分:0)

这两个选项由资源路径和方法中的通配符区分:

aws apigateway update-stage --rest-api-id 1234123412 --stage-name 'dev' --patch-operations op=replace,path=/*/*/logging/dataTrace,value=true

aws apigateway update-stage --rest-api-id 1234123412 --stage-name 'dev' --patch-operations op=replace,path=/~1resource~1path/GET/logging/dataTrace,value=false

http://docs.aws.amazon.com/cli/latest/reference/apigateway/update-stage.html