# WebSocketRouteIntegrationConfig

Config returned back as a result of the bind.

- Source: [`aws-apigatewayv2/lib/websocket/integration.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-apigatewayv2/lib/websocket/integration.ts#L296)
- Type last changed: v2.134.0 · 26 Mar 2024

## 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

- `contentHandling`: [ContentHandling](/cdk/api/v2/docs/aws-cdk-lib.aws_apigatewayv2.ContentHandling.html) — 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.

- `credentialsRole`: [IRole](/cdk/api/v2/docs/aws-cdk-lib.aws_iam.IRole.html) — Credentials role.

  **Default:** No role provided.

- `method`: string — Integration method.

  **Default:** No integration method.

- `passthroughBehavior`: [PassthroughBehavior](/cdk/api/v2/docs/aws-cdk-lib.aws_apigatewayv2.PassthroughBehavior.html) — Integration passthrough behaviors.

  **Default:** No pass through bahavior.

- `requestParameters`: { [key: string]: string } — Request parameters.

  **Default:** No request parameters provided.

- `requestTemplates`: { [key: string]: string } — Request template.

  **Default:** No request template provided.

- `templateSelectionExpression`: string — Template selection expression.

  **Default:** No template selection expression.

- `timeout`: [Duration](/cdk/api/v2/docs/aws-cdk-lib.Duration.html) = 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.

- `type`: [WebSocketIntegrationType](/cdk/api/v2/docs/aws-cdk-lib.aws_apigatewayv2.WebSocketIntegrationType.html) (required) — Integration type.

- `uri`: string (required) — Integration URI.
