Class WebSocketRoute

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.Resource
software.amazon.awscdk.services.apigatewayv2.WebSocketRoute
All Implemented Interfaces:
IResource, IRoute, IWebSocketRoute, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.103.1 (build bef2dea)", date="2024-09-11T18:01:10.807Z") @Stability(Stable) public class WebSocketRoute extends Resource implements IWebSocketRoute
Route class that creates the Route for API Gateway WebSocket API.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.apigatewayv2.*;
 WebSocketApi webSocketApi;
 IWebSocketRouteAuthorizer webSocketRouteAuthorizer;
 WebSocketRouteIntegration webSocketRouteIntegration;
 WebSocketRoute webSocketRoute = WebSocketRoute.Builder.create(this, "MyWebSocketRoute")
         .integration(webSocketRouteIntegration)
         .routeKey("routeKey")
         .webSocketApi(webSocketApi)
         // the properties below are optional
         .apiKeyRequired(false)
         .authorizer(webSocketRouteAuthorizer)
         .returnResponse(false)
         .build();
 
  • Constructor Details

    • WebSocketRoute

      protected WebSocketRoute(software.amazon.jsii.JsiiObjectRef objRef)
    • WebSocketRoute

      protected WebSocketRoute(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • WebSocketRoute

      @Stability(Stable) public WebSocketRoute(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull WebSocketRouteProps props)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      props - This parameter is required.
  • Method Details

    • getRouteId

      @Stability(Stable) @NotNull public String getRouteId()
      Id of the Route.
      Specified by:
      getRouteId in interface IRoute
    • getRouteKey

      @Stability(Stable) @NotNull public String getRouteKey()
      The key to this route.
      Specified by:
      getRouteKey in interface IWebSocketRoute
    • getWebSocketApi

      @Stability(Stable) @NotNull public IWebSocketApi getWebSocketApi()
      The WebSocket API associated with this route.
      Specified by:
      getWebSocketApi in interface IWebSocketRoute
    • getIntegrationResponseId

      @Stability(Stable) @Nullable public String getIntegrationResponseId()
      Integration response ID.