回答

1

你应该能够用patch requestupdate-stage operation

这里来更新你的舞台在CloudWatch的设置是一个示例代码段(我没有实际测试过这一点;但基本原则应该工作):

AmazonApiGateway apiGateway = ...; 
UpdateStageRequest req = new UpdateStageRequest().withRestApiId(<api-id>). 
      withStageName(<stage-name>). 
      withPatchOperations(
       new PatchOperation().withPath("*/*/metrics/enabled") 
            .withOp("replace") 
            .withValue("true")); 

apiGateway.upate(req); 
+0

谢谢,它的工作原理,但为什么aws更喜欢使用补丁操作,而不是其他更明显的api – Jie

相关问题