Class WebSocketAwsIntegration
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.apigatewayv2.WebSocketRouteIntegration
software.amazon.awscdk.aws_apigatewayv2_integrations.WebSocketAwsIntegration
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.119.0 (build 1634eac)",
date="2025-11-13T16:09:58.178Z")
@Stability(Stable)
public class WebSocketAwsIntegration
extends WebSocketRouteIntegration
AWS WebSocket AWS Type Integration.
Example:
import software.amazon.awscdk.aws_apigatewayv2_integrations.WebSocketAwsIntegration;
import software.amazon.awscdk.services.dynamodb.*;
import software.amazon.awscdk.services.iam.*;
Role apiRole;
Table table;
WebSocketApi webSocketApi = new WebSocketApi(this, "mywsapi");
WebSocketStage.Builder.create(this, "mystage")
.webSocketApi(webSocketApi)
.stageName("dev")
.autoDeploy(true)
.build();
webSocketApi.addRoute("$connect", WebSocketRouteOptions.builder()
.integration(WebSocketAwsIntegration.Builder.create("DynamodbPutItem")
.integrationUri(String.format("arn:aws:apigateway:%s:dynamodb:action/PutItem", this.region))
.integrationMethod(HttpMethod.POST)
.credentialsRole(apiRole)
.requestTemplates(Map.of(
"application/json", JSON.stringify(Map.of(
"TableName", table.getTableName(),
"Item", Map.of(
"id", Map.of(
"S", "$context.requestId"))))))
.build())
.build());
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA fluent builder forWebSocketAwsIntegration.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedWebSocketAwsIntegration(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedWebSocketAwsIntegration(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionbind(WebSocketRouteIntegrationBindOptions _options) Bind this integration to the route.Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
WebSocketAwsIntegration
protected WebSocketAwsIntegration(software.amazon.jsii.JsiiObjectRef objRef) -
WebSocketAwsIntegration
protected WebSocketAwsIntegration(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
WebSocketAwsIntegration
@Stability(Stable) public WebSocketAwsIntegration(@NotNull String id, @NotNull WebSocketAwsIntegrationProps props) - Parameters:
id- id of the underlying integration construct. This parameter is required.props- This parameter is required.
-
-
Method Details
-
bind
@Stability(Stable) @NotNull public WebSocketRouteIntegrationConfig bind(@NotNull WebSocketRouteIntegrationBindOptions _options) Bind this integration to the route.- Specified by:
bindin classWebSocketRouteIntegration- Parameters:
_options- This parameter is required.
-