x-amazon-apigateway-integration.responses 객체
메서드의 응답을 정의하고 통합 응답에서 메서드 응답으로 파라미터 매핑 또는 페이로드 매핑을 지정합니다.
속성 이름 | 유형 | 설명 |
---|---|---|
응답 상태 패턴 |
x-amazon-apigateway-integration.response 객체 |
메서드 응답에 대한 통합 응답을 일치시키는 데 사용되는 정규식이거나 구성하지 않은 응답을 포착하는 참고
|
x-amazon-apigateway-integration.responses
예제
다음 예에서는 2xx
및 302
응답의 응답 목록을 표시합니다. 2xx
응답의 경우 메서드 응답이 application/json
또는 application/xml
MIME 유형의 통합 응답의 페이로드에서 매핑됩니다. 이 응답에서는 제공된 매핑 템플릿을 사용합니다. 302
응답의 경우 메서드 응답은 통합 응답의 페이로드에 있는 Location
속성에서 값이 파생되는 redirect.url
헤더를 반환합니다.
"responses" : { "2\\d{2}" : { "statusCode" : "200", "responseTemplates" : { "application/json" : "#set ($root=$input.path('$')) { \"stage\": \"$root.name\", \"user-id\": \"$root.key\" }", "application/xml" : "#set ($root=$input.path('$')) <stage>$root.name</stage> " } }, "302" : { "statusCode" : "302", "responseParameters" : { "method.response.header.Location": "integration.response.body.redirect.url" } } }