AWS API Gateway V2 Route
This page shows how to write Terraform and CloudFormation for API Gateway V2 Route and write them securely.
aws_apigatewayv2_route (Terraform)
The Route in API Gateway V2 can be configured in Terraform with the resource name aws_apigatewayv2_route
. The following sections describe how to use the resource and its parameters.
Example Usage from GitHub
An example could not be found in GitHub.
Parameters
-
api_id
required - string -
api_key_required
optional - bool -
authorization_scopes
optional - set of string -
authorization_type
optional - string -
authorizer_id
optional - string -
id
optional computed - string -
model_selection_expression
optional - string -
operation_name
optional - string -
request_models
optional - map from string to string -
route_key
required - string -
route_response_selection_expression
optional - string -
target
optional - string -
request_parameter
set block-
request_parameter_key
required - string -
required
required - bool
-
Explanation in Terraform Registry
Manages an Amazon API Gateway Version 2 route. More information can be found in the Amazon API Gateway Developer Guide for WebSocket and HTTP APIs.
AWS::ApiGatewayV2::Route (CloudFormation)
The Route in ApiGatewayV2 can be configured in CloudFormation with the resource name AWS::ApiGatewayV2::Route
. The following sections describe 2 examples of how to use the resource and its parameters.
Example Usage from GitHub
"default" : "AWS::ApiGatewayV2::Route"
},
"Properties" : {
"$ref" : "AWS_ApiGatewayV2_Route.schema.json"
}
}
"default" : "AWS::ApiGatewayV2::RouteResponse"
},
"Properties" : {
"$ref" : "AWS_ApiGatewayV2_RouteResponse.schema.json"
}
}
Parameters
-
Target
optional - String -
RouteResponseSelectionExpression
optional - String -
AuthorizerId
optional - String -
RequestModels
optional - Json -
OperationName
optional - String -
AuthorizationScopes
optional - List -
ApiKeyRequired
optional - Boolean -
RouteKey
required - String -
AuthorizationType
optional - String -
ModelSelectionExpression
optional - String -
ApiId
required - String -
RequestParameters
optional - Json
Explanation in CloudFormation Registry
The
AWS::ApiGatewayV2::Route
resource creates a route for an API.
Frequently asked questions
What is AWS API Gateway V2 Route?
AWS API Gateway V2 Route is a resource for API Gateway V2 of Amazon Web Service. Settings can be wrote in Terraform and CloudFormation.
Where can I find the example code for the AWS API Gateway V2 Route?
For CloudFormation, the shiver-me-timbers/smt-cloudformation-parent and shiver-me-timbers/smt-cloudformation-parent source code examples are useful. See the CloudFormation Example section for further details.