为 requestParameter 键映射多个值

0

【以下的问题经过翻译处理】 您是否可以将多个值传递给集成请求中的单个请求参数键?类似JSON或编码字符串?

典型的用例可能是将SNS消息负载中的作者化器的子属性与其他参数一起传递。

到目前为止,我尝试过这个:

integration.request.querystring.Message.foo: method.request.path.foo

integration.request.querystring.Message.bar: method.request.path.bar

integration.request.querystring.Message.userId: context.authorizer.claims.sub

但是,当我通过Postman发出请求时,出现了以下错误:

 "Error": {

        "Code": "MalformedInput",

        "Message": "Start of list found where not expected",

        "Type": "Sender"

    },

这是否可能?文档中没有提到这一点。

profile picture
专家
已提问 5 个月前2 查看次数
1 回答
0

【以下的回答经过翻译处理】 通过参数映射是不可能的,但可以通过请求覆盖功能在请求正文映射模板中实现。

https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-override-request-response-parameters.html

请注意,请求/响应覆盖仅在 REST API 中可用。

profile picture
专家
已回答 5 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则