CfnRouteProps
- class aws_cdk.aws_apigatewayv2.CfnRouteProps(*, api_id, route_key, api_key_required=None, authorization_scopes=None, authorization_type=None, authorizer_id=None, model_selection_expression=None, operation_name=None, request_models=None, request_parameters=None, route_response_selection_expression=None, target=None)
Bases:
object
Properties for defining a
CfnRoute
.- Parameters:
api_id (
str
) – The API identifier.route_key (
str
) – 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
.api_key_required (
Union
[bool
,IResolvable
,None
]) – Specifies whether an API key is required for the route. Supported only for WebSocket APIs.authorization_scopes (
Optional
[Sequence
[str
]]) – The authorization scopes supported by this route.authorization_type (
Optional
[str
]) – 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.authorizer_id (
Optional
[str
]) – The identifier of theAuthorizer
resource to be associated with this route. The authorizer identifier is generated by API Gateway when you created the authorizer.model_selection_expression (
Optional
[str
]) – The model selection expression for the route. Supported only for WebSocket APIs.operation_name (
Optional
[str
]) – The operation name for the route.request_models (
Optional
[Any
]) – The request models for the route. Supported only for WebSocket APIs.request_parameters (
Optional
[Any
]) – The request parameters for the route. Supported only for WebSocket APIs.route_response_selection_expression (
Optional
[str
]) – The route response selection expression for the route. Supported only for WebSocket APIs.target (
Optional
[str
]) – The target for the route.
- Link:
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-route.html
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. import aws_cdk.aws_apigatewayv2 as apigatewayv2 # request_models: Any # request_parameters: Any cfn_route_props = apigatewayv2.CfnRouteProps( api_id="apiId", route_key="routeKey", # the properties below are optional api_key_required=False, authorization_scopes=["authorizationScopes"], authorization_type="authorizationType", authorizer_id="authorizerId", model_selection_expression="modelSelectionExpression", operation_name="operationName", request_models=request_models, request_parameters=request_parameters, route_response_selection_expression="routeResponseSelectionExpression", target="target" )
Attributes
- api_id
The API identifier.
- api_key_required
Specifies whether an API key is required for the route.
Supported only for WebSocket APIs.
- authorization_scopes
The authorization scopes supported by this route.
- authorization_type
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.
- authorizer_id
The identifier of the
Authorizer
resource to be associated with this route.The authorizer identifier is generated by API Gateway when you created the authorizer.
- model_selection_expression
The model selection expression for the route.
Supported only for WebSocket APIs.
- operation_name
The operation name for the route.
- request_models
The request models for the route.
Supported only for WebSocket APIs.
- request_parameters
The request parameters for the route.
Supported only for WebSocket APIs.
- route_key
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
.
- route_response_selection_expression
The route response selection expression for the route.
Supported only for WebSocket APIs.
- target
The target for the route.