Class CfnRoute.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnRoute>
- Enclosing class:
CfnRoute
CfnRoute
.-
Method Summary
Modifier and TypeMethodDescriptionThe API identifier.apiKeyRequired
(Boolean apiKeyRequired) Specifies whether an API key is required for the route.apiKeyRequired
(IResolvable apiKeyRequired) Specifies whether an API key is required for the route.authorizationScopes
(List<String> authorizationScopes) The authorization scopes supported by this route.authorizationType
(String authorizationType) The authorization type for the route.authorizerId
(String authorizerId) The identifier of theAuthorizer
resource to be associated with this route.build()
static CfnRoute.Builder
modelSelectionExpression
(String modelSelectionExpression) The model selection expression for the route.operationName
(String operationName) The operation name for the route.requestModels
(Object requestModels) The request models for the route.requestParameters
(Object requestParameters) The request parameters for the route.The route key for the route.routeResponseSelectionExpression
(String routeResponseSelectionExpression) The route response selection expression for the route.The target for the route.
-
Method Details
-
create
- Parameters:
scope
-- scope in which this resource is defined.
id
-- scoped id of the resource.
- Returns:
- a new instance of
CfnRoute.Builder
.
-
apiId
The API identifier.- Parameters:
apiId
- The API identifier. This parameter is required.- Returns:
this
-
routeKey
The route key for the route.For HTTP APIs, the route key can be either
$default
, or a combination of an HTTP method and resource path, for example,GET /pets
.- Parameters:
routeKey
- The route key for the route. This parameter is required.- Returns:
this
-
apiKeyRequired
Specifies whether an API key is required for the route.Supported only for WebSocket APIs.
- Parameters:
apiKeyRequired
- Specifies whether an API key is required for the route. This parameter is required.- Returns:
this
-
apiKeyRequired
Specifies whether an API key is required for the route.Supported only for WebSocket APIs.
- Parameters:
apiKeyRequired
- Specifies whether an API key is required for the route. This parameter is required.- Returns:
this
-
authorizationScopes
The authorization scopes supported by this route.- Parameters:
authorizationScopes
- The authorization scopes supported by this route. This parameter is required.- Returns:
this
-
authorizationType
The authorization type for the route.For WebSocket APIs, valid values are
NONE
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.- Parameters:
authorizationType
- The authorization type for the route. This parameter is required.- Returns:
this
-
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.
- Parameters:
authorizerId
- The identifier of theAuthorizer
resource to be associated with this route. This parameter is required.- Returns:
this
-
modelSelectionExpression
@Stability(Stable) public CfnRoute.Builder modelSelectionExpression(String modelSelectionExpression) The model selection expression for the route.Supported only for WebSocket APIs.
- Parameters:
modelSelectionExpression
- The model selection expression for the route. This parameter is required.- Returns:
this
-
operationName
The operation name for the route.- Parameters:
operationName
- The operation name for the route. This parameter is required.- Returns:
this
-
requestModels
The request models for the route.Supported only for WebSocket APIs.
- Parameters:
requestModels
- The request models for the route. This parameter is required.- Returns:
this
-
requestParameters
The request parameters for the route.Supported only for WebSocket APIs.
- Parameters:
requestParameters
- The request parameters for the route. This parameter is required.- Returns:
this
-
routeResponseSelectionExpression
@Stability(Stable) public CfnRoute.Builder routeResponseSelectionExpression(String routeResponseSelectionExpression) The route response selection expression for the route.Supported only for WebSocket APIs.
- Parameters:
routeResponseSelectionExpression
- The route response selection expression for the route. This parameter is required.- Returns:
this
-
target
The target for the route.- Parameters:
target
- The target for the route. This parameter is required.- Returns:
this
-
build
-