【发布时间】:2018-10-29 05:41:39
【问题描述】:
我正在尝试运行以下命令以从 cli 创建自定义集成请求正文映射模板,但正如 JSON 输出所示,它正在删除前面带有 $ 的值。我该如何解决这个问题?
命令:
aws apigateway update-integration --rest-api-id aoi84daah3 --resource-id jh5tps --http-method POST --patch-operations "op='add',path='/requestTemplates/application~1json',value='{"api_name" : "$context.resourcePath","http-method" :"$context.httpMethod"}'"
输出:
"requestTemplates": {
"application/json": "{api_name : .resourcePath,http-method :.httpMethod}"
【问题讨论】:
标签: linux bash amazon-web-services aws-api-gateway aws-cli