Interface WebSocketRouteOptions
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Subinterfaces:
WebSocketRouteProps
- All Known Implementing Classes:
WebSocketRouteOptions.Jsii$Proxy,WebSocketRouteProps.Jsii$Proxy
@Generated(value="jsii-pacmak/1.116.0 (build 0eddcff)",
date="2025-10-29T11:15:31.794Z")
@Stability(Stable)
public interface WebSocketRouteOptions
extends software.amazon.jsii.JsiiSerializable
Options used to add route to the API.
Example:
import software.amazon.awscdk.aws_apigatewayv2_integrations.WebSocketLambdaIntegration;
Function messageHandler;
WebSocketApi webSocketApi = new WebSocketApi(this, "mywsapi");
WebSocketStage.Builder.create(this, "mystage")
.webSocketApi(webSocketApi)
.stageName("dev")
.autoDeploy(true)
.build();
webSocketApi.addRoute("sendMessage", WebSocketRouteOptions.builder()
.integration(new WebSocketLambdaIntegration("SendMessageIntegration", messageHandler))
.build());
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forWebSocketRouteOptionsstatic final classAn implementation forWebSocketRouteOptions -
Method Summary
Modifier and TypeMethodDescriptionbuilder()default IWebSocketRouteAuthorizerThe authorize to this route.The integration to be configured on this route.default BooleanShould the route send a response to the client.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getIntegration
The integration to be configured on this route. -
getAuthorizer
The authorize to this route.You can only set authorizer to a $connect route.
Default: - No Authorizer
-
getReturnResponse
Should the route send a response to the client.Default: false
-
builder
- Returns:
- a
WebSocketRouteOptions.BuilderofWebSocketRouteOptions
-