Interface WebSocketApiProps
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
WebSocketApiProps.Jsii$Proxy
@Generated(value="jsii-pacmak/1.102.0 (build e354887)",
date="2024-09-06T01:36:22.911Z")
@Stability(Stable)
public interface WebSocketApiProps
extends software.amazon.jsii.JsiiSerializable
Props for WebSocket API.
Example:
import software.amazon.awscdk.aws_apigatewayv2_authorizers.WebSocketLambdaAuthorizer; import software.amazon.awscdk.aws_apigatewayv2_integrations.WebSocketLambdaIntegration; // This function handles your auth logic Function authHandler; // This function handles your WebSocket requests Function handler; WebSocketLambdaAuthorizer authorizer = new WebSocketLambdaAuthorizer("Authorizer", authHandler); WebSocketLambdaIntegration integration = new WebSocketLambdaIntegration("Integration", handler); WebSocketApi.Builder.create(this, "WebSocketApi") .connectRouteOptions(WebSocketRouteOptions.builder() .integration(integration) .authorizer(authorizer) .build()) .build();
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic final class
A builder forWebSocketApiProps
static final class
An implementation forWebSocketApiProps
-
Method Summary
Modifier and TypeMethodDescriptionstatic WebSocketApiProps.Builder
builder()
An API key selection expression.default String
Name for the WebSocket API resource.default WebSocketRouteOptions
Options to configure a '$connect' route.default WebSocketRouteOptions
Options to configure a '$default' route.default String
The description of the API.default WebSocketRouteOptions
Options to configure a '$disconnect' route.default String
The route selection expression for the API.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getApiKeySelectionExpression
@Stability(Stable) @Nullable default WebSocketApiKeySelectionExpression getApiKeySelectionExpression()An API key selection expression.Providing this option will require an API Key be provided to access the API.
Default: - Key is not required to access these APIs
-
getApiName
Name for the WebSocket API resource.Default: - id of the WebSocketApi construct.
-
getConnectRouteOptions
Options to configure a '$connect' route.Default: - no '$connect' route configured
-
getDefaultRouteOptions
Options to configure a '$default' route.Default: - no '$default' route configured
-
getDescription
The description of the API.Default: - none
-
getDisconnectRouteOptions
Options to configure a '$disconnect' route.Default: - no '$disconnect' route configured
-
getRouteSelectionExpression
The route selection expression for the API.Default: '$request.body.action'
-
builder
- Returns:
- a
WebSocketApiProps.Builder
ofWebSocketApiProps
-