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_idrequired - string -
api_key_requiredoptional - bool -
authorization_scopesoptional - set of string -
authorization_typeoptional - string -
authorizer_idoptional - string -
idoptional computed - string -
model_selection_expressionoptional - string -
operation_nameoptional - string -
request_modelsoptional - map from string to string -
route_keyrequired - string -
route_response_selection_expressionoptional - string -
targetoptional - string -
request_parameterset block-
request_parameter_keyrequired - string -
requiredrequired - 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
-
Targetoptional - String -
RouteResponseSelectionExpressionoptional - String -
AuthorizerIdoptional - String -
RequestModelsoptional - Json -
OperationNameoptional - String -
AuthorizationScopesoptional - List -
ApiKeyRequiredoptional - Boolean -
RouteKeyrequired - String -
AuthorizationTypeoptional - String -
ModelSelectionExpressionoptional - String -
ApiIdrequired - String -
RequestParametersoptional - Json
Explanation in CloudFormation Registry
The
AWS::ApiGatewayV2::Routeresource 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.