如何使用cli更新apigateway部署?我可以找到update-deployment
命令,但我不知道在这个骨架中需要输入的值(取自documentation):
{
"op": "add"|"remove"|"replace"|"move"|"copy"|"test",
"path": "string",
"value": "string",
"from": "string"
}
答案 0 :(得分:7)
update-deployment
用于更新现有部署的元数据。例如,要更新部署的描述:
aws apigateway update-deployment \
--rest-api-id <value> \
--deployment-id <value> \
--patch-operations 'op=replace,path=/description,value=<value>'
如果您想重新部署API(这是您在Web控制台中单击“部署API”时发生的情况),您将使用create-deployment
命令:
aws apigateway create-deployment \
--rest-api-id <value> \
--stage-name <value>