Class CfnRouteProps.Builder
java.lang.Object
software.amazon.awscdk.services.apigatewayv2.CfnRouteProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnRouteProps>
- Enclosing interface:
CfnRouteProps
@Stability(Stable)
public static final class CfnRouteProps.Builder
extends Object
implements software.amazon.jsii.Builder<CfnRouteProps>
A builder for
CfnRouteProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionSets the value ofCfnRouteProps.getApiId()
apiKeyRequired
(Boolean apiKeyRequired) Sets the value ofCfnRouteProps.getApiKeyRequired()
apiKeyRequired
(IResolvable apiKeyRequired) Sets the value ofCfnRouteProps.getApiKeyRequired()
authorizationScopes
(List<String> authorizationScopes) Sets the value ofCfnRouteProps.getAuthorizationScopes()
authorizationType
(String authorizationType) Sets the value ofCfnRouteProps.getAuthorizationType()
authorizerId
(String authorizerId) Sets the value ofCfnRouteProps.getAuthorizerId()
build()
Builds the configured instance.modelSelectionExpression
(String modelSelectionExpression) Sets the value ofCfnRouteProps.getModelSelectionExpression()
operationName
(String operationName) Sets the value ofCfnRouteProps.getOperationName()
requestModels
(Object requestModels) Sets the value ofCfnRouteProps.getRequestModels()
requestParameters
(Object requestParameters) Sets the value ofCfnRouteProps.getRequestParameters()
Sets the value ofCfnRouteProps.getRouteKey()
routeResponseSelectionExpression
(String routeResponseSelectionExpression) Sets the value ofCfnRouteProps.getRouteResponseSelectionExpression()
Sets the value ofCfnRouteProps.getTarget()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
apiId
Sets the value ofCfnRouteProps.getApiId()
- Parameters:
apiId
- The API identifier. This parameter is required.- Returns:
this
-
routeKey
Sets the value ofCfnRouteProps.getRouteKey()
- Parameters:
routeKey
- The route key for the route. This parameter is required. For HTTP APIs, the route key can be either$default
, or a combination of an HTTP method and resource path, for example,GET /pets
.- Returns:
this
-
apiKeyRequired
Sets the value ofCfnRouteProps.getApiKeyRequired()
- Parameters:
apiKeyRequired
- Specifies whether an API key is required for the route. Supported only for WebSocket APIs.- Returns:
this
-
apiKeyRequired
Sets the value ofCfnRouteProps.getApiKeyRequired()
- Parameters:
apiKeyRequired
- Specifies whether an API key is required for the route. Supported only for WebSocket APIs.- Returns:
this
-
authorizationScopes
@Stability(Stable) public CfnRouteProps.Builder authorizationScopes(List<String> authorizationScopes) Sets the value ofCfnRouteProps.getAuthorizationScopes()
- Parameters:
authorizationScopes
- The authorization scopes supported by this route.- Returns:
this
-
authorizationType
Sets the value ofCfnRouteProps.getAuthorizationType()
- Parameters:
authorizationType
- The authorization type for the route. For WebSocket APIs, valid values areNONE
for open access,AWS_IAM
for using AWS IAM permissions, andCUSTOM
for using a Lambda authorizer. For HTTP APIs, valid values areNONE
for open access,JWT
for using JSON Web Tokens,AWS_IAM
for using AWS IAM permissions, andCUSTOM
for using a Lambda authorizer.- Returns:
this
-
authorizerId
Sets the value ofCfnRouteProps.getAuthorizerId()
- Parameters:
authorizerId
- The identifier of theAuthorizer
resource to be associated with this route. The authorizer identifier is generated by API Gateway when you created the authorizer.- Returns:
this
-
modelSelectionExpression
@Stability(Stable) public CfnRouteProps.Builder modelSelectionExpression(String modelSelectionExpression) Sets the value ofCfnRouteProps.getModelSelectionExpression()
- Parameters:
modelSelectionExpression
- The model selection expression for the route. Supported only for WebSocket APIs.- Returns:
this
-
operationName
Sets the value ofCfnRouteProps.getOperationName()
- Parameters:
operationName
- The operation name for the route.- Returns:
this
-
requestModels
Sets the value ofCfnRouteProps.getRequestModels()
- Parameters:
requestModels
- The request models for the route. Supported only for WebSocket APIs.- Returns:
this
-
requestParameters
Sets the value ofCfnRouteProps.getRequestParameters()
- Parameters:
requestParameters
- The request parameters for the route. Supported only for WebSocket APIs.- Returns:
this
-
routeResponseSelectionExpression
@Stability(Stable) public CfnRouteProps.Builder routeResponseSelectionExpression(String routeResponseSelectionExpression) Sets the value ofCfnRouteProps.getRouteResponseSelectionExpression()
- Parameters:
routeResponseSelectionExpression
- The route response selection expression for the route. Supported only for WebSocket APIs.- Returns:
this
-
target
Sets the value ofCfnRouteProps.getTarget()
- Parameters:
target
- The target for the route.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnRouteProps>
- Returns:
- a new instance of
CfnRouteProps
- Throws:
NullPointerException
- if any required attribute was not provided
-