使用AWS apigateway中的update-method更新多个属性

问题描述 投票:0回答:1

我试图用以下命令更新资源内的api方法。

aws apigateway update-method --rest-api-id !apiID! --resource-id !resourceID! --http-method POST --patch-operations op="replace",path="/apiKeyRequired",value="false",path="/authorizationType",value="NONE" --region !api_region!  

但是在执行上述命令时,只修改了authorizationType,使apiKeyRequired与之前相同。 有没有办法使用单个CLI命令更新多个属性?

windows amazon-web-services cmd aws-api-gateway
1个回答
1
投票

试试这个:

aws apigateway update-method --rest-api-id !apiID!  \
--resource-id !resourceID! --http-method POST \
--patch-operations  \   
    "op=replace,path=/apiKeyRequire,value=false" \
    "op=replace,path=/authorizationType,value=NONE" \
--region !api_region!
© www.soinside.com 2019 - 2024. All rights reserved.