Interface WebSocketApiProps

All Superinterfaces:
All Known Implementing Classes:

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:43.342Z") @Stability(Experimental) public interface WebSocketApiProps extends
(experimental) Props for WebSocket API.


 // 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")
  • Method Details

    • getApiKeySelectionExpression

      @Stability(Experimental) @Nullable default WebSocketApiKeySelectionExpression getApiKeySelectionExpression()
      (experimental) 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

      @Stability(Experimental) @Nullable default String getApiName()
      (experimental) Name for the WebSocket API resource.

      Default: - id of the WebSocketApi construct.

    • getConnectRouteOptions

      @Stability(Experimental) @Nullable default WebSocketRouteOptions getConnectRouteOptions()
      (experimental) Options to configure a '$connect' route.

      Default: - no '$connect' route configured

    • getDefaultRouteOptions

      @Stability(Experimental) @Nullable default WebSocketRouteOptions getDefaultRouteOptions()
      (experimental) Options to configure a '$default' route.

      Default: - no '$default' route configured

    • getDescription

      @Stability(Experimental) @Nullable default String getDescription()
      (experimental) The description of the API.

      Default: - none

    • getDisconnectRouteOptions

      @Stability(Experimental) @Nullable default WebSocketRouteOptions getDisconnectRouteOptions()
      (experimental) Options to configure a '$disconnect' route.

      Default: - no '$disconnect' route configured

    • getRouteSelectionExpression

      @Stability(Experimental) @Nullable default String getRouteSelectionExpression()
      (experimental) The route selection expression for the API.

      Default: '$request.body.action'

    • builder

      @Stability(Experimental) static WebSocketApiProps.Builder builder()
      a WebSocketApiProps.Builder of WebSocketApiProps