Interface IntegrationResponse
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
IntegrationResponse.Jsii$Proxy
@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)",
date="2023-06-19T16:30:44.983Z")
@Stability(Stable)
public interface IntegrationResponse
extends software.amazon.jsii.JsiiSerializable
Example:
// 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();
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic final class
A builder forIntegrationResponse
static final class
An implementation forIntegrationResponse
-
Method Summary
Modifier and TypeMethodDescriptionstatic IntegrationResponse.Builder
builder()
default ContentHandling
Specifies how to handle request payload content type conversions.The response parameters from the backend response that API Gateway sends to the method response.The templates that are used to transform the integration response body.default String
Specifies the regular expression (regex) pattern used to choose an integration response based on the response from the back end.The status code that API Gateway uses to map the integration response to a MethodResponse status code.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getStatusCode
The status code that API Gateway uses to map the integration response to a MethodResponse status code. -
getContentHandling
Specifies how to handle request payload content type conversions.Default: none the request payload is passed through from the method request to the integration request without modification.
-
getResponseParameters
The response parameters from the backend response that API Gateway sends to the method response.Use the destination as the key and the source as the value:
- The destination must be an existing response parameter in the MethodResponse property.
- The source must be an existing method request parameter or a static value. You must enclose static values in single quotation marks and pre-encode these values based on the destination specified in the request.
- See Also:
-
getResponseTemplates
The templates that are used to transform the integration response body.Specify templates as key-value pairs, with a content type as the key and a template as the value.
- See Also:
-
getSelectionPattern
Specifies the regular expression (regex) pattern used to choose an integration response based on the response from the back end.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.- See Also:
-
builder
- Returns:
- a
IntegrationResponse.Builder
ofIntegrationResponse
-