Class WebSocketRouteOptions
Options used to add route to the API.
Inheritance
System.Object
WebSocketRouteOptions
Implements
Namespace: Amazon.CDK.AWS.Apigatewayv2
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class WebSocketRouteOptions : Object, IWebSocketRouteOptions
Syntax (vb)
Public Class WebSocketRouteOptions
Inherits Object
Implements IWebSocketRouteOptions
Remarks
ExampleMetadata: infused
Examples
using Amazon.CDK.WebSocketLambdaIntegration;
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 | The authorize to this route. |
Integration | The integration to be configured on this route. |
ReturnResponse | Should the route send a response to the client. |
Constructors
WebSocketRouteOptions()
public WebSocketRouteOptions()
Properties
Authorizer
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
Integration
The integration to be configured on this route.
public WebSocketRouteIntegration Integration { get; set; }
Property Value
ReturnResponse
Should the route send a response to the client.
public Nullable<bool> ReturnResponse { get; set; }
Property Value
System.Nullable<System.Boolean>
Remarks
Default: false