Class WebSocketApiProps.Builder
java.lang.Object
software.amazon.awscdk.services.apigatewayv2.WebSocketApiProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<WebSocketApiProps>
- Enclosing interface:
WebSocketApiProps
@Stability(Stable)
public static final class WebSocketApiProps.Builder
extends Object
implements software.amazon.jsii.Builder<WebSocketApiProps>
A builder for
WebSocketApiProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionapiKeySelectionExpression
(WebSocketApiKeySelectionExpression apiKeySelectionExpression) Sets the value ofWebSocketApiProps.getApiKeySelectionExpression()
Sets the value ofWebSocketApiProps.getApiName()
build()
Builds the configured instance.connectRouteOptions
(WebSocketRouteOptions connectRouteOptions) Sets the value ofWebSocketApiProps.getConnectRouteOptions()
defaultRouteOptions
(WebSocketRouteOptions defaultRouteOptions) Sets the value ofWebSocketApiProps.getDefaultRouteOptions()
description
(String description) Sets the value ofWebSocketApiProps.getDescription()
disconnectRouteOptions
(WebSocketRouteOptions disconnectRouteOptions) Sets the value ofWebSocketApiProps.getDisconnectRouteOptions()
routeSelectionExpression
(String routeSelectionExpression) Sets the value ofWebSocketApiProps.getRouteSelectionExpression()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
apiKeySelectionExpression
@Stability(Stable) public WebSocketApiProps.Builder apiKeySelectionExpression(WebSocketApiKeySelectionExpression apiKeySelectionExpression) Sets the value ofWebSocketApiProps.getApiKeySelectionExpression()
- Parameters:
apiKeySelectionExpression
- An API key selection expression. Providing this option will require an API Key be provided to access the API.- Returns:
this
-
apiName
Sets the value ofWebSocketApiProps.getApiName()
- Parameters:
apiName
- Name for the WebSocket API resource.- Returns:
this
-
connectRouteOptions
@Stability(Stable) public WebSocketApiProps.Builder connectRouteOptions(WebSocketRouteOptions connectRouteOptions) Sets the value ofWebSocketApiProps.getConnectRouteOptions()
- Parameters:
connectRouteOptions
- Options to configure a '$connect' route.- Returns:
this
-
defaultRouteOptions
@Stability(Stable) public WebSocketApiProps.Builder defaultRouteOptions(WebSocketRouteOptions defaultRouteOptions) Sets the value ofWebSocketApiProps.getDefaultRouteOptions()
- Parameters:
defaultRouteOptions
- Options to configure a '$default' route.- Returns:
this
-
description
Sets the value ofWebSocketApiProps.getDescription()
- Parameters:
description
- The description of the API.- Returns:
this
-
disconnectRouteOptions
@Stability(Stable) public WebSocketApiProps.Builder disconnectRouteOptions(WebSocketRouteOptions disconnectRouteOptions) Sets the value ofWebSocketApiProps.getDisconnectRouteOptions()
- Parameters:
disconnectRouteOptions
- Options to configure a '$disconnect' route.- Returns:
this
-
routeSelectionExpression
@Stability(Stable) public WebSocketApiProps.Builder routeSelectionExpression(String routeSelectionExpression) Sets the value ofWebSocketApiProps.getRouteSelectionExpression()
- Parameters:
routeSelectionExpression
- The route selection expression for the API.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<WebSocketApiProps>
- Returns:
- a new instance of
WebSocketApiProps
- Throws:
NullPointerException
- if any required attribute was not provided
-