WebSocketRouteIntegrationConfig Struct
Config returned back as a result of the bind.
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as cdk from 'aws-cdk-lib';
import { aws_apigatewayv2 as apigatewayv2 } from 'aws-cdk-lib';
import { aws_iam as iam } from 'aws-cdk-lib';
declare const role: iam.Role;
const webSocketRouteIntegrationConfig: apigatewayv2.WebSocketRouteIntegrationConfig = {
type: apigatewayv2.WebSocketIntegrationType.AWS_PROXY,
uri: 'uri',
// the properties below are optional
contentHandling: apigatewayv2.ContentHandling.CONVERT_TO_BINARY,
credentialsRole: role,
method: 'method',
passthroughBehavior: apigatewayv2.PassthroughBehavior.WHEN_NO_MATCH,
requestParameters: {
requestParametersKey: 'requestParameters',
},
requestTemplates: {
requestTemplatesKey: 'requestTemplates',
},
templateSelectionExpression: 'templateSelectionExpression',
timeout: cdk.Duration.minutes(30),
};
Properties
contentHandlingoptionalContentHandlingcontent_handlingoptionalContentHandlingcontentHandlingoptionalContentHandlingContentHandlingoptionalContentHandlingContentHandlingoptionalContentHandling#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.
credentialsRoleoptionalIRolecredentials_roleoptionalIRolecredentialsRoleoptionalIRoleCredentialsRoleoptionalIRoleCredentialsRoleoptionalIRole#Credentials role.
Default: No role provided.
Integration method.
Default: No integration method.
passthroughBehavioroptionalPassthroughBehaviorpassthrough_behavioroptionalPassthroughBehaviorpassthroughBehavioroptionalPassthroughBehaviorPassthroughBehavioroptionalPassthroughBehaviorPassthroughBehavioroptionalPassthroughBehavior#Integration passthrough behaviors.
Default: No pass through bahavior.
requestParametersoptional{ [key: string]: string }request_parametersoptionaltyping.Mapping[str, str]requestParametersoptionalMap<String, String>RequestParametersoptionalIDictionary<string, string>RequestParametersoptional*map[string]*string#Request parameters.
Default: No request parameters provided.
requestTemplatesoptional{ [key: string]: string }request_templatesoptionaltyping.Mapping[str, str]requestTemplatesoptionalMap<String, String>RequestTemplatesoptionalIDictionary<string, string>RequestTemplatesoptional*map[string]*string#Request template.
Default: No request template provided.
templateSelectionExpressionoptionalstringtemplate_selection_expressionoptionalstrtemplateSelectionExpressionoptionalStringTemplateSelectionExpressionoptionalstringTemplateSelectionExpressionoptional*string#Template selection expression.
Default: No template selection expression.
timeoutoptionalDurationtimeoutoptionalDurationtimeoutoptionalDurationTimeoutoptionalDurationTimeoutoptionalDuration= Duration.seconds(29)#The maximum amount of time an integration will run before it returns without a response.
Must be between 50 milliseconds and 29 seconds.
typeWebSocketIntegrationTypetypeWebSocketIntegrationTypetypeWebSocketIntegrationTypeTypeWebSocketIntegrationTypeTypeWebSocketIntegrationTyperequired#Integration type.
Integration URI.