Class WebSocketAwsIntegration.Builder
java.lang.Object
software.amazon.awscdk.aws_apigatewayv2_integrations.WebSocketAwsIntegration.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<WebSocketAwsIntegration>
- Enclosing class:
WebSocketAwsIntegration
@Stability(Stable)
public static final class WebSocketAwsIntegration.Builder
extends Object
implements software.amazon.jsii.Builder<WebSocketAwsIntegration>
A fluent builder for
WebSocketAwsIntegration
.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
contentHandling
(ContentHandling contentHandling) Specifies how to handle response payload content type conversions.credentialsRole
(IRole credentialsRole) Specifies the credentials role required for the integration.integrationMethod
(String integrationMethod) Specifies the integration's HTTP method type.integrationUri
(String integrationUri) Integration URI.passthroughBehavior
(PassthroughBehavior passthroughBehavior) Specifies the pass-through behavior for incoming requests based on the Content-Type header in the request, and the available mapping templates specified as the requestTemplates property on the Integration resource.requestParameters
(Map<String, String> requestParameters) The request parameters that API Gateway sends with the backend request.requestTemplates
(Map<String, String> requestTemplates) A map of Apache Velocity templates that are applied on the request payload.templateSelectionExpression
(String templateSelectionExpression) The template selection expression for the integration.The maximum amount of time an integration will run before it returns without a response.
-
Method Details
-
create
- Parameters:
id
- id of the underlying integration construct. This parameter is required.- Returns:
- a new instance of
WebSocketAwsIntegration.Builder
.
-
integrationMethod
@Stability(Stable) public WebSocketAwsIntegration.Builder integrationMethod(String integrationMethod) Specifies the integration's HTTP method type.- Parameters:
integrationMethod
- Specifies the integration's HTTP method type. This parameter is required.- Returns:
this
-
integrationUri
Integration URI.- Parameters:
integrationUri
- Integration URI. This parameter is required.- Returns:
this
-
contentHandling
@Stability(Stable) public WebSocketAwsIntegration.Builder contentHandling(ContentHandling contentHandling) Specifies how to handle response payload content type conversions.Default: - The response payload will be passed through from the integration response to the route response or method response without modification.
- Parameters:
contentHandling
- Specifies how to handle response payload content type conversions. This parameter is required.- Returns:
this
-
credentialsRole
Specifies the credentials role required for the integration.Default: - No credential role provided.
- Parameters:
credentialsRole
- Specifies the credentials role required for the integration. This parameter is required.- Returns:
this
-
passthroughBehavior
@Stability(Stable) public WebSocketAwsIntegration.Builder passthroughBehavior(PassthroughBehavior passthroughBehavior) Specifies the pass-through behavior for incoming requests based on the Content-Type header in the request, and the available mapping templates specified as the requestTemplates property on the Integration resource.There are three valid values: WHEN_NO_MATCH, WHEN_NO_TEMPLATES, and NEVER.
Default: - No passthrough behavior required.
- Parameters:
passthroughBehavior
- Specifies the pass-through behavior for incoming requests based on the Content-Type header in the request, and the available mapping templates specified as the requestTemplates property on the Integration resource. This parameter is required.- Returns:
this
-
requestParameters
@Stability(Stable) public WebSocketAwsIntegration.Builder requestParameters(Map<String, String> requestParameters) The request parameters that API Gateway sends with the backend request.Specify request parameters as key-value pairs (string-to-string mappings), with a destination as the key and a source as the value.
Default: - No request parameter provided to the integration.
- Parameters:
requestParameters
- The request parameters that API Gateway sends with the backend request. This parameter is required.- Returns:
this
-
requestTemplates
@Stability(Stable) public WebSocketAwsIntegration.Builder requestTemplates(Map<String, String> requestTemplates) A map of Apache Velocity templates that are applied on the request payload.{ "application/json": "{ \"statusCode\": 200 }" }
Default: - No request template provided to the integration.
- Parameters:
requestTemplates
- A map of Apache Velocity templates that are applied on the request payload. This parameter is required.- Returns:
this
-
templateSelectionExpression
@Stability(Stable) public WebSocketAwsIntegration.Builder templateSelectionExpression(String templateSelectionExpression) The template selection expression for the integration.Default: - No template selection expression provided.
- Parameters:
templateSelectionExpression
- The template selection expression for the integration. This parameter is required.- Returns:
this
-
timeout
The maximum amount of time an integration will run before it returns without a response.Must be between 50 milliseconds and 29 seconds.
Default: Duration.seconds(29)
- Parameters:
timeout
- The maximum amount of time an integration will run before it returns without a response. This parameter is required.- Returns:
this
-
build
- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<WebSocketAwsIntegration>
- Returns:
- a newly built instance of
WebSocketAwsIntegration
.
-