使用 cli 更新 apigateway 部署

Update apigateway deployment with cli

如何使用 cli 更新 apigateway 部署?我可以找到 update-deployment 命令,但我不知道在这个框架中需要输入什么值(取自 documentation):

{
  "op": "add"|"remove"|"replace"|"move"|"copy"|"test",
  "path": "string",
  "value": "string",
  "from": "string"
}

update-deployment 用于更新现有部署的元数据。例如,要更新部署的描述:

aws apigateway update-deployment \
               --rest-api-id <value> \
               --deployment-id <value> \ 
               --patch-operations 'op=replace,path=/description,value=<value>'

如果您想重新部署一个 API(这是当您在网络控制台中单击 "Deploy API" 时发生的情况),您将使用 create-deployment 命令:

aws apigateway create-deployment \
               --rest-api-id <value> \
               --stage-name <value>