@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:36.173Z") @Stability(value=Stable) public interface IntegrationResponse extends software.amazon.jsii.JsiiSerializable
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.apigateway.*;
IntegrationResponse integrationResponse = IntegrationResponse.builder()
.statusCode("statusCode")
// the properties below are optional
.contentHandling(ContentHandling.CONVERT_TO_BINARY)
.responseParameters(Map.of(
"responseParametersKey", "responseParameters"))
.responseTemplates(Map.of(
"responseTemplatesKey", "responseTemplates"))
.selectionPattern("selectionPattern")
.build();
| Modifier and Type | Interface and Description |
|---|---|
static class |
IntegrationResponse.Builder
A builder for
IntegrationResponse |
static class |
IntegrationResponse.Jsii$Proxy
An implementation for
IntegrationResponse |
| Modifier and Type | Method and Description |
|---|---|
static IntegrationResponse.Builder |
builder() |
default ContentHandling |
getContentHandling()
Specifies how to handle request payload content type conversions.
|
default Map<String,String> |
getResponseParameters()
The response parameters from the backend response that API Gateway sends to the method response.
|
default Map<String,String> |
getResponseTemplates()
The templates that are used to transform the integration response body.
|
default String |
getSelectionPattern()
Specifies the regular expression (regex) pattern used to choose an integration response based on the response from the back end.
|
String |
getStatusCode()
The status code that API Gateway uses to map the integration response to a MethodResponse status code.
|
@Stability(value=Stable) @NotNull String getStatusCode()
@Stability(value=Stable) @Nullable default ContentHandling getContentHandling()
Default: none the request payload is passed through from the method request to the integration request without modification.
@Stability(value=Stable) @Nullable default Map<String,String> getResponseParameters()
Use the destination as the key and the source as the value:
@Stability(value=Stable) @Nullable default Map<String,String> getResponseTemplates()
Specify templates as key-value pairs, with a content type as the key and a template as the value.
@Stability(value=Stable) @Nullable default String getSelectionPattern()
For example, if the success response returns nothing and the error response returns some string, you
could use the .+ regex to match error response. However, make sure that the error response does not contain any
newline (\n) character in such cases. If the back end is an AWS Lambda function, the AWS Lambda function error
header is matched. For all other HTTP and AWS back ends, the HTTP status code is matched.
@Stability(value=Stable) static IntegrationResponse.Builder builder()
IntegrationResponse.Builder of IntegrationResponseCopyright © 2022. All rights reserved.