# WebSocketLambdaIntegrationProps

Props for Lambda type integration for a WebSocket Api.

Used as props by: [WebSocketLambdaIntegration](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_apigatewayv2_integrations.WebSocketLambdaIntegration.html)

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

## Example

TypeScript:

```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_apigatewayv2_integrations as apigatewayv2_integrations } from 'aws-cdk-lib';
const webSocketLambdaIntegrationProps: apigatewayv2_integrations.WebSocketLambdaIntegrationProps = {
  contentHandling: apigatewayv2.ContentHandling.CONVERT_TO_BINARY,
  timeout: cdk.Duration.minutes(30),
};
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk as cdk
from aws_cdk import aws_apigatewayv2 as apigatewayv2
from aws_cdk import aws_apigatewayv2_integrations as apigatewayv2_integrations

web_socket_lambda_integration_props = apigatewayv2_integrations.WebSocketLambdaIntegrationProps(
    content_handling=apigatewayv2.ContentHandling.CONVERT_TO_BINARY,
    timeout=cdk.Duration.minutes(30)
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.*;
import software.amazon.awscdk.services.apigatewayv2.*;
import software.amazon.awscdk.aws_apigatewayv2_integrations.*;

WebSocketLambdaIntegrationProps webSocketLambdaIntegrationProps = WebSocketLambdaIntegrationProps.builder()
        .contentHandling(ContentHandling.CONVERT_TO_BINARY)
        .timeout(Duration.minutes(30))
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK;
using Amazon.CDK.AWS.Apigatewayv2;
using Amazon.CDK.AwsApigatewayv2Integrations;

var webSocketLambdaIntegrationProps = new WebSocketLambdaIntegrationProps {
    ContentHandling = ContentHandling.CONVERT_TO_BINARY,
    Timeout = Duration.Minutes(30)
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import cdk "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"

webSocketLambdaIntegrationProps := &WebSocketLambdaIntegrationProps{
	ContentHandling: awscdk.Aws_apigatewayv2.ContentHandling_CONVERT_TO_BINARY,
	Timeout: cdk.Duration_Minutes(jsii.Number(30)),
}
```

## Properties

- `contentHandling`: [ContentHandling](https://docs.aws.amazon.com/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.

- `timeout`: [Duration](https://docs.aws.amazon.com/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.
