WebSocketLambdaIntegrationProps Struct
Props for Lambda type integration for a WebSocket Api.
| Source | aws-apigatewayv2-integrations/lib/websocket/lambda.ts |
|---|---|
| Type last changed |
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_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
# 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
// 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();
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)
};
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
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.