Show / Hide Table of Contents

Interface IWebSocketApiProps

Props for WebSocket API.

Namespace: Amazon.CDK.AWS.Apigatewayv2
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface IWebSocketApiProps
Syntax (vb)
Public Interface IWebSocketApiProps
Remarks

ExampleMetadata: infused

Examples
using Amazon.CDK.AwsApigatewayv2Authorizers;
            using Amazon.CDK.AwsApigatewayv2Integrations;

            // 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

Properties

ApiKeySelectionExpression

An API key selection expression.

ApiName

Name for the WebSocket API resource.

ConnectRouteOptions

Options to configure a '$connect' route.

DefaultRouteOptions

Options to configure a '$default' route.

Description

The description of the API.

DisconnectRouteOptions

Options to configure a '$disconnect' route.

IpAddressType

The IP address types that can invoke the API.

RouteSelectionExpression

The route selection expression for the API.

Properties

ApiKeySelectionExpression

An API key selection expression.

WebSocketApiKeySelectionExpression? ApiKeySelectionExpression { get; }
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

ApiName

Name for the WebSocket API resource.

string? ApiName { get; }
Property Value

string

Remarks

Default: - id of the WebSocketApi construct.

ConnectRouteOptions

Options to configure a '$connect' route.

IWebSocketRouteOptions? ConnectRouteOptions { get; }
Property Value

IWebSocketRouteOptions

Remarks

Default: - no '$connect' route configured

DefaultRouteOptions

Options to configure a '$default' route.

IWebSocketRouteOptions? DefaultRouteOptions { get; }
Property Value

IWebSocketRouteOptions

Remarks

Default: - no '$default' route configured

Description

The description of the API.

string? Description { get; }
Property Value

string

Remarks

Default: - none

DisconnectRouteOptions

Options to configure a '$disconnect' route.

IWebSocketRouteOptions? DisconnectRouteOptions { get; }
Property Value

IWebSocketRouteOptions

Remarks

Default: - no '$disconnect' route configured

IpAddressType

The IP address types that can invoke the API.

IpAddressType? IpAddressType { get; }
Property Value

IpAddressType?

Remarks

Default: undefined - AWS default is IPV4

See: https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-ip-address-type.html

RouteSelectionExpression

The route selection expression for the API.

string? RouteSelectionExpression { get; }
Property Value

string

Remarks

Default: '$request.body.action'

Back to top Generated by DocFX