@Generated(value="jsii-pacmak/1.50.0 (build d1830a4)", date="2022-01-04T15:39:02.058Z") @Stability(value=Experimental) public interface WebSocketApiProps extends software.amazon.jsii.JsiiSerializable
Example:
import software.amazon.awscdk.services.apigatewayv2.integrations.WebSocketLambdaIntegration;
Function connectHandler;
Function disconnectHandler;
Function defaultHandler;
WebSocketApi webSocketApi = WebSocketApi.Builder.create(this, "mywsapi")
.connectRouteOptions(WebSocketRouteOptions.builder().integration(new WebSocketLambdaIntegration("ConnectIntegration", connectHandler)).build())
.disconnectRouteOptions(WebSocketRouteOptions.builder().integration(new WebSocketLambdaIntegration("DisconnectIntegration", disconnectHandler)).build())
.defaultRouteOptions(WebSocketRouteOptions.builder().integration(new WebSocketLambdaIntegration("DefaultIntegration", defaultHandler)).build())
.build();
WebSocketStage.Builder.create(this, "mystage")
.webSocketApi(webSocketApi)
.stageName("dev")
.autoDeploy(true)
.build();
| Modifier and Type | Interface and Description |
|---|---|
static class |
WebSocketApiProps.Builder
A builder for
WebSocketApiProps |
static class |
WebSocketApiProps.Jsii$Proxy
An implementation for
WebSocketApiProps |
| Modifier and Type | Method and Description |
|---|---|
static WebSocketApiProps.Builder |
builder() |
default String |
getApiName()
(experimental) Name for the WebSocket API resource.
|
default WebSocketRouteOptions |
getConnectRouteOptions()
(experimental) Options to configure a '$connect' route.
|
default WebSocketRouteOptions |
getDefaultRouteOptions()
(experimental) Options to configure a '$default' route.
|
default String |
getDescription()
(experimental) The description of the API.
|
default WebSocketRouteOptions |
getDisconnectRouteOptions()
(experimental) Options to configure a '$disconnect' route.
|
default String |
getRouteSelectionExpression()
(experimental) The route selection expression for the API.
|
@Stability(value=Experimental) @Nullable default String getApiName()
Default: - id of the WebSocketApi construct.
@Stability(value=Experimental) @Nullable default WebSocketRouteOptions getConnectRouteOptions()
Default: - no '$connect' route configured
@Stability(value=Experimental) @Nullable default WebSocketRouteOptions getDefaultRouteOptions()
Default: - no '$default' route configured
@Stability(value=Experimental) @Nullable default String getDescription()
Default: - none
@Stability(value=Experimental) @Nullable default WebSocketRouteOptions getDisconnectRouteOptions()
Default: - no '$disconnect' route configured
@Stability(value=Experimental) @Nullable default String getRouteSelectionExpression()
Default: '$request.body.action'
@Stability(value=Experimental) static WebSocketApiProps.Builder builder()
WebSocketApiProps.Builder of WebSocketApiPropsCopyright © 2022. All rights reserved.