@Stability(value=Stable)
public static interface CfnMethod.IntegrationProperty
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.*;
IntegrationProperty integrationProperty = IntegrationProperty.builder()
.cacheKeyParameters(List.of("cacheKeyParameters"))
.cacheNamespace("cacheNamespace")
.connectionId("connectionId")
.connectionType("connectionType")
.contentHandling("contentHandling")
.credentials("credentials")
.integrationHttpMethod("integrationHttpMethod")
.integrationResponses(List.of(IntegrationResponseProperty.builder()
.statusCode("statusCode")
// the properties below are optional
.contentHandling("contentHandling")
.responseParameters(Map.of(
"responseParametersKey", "responseParameters"))
.responseTemplates(Map.of(
"responseTemplatesKey", "responseTemplates"))
.selectionPattern("selectionPattern")
.build()))
.passthroughBehavior("passthroughBehavior")
.requestParameters(Map.of(
"requestParametersKey", "requestParameters"))
.requestTemplates(Map.of(
"requestTemplatesKey", "requestTemplates"))
.timeoutInMillis(123)
.type("type")
.uri("uri")
.build();
| Modifier and Type | Interface and Description |
|---|---|
static class |
CfnMethod.IntegrationProperty.Builder
A builder for
CfnMethod.IntegrationProperty |
static class |
CfnMethod.IntegrationProperty.Jsii$Proxy
An implementation for
CfnMethod.IntegrationProperty |
| Modifier and Type | Method and Description |
|---|---|
static CfnMethod.IntegrationProperty.Builder |
builder() |
default List<String> |
getCacheKeyParameters()
A list of request parameters whose values API Gateway caches.
|
default String |
getCacheNamespace()
An API-specific tag group of related cached parameters.
|
default String |
getConnectionId()
The ID of the `VpcLink` used for the integration when `connectionType=VPC_LINK` , otherwise undefined.
|
default String |
getConnectionType()
The type of the network connection to the integration endpoint.
|
default String |
getContentHandling()
Specifies how to handle request payload content type conversions.
|
default String |
getCredentials()
The credentials that are required for the integration.
|
default String |
getIntegrationHttpMethod()
The integration's HTTP method type.
|
default Object |
getIntegrationResponses()
The response that API Gateway provides after a method's backend completes processing a request.
|
default String |
getPassthroughBehavior()
Indicates when API Gateway passes requests to the targeted backend.
|
default Object |
getRequestParameters()
The request parameters that API Gateway sends with the backend request.
|
default Object |
getRequestTemplates()
A map of Apache Velocity templates that are applied on the request payload.
|
default Number |
getTimeoutInMillis()
Custom timeout between 50 and 29,000 milliseconds.
|
default String |
getType()
The type of backend that your method is running, such as `HTTP` or `MOCK` .
|
default String |
getUri()
The Uniform Resource Identifier (URI) for the integration.
|
@Stability(value=Stable) @Nullable default List<String> getCacheKeyParameters()
For cases where the integration type allows for RequestParameters to be set, these parameters must also be specified in RequestParameters to be supported in CacheKeyParameters .
@Stability(value=Stable) @Nullable default String getCacheNamespace()
@Stability(value=Stable) @Nullable default String getConnectionId()
@Stability(value=Stable) @Nullable default String getConnectionType()
The valid value is INTERNET for connections through the public routable internet or VPC_LINK for private connections between API Gateway and a network load balancer in a VPC. The default value is INTERNET .
@Stability(value=Stable) @Nullable default String getContentHandling()
CONVERT_TO_BINARY : Converts a request payload from a base64-encoded string to a binary blob.CONVERT_TO_TEXT : Converts a request payload from a binary blob to a base64-encoded string.
If this property isn't defined, the request payload is passed through from the method request to the integration request without modification, provided that the PassthroughBehaviors property is configured to support payload pass-through.
@Stability(value=Stable) @Nullable default String getCredentials()
To specify an AWS Identity and Access Management (IAM) role that API Gateway assumes, specify the role's Amazon Resource Name (ARN). To require that the caller's identity be passed through from the request, specify arn:aws:iam:::user/.
To use resource-based permissions on the AWS Lambda (Lambda) function, don't specify this property. Use the AWS::Lambda::Permission resource to permit API Gateway to call the function. For more information, see Allow Amazon API Gateway to Invoke a Lambda Function in the AWS Lambda Developer Guide .
@Stability(value=Stable) @Nullable default String getIntegrationHttpMethod()
For the Type property, if you specify MOCK , this property is optional. For all other types, you must specify this property.
@Stability(value=Stable) @Nullable default Object getIntegrationResponses()
API Gateway intercepts the response from the backend so that you can control how API Gateway surfaces backend responses. For example, you can map the backend status codes to codes that you define.
@Stability(value=Stable) @Nullable default String getPassthroughBehavior()
This behavior depends on the request's Content-Type header and whether you defined a mapping template for it.
For more information and valid values, see the passthroughBehavior field in the API Gateway API Reference .
@Stability(value=Stable) @Nullable default Object getRequestParameters()
Specify request parameters as key-value pairs (string-to-string mappings), with a destination as the key and a source as the value.
Specify the destination by using the following pattern integration.request. *location* . *name* , where location is query string, path, or header, and name is a valid, unique parameter name.
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 their destination in the request.
@Stability(value=Stable) @Nullable default Object getRequestTemplates()
The template that API Gateway uses is based on the value of the Content-Type header that's sent by the client. The content type value is the key, and the template is the value (specified as a string), such as the following snippet:
"application/json": "{\n \"statusCode\": 200\n}"
For more information about templates, see API Gateway Mapping Template and Access Logging Variable Reference in the API Gateway Developer Guide .
@Stability(value=Stable) @Nullable default Number getTimeoutInMillis()
The default value is 29,000 milliseconds or 29 seconds.
@Stability(value=Stable) @Nullable default String getType()
For all of the valid values, see the type property for the Integration resource in the Amazon API Gateway REST API Reference .
@Stability(value=Stable) @Nullable default String getUri()
If you specify HTTP for the Type property, specify the API endpoint URL.
If you specify MOCK for the Type property, don't specify this property.
If you specify AWS for the Type property, specify an AWS service that follows this form: arn:aws:apigateway: region : subdomain . service|service : path|action / service_api . For example, a Lambda function URI follows this form: arn:aws:apigateway: region :lambda:path/ path . The path is usually in the form /2015-03-31/functions/ LambdaFunctionARN /invocations. For more information, see the uri property of the Integration resource in the Amazon API Gateway REST API Reference.
If you specified HTTP or AWS for the Type property, you must specify this property.
@Stability(value=Stable) static CfnMethod.IntegrationProperty.Builder builder()
Copyright © 2022. All rights reserved.