The integration for an API route.
import { WebSocketIntegration } from 'aws-cdk-lib/aws-apigatewayv2';Or use the module namespace:
import * as apigatewayv2 from 'aws-cdk-lib/aws-apigatewayv2';
// apigatewayv2.WebSocketIntegrationConfiguration passed to the constructor as WebSocketIntegrationProps.
integrationTypeRequiredWebSocketIntegrationTypeIntegration type.
integrationUriRequiredstringIntegration URI.
webSocketApiRequiredIWebSocketApiRefThe WebSocket API to which this integration should be bound.
contentHandlingOptionalContentHandlingSpecifies 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.
credentialsRoleOptionalIRoleSpecifies the IAM role required for the integration.
Default: - No IAM role required.
integrationMethodOptionalstringSpecifies the integration's HTTP method type.
Default: - No HTTP method required.
passthroughBehaviorOptionalPassthroughBehaviorSpecifies 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.
requestParametersOptional{ [key: string]: string }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 parameters required.
requestTemplatesOptional{ [key: string]: string }A map of Apache Velocity templates that are applied on the request payload. ``` { "application/json": "{ \"statusCode\": 200 }" } ```
Default: - No request templates required.
templateSelectionExpressionOptionalstringThe template selection expression for the integration.
Default: - No template selection expression required.
timeoutOptionalDurationThe 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)
Our bi-weekly newsletter teaches hands-on AWS fundamentals. No certification fluff - just practical knowledge.
Subscribe to Newsletteraws-apigatewayv2