Class WebSocketRouteOptions
(experimental) Options used to add route to the API.
Inheritance
System.Object
WebSocketRouteOptions
Implements
Namespace: Amazon.CDK.AWS.APIGatewayv2
Assembly: Amazon.CDK.AWS.APIGatewayv2.dll
Syntax (csharp)
public class WebSocketRouteOptions : Object, IWebSocketRouteOptions
Syntax (vb)
Public Class WebSocketRouteOptions
Inherits Object
Implements IWebSocketRouteOptions
Remarks
Stability: Experimental
ExampleMetadata: infused
Examples
using Amazon.CDK.AWS.APIGatewayv2.Integrations;
Function messageHandler;
var webSocketApi = new WebSocketApi(this, "mywsapi");
new WebSocketStage(this, "mystage", new WebSocketStageProps {
WebSocketApi = webSocketApi,
StageName = "dev",
AutoDeploy = true
});
webSocketApi.AddRoute("sendmessage", new WebSocketRouteOptions {
Integration = new WebSocketLambdaIntegration("SendMessageIntegration", messageHandler)
});
Synopsis
Constructors
WebSocketRouteOptions() |
Properties
Authorizer | (experimental) The authorize to this route. |
Integration | (experimental) The integration to be configured on this route. |
Constructors
WebSocketRouteOptions()
public WebSocketRouteOptions()
Properties
Authorizer
(experimental) The authorize to this route.
public IWebSocketRouteAuthorizer Authorizer { get; set; }
Property Value
Remarks
You can only set authorizer to a $connect route.
Default: - No Authorizer
Stability: Experimental
Integration
(experimental) The integration to be configured on this route.
public WebSocketRouteIntegration Integration { get; set; }
Property Value
Remarks
Stability: Experimental