Class WebSocketApiProps
(experimental) Props for WebSocket API.
Inheritance
Implements
Namespace: Amazon.CDK.AWS.APIGatewayv2
Assembly: Amazon.CDK.AWS.APIGatewayv2.dll
Syntax (csharp)
public class WebSocketApiProps : Object, IWebSocketApiProps
Syntax (vb)
Public Class WebSocketApiProps
Inherits Object
Implements IWebSocketApiProps
Remarks
Stability: Experimental
ExampleMetadata: infused
Examples
using Amazon.CDK.AWS.APIGatewayv2.Authorizers;
using Amazon.CDK.AWS.APIGatewayv2.Integrations;
// This function handles your auth logic
Function authHandler;
// This function handles your WebSocket requests
Function handler;
var authorizer = new WebSocketLambdaAuthorizer("Authorizer", authHandler);
var integration = new WebSocketLambdaIntegration("Integration", handler);
new WebSocketApi(this, "WebSocketApi", new WebSocketApiProps {
ConnectRouteOptions = new WebSocketRouteOptions {
Integration = integration,
Authorizer = authorizer
}
});
Synopsis
Constructors
WebSocketApiProps() |
Properties
ApiKeySelectionExpression | (experimental) An API key selection expression. |
ApiName | (experimental) Name for the WebSocket API resource. |
ConnectRouteOptions | (experimental) Options to configure a '$connect' route. |
DefaultRouteOptions | (experimental) Options to configure a '$default' route. |
Description | (experimental) The description of the API. |
DisconnectRouteOptions | (experimental) Options to configure a '$disconnect' route. |
RouteSelectionExpression | (experimental) The route selection expression for the API. |
Constructors
WebSocketApiProps()
public WebSocketApiProps()
Properties
ApiKeySelectionExpression
(experimental) An API key selection expression.
public WebSocketApiKeySelectionExpression ApiKeySelectionExpression { get; set; }
Property Value
WebSocketApiKeySelectionExpression
Remarks
Providing this option will require an API Key be provided to access the API.
Default: - Key is not required to access these APIs
Stability: Experimental
ApiName
(experimental) Name for the WebSocket API resource.
public string ApiName { get; set; }
Property Value
System.String
Remarks
Default: - id of the WebSocketApi construct.
Stability: Experimental
ConnectRouteOptions
(experimental) Options to configure a '$connect' route.
public IWebSocketRouteOptions ConnectRouteOptions { get; set; }
Property Value
Remarks
Default: - no '$connect' route configured
Stability: Experimental
DefaultRouteOptions
(experimental) Options to configure a '$default' route.
public IWebSocketRouteOptions DefaultRouteOptions { get; set; }
Property Value
Remarks
Default: - no '$default' route configured
Stability: Experimental
Description
(experimental) The description of the API.
public string Description { get; set; }
Property Value
System.String
Remarks
Default: - none
Stability: Experimental
DisconnectRouteOptions
(experimental) Options to configure a '$disconnect' route.
public IWebSocketRouteOptions DisconnectRouteOptions { get; set; }
Property Value
Remarks
Default: - no '$disconnect' route configured
Stability: Experimental
RouteSelectionExpression
(experimental) The route selection expression for the API.
public string RouteSelectionExpression { get; set; }
Property Value
System.String
Remarks
Default: '$request.body.action'
Stability: Experimental