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.109.0 (build c221850)",
date="2025-03-14T03:24:51.956Z")
@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 class
A builder forWebSocketRouteOptions
static final class
An implementation forWebSocketRouteOptions
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
default IWebSocketRouteAuthorizer
The authorize to this route.The integration to be configured on this route.default Boolean
Should 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.Builder
ofWebSocketRouteOptions
-