Class WebSocketRoute.Builder
java.lang.Object
software.amazon.awscdk.services.apigatewayv2.WebSocketRoute.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<WebSocketRoute>
- Enclosing class:
WebSocketRoute
@Stability(Stable)
public static final class WebSocketRoute.Builder
extends Object
implements software.amazon.jsii.Builder<WebSocketRoute>
A fluent builder for
WebSocketRoute
.-
Method Summary
Modifier and TypeMethodDescriptionapiKeyRequired
(Boolean apiKeyRequired) Whether the route requires an API Key to be provided.authorizer
(IWebSocketRouteAuthorizer authorizer) The authorize to this route.build()
static WebSocketRoute.Builder
integration
(WebSocketRouteIntegration integration) The integration to be configured on this route.returnResponse
(Boolean returnResponse) Should the route send a response to the client.The key to this route.webSocketApi
(IWebSocketApi webSocketApi) The API the route is associated with.
-
Method Details
-
create
@Stability(Stable) public static WebSocketRoute.Builder create(software.constructs.Construct scope, String id) - Parameters:
scope
- This parameter is required.id
- This parameter is required.- Returns:
- a new instance of
WebSocketRoute.Builder
.
-
integration
The integration to be configured on this route.- Parameters:
integration
- The integration to be configured on this route. This parameter is required.- Returns:
this
-
authorizer
The authorize to this route.You can only set authorizer to a $connect route.
Default: - No Authorizer
- Parameters:
authorizer
- The authorize to this route. This parameter is required.- Returns:
this
-
returnResponse
Should the route send a response to the client.Default: false
- Parameters:
returnResponse
- Should the route send a response to the client. This parameter is required.- Returns:
this
-
routeKey
The key to this route.- Parameters:
routeKey
- The key to this route. This parameter is required.- Returns:
this
-
webSocketApi
The API the route is associated with.- Parameters:
webSocketApi
- The API the route is associated with. This parameter is required.- Returns:
this
-
apiKeyRequired
Whether the route requires an API Key to be provided.Default: false
- Parameters:
apiKeyRequired
- Whether the route requires an API Key to be provided. This parameter is required.- Returns:
this
-
build
- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<WebSocketRoute>
- Returns:
- a newly built instance of
WebSocketRoute
.
-