We recommend new projects start with resources from the AWS provider.
aws-native.apigatewayv2.Route
Explore with Pulumi AI
We recommend new projects start with resources from the AWS provider.
The AWS::ApiGatewayV2::Route resource creates a route for an API.
Create Route Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Route(name: string, args: RouteArgs, opts?: CustomResourceOptions);@overload
def Route(resource_name: str,
          args: RouteArgs,
          opts: Optional[ResourceOptions] = None)
@overload
def Route(resource_name: str,
          opts: Optional[ResourceOptions] = None,
          api_id: Optional[str] = None,
          route_key: Optional[str] = None,
          api_key_required: Optional[bool] = None,
          authorization_scopes: Optional[Sequence[str]] = None,
          authorization_type: Optional[str] = None,
          authorizer_id: Optional[str] = None,
          model_selection_expression: Optional[str] = None,
          operation_name: Optional[str] = None,
          request_models: Optional[Any] = None,
          request_parameters: Optional[Sequence[RouteParameterConstraintsArgs]] = None,
          route_response_selection_expression: Optional[str] = None,
          target: Optional[str] = None)func NewRoute(ctx *Context, name string, args RouteArgs, opts ...ResourceOption) (*Route, error)public Route(string name, RouteArgs args, CustomResourceOptions? opts = null)type: aws-native:apigatewayv2:Route
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args RouteArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args RouteArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args RouteArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args RouteArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args RouteArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Route Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Route resource accepts the following input properties:
- ApiId string
- The API identifier.
- RouteKey string
- 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.
- ApiKey boolRequired 
- Specifies whether an API key is required for the route. Supported only for WebSocket APIs.
- List<string>
- The authorization scopes supported by this route.
- string
- The authorization type for the route. For WebSocket APIs, valid values are NONEfor open access,AWS_IAMfor using AWS IAM permissions, andCUSTOMfor using a Lambda authorizer. For HTTP APIs, valid values areNONEfor open access,JWTfor using JSON Web Tokens,AWS_IAMfor using AWS IAM permissions, andCUSTOMfor using a Lambda authorizer.
- string
- The identifier of the Authorizerresource to be associated with this route. The authorizer identifier is generated by API Gateway when you created the authorizer.
- ModelSelection stringExpression 
- The model selection expression for the route. Supported only for WebSocket APIs.
- OperationName string
- The operation name for the route.
- RequestModels object
- The request models for the route. Supported only for WebSocket APIs. - Search the CloudFormation User Guide for - AWS::ApiGatewayV2::Routefor more information about the expected schema for this property.
- RequestParameters List<Pulumi.Aws Native. Api Gateway V2. Inputs. Route Parameter Constraints> 
- The request parameters for the route. Supported only for WebSocket APIs.
- RouteResponse stringSelection Expression 
- The route response selection expression for the route. Supported only for WebSocket APIs.
- Target string
- The target for the route.
- ApiId string
- The API identifier.
- RouteKey string
- 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.
- ApiKey boolRequired 
- Specifies whether an API key is required for the route. Supported only for WebSocket APIs.
- []string
- The authorization scopes supported by this route.
- string
- The authorization type for the route. For WebSocket APIs, valid values are NONEfor open access,AWS_IAMfor using AWS IAM permissions, andCUSTOMfor using a Lambda authorizer. For HTTP APIs, valid values areNONEfor open access,JWTfor using JSON Web Tokens,AWS_IAMfor using AWS IAM permissions, andCUSTOMfor using a Lambda authorizer.
- string
- The identifier of the Authorizerresource to be associated with this route. The authorizer identifier is generated by API Gateway when you created the authorizer.
- ModelSelection stringExpression 
- The model selection expression for the route. Supported only for WebSocket APIs.
- OperationName string
- The operation name for the route.
- RequestModels interface{}
- The request models for the route. Supported only for WebSocket APIs. - Search the CloudFormation User Guide for - AWS::ApiGatewayV2::Routefor more information about the expected schema for this property.
- RequestParameters []RouteParameter Constraints Args 
- The request parameters for the route. Supported only for WebSocket APIs.
- RouteResponse stringSelection Expression 
- The route response selection expression for the route. Supported only for WebSocket APIs.
- Target string
- The target for the route.
- apiId String
- The API identifier.
- routeKey String
- 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.
- apiKey BooleanRequired 
- Specifies whether an API key is required for the route. Supported only for WebSocket APIs.
- List<String>
- The authorization scopes supported by this route.
- String
- The authorization type for the route. For WebSocket APIs, valid values are NONEfor open access,AWS_IAMfor using AWS IAM permissions, andCUSTOMfor using a Lambda authorizer. For HTTP APIs, valid values areNONEfor open access,JWTfor using JSON Web Tokens,AWS_IAMfor using AWS IAM permissions, andCUSTOMfor using a Lambda authorizer.
- String
- The identifier of the Authorizerresource to be associated with this route. The authorizer identifier is generated by API Gateway when you created the authorizer.
- modelSelection StringExpression 
- The model selection expression for the route. Supported only for WebSocket APIs.
- operationName String
- The operation name for the route.
- requestModels Object
- The request models for the route. Supported only for WebSocket APIs. - Search the CloudFormation User Guide for - AWS::ApiGatewayV2::Routefor more information about the expected schema for this property.
- requestParameters List<RouteParameter Constraints> 
- The request parameters for the route. Supported only for WebSocket APIs.
- routeResponse StringSelection Expression 
- The route response selection expression for the route. Supported only for WebSocket APIs.
- target String
- The target for the route.
- apiId string
- The API identifier.
- routeKey string
- 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.
- apiKey booleanRequired 
- Specifies whether an API key is required for the route. Supported only for WebSocket APIs.
- string[]
- The authorization scopes supported by this route.
- string
- The authorization type for the route. For WebSocket APIs, valid values are NONEfor open access,AWS_IAMfor using AWS IAM permissions, andCUSTOMfor using a Lambda authorizer. For HTTP APIs, valid values areNONEfor open access,JWTfor using JSON Web Tokens,AWS_IAMfor using AWS IAM permissions, andCUSTOMfor using a Lambda authorizer.
- string
- The identifier of the Authorizerresource to be associated with this route. The authorizer identifier is generated by API Gateway when you created the authorizer.
- modelSelection stringExpression 
- The model selection expression for the route. Supported only for WebSocket APIs.
- operationName string
- The operation name for the route.
- requestModels any
- The request models for the route. Supported only for WebSocket APIs. - Search the CloudFormation User Guide for - AWS::ApiGatewayV2::Routefor more information about the expected schema for this property.
- requestParameters RouteParameter Constraints[] 
- The request parameters for the route. Supported only for WebSocket APIs.
- routeResponse stringSelection Expression 
- The route response selection expression for the route. Supported only for WebSocket APIs.
- target string
- The target for the route.
- 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_ boolrequired 
- Specifies whether an API key is required for the route. Supported only for WebSocket APIs.
- Sequence[str]
- The authorization scopes supported by this route.
- str
- The authorization type for the route. For WebSocket APIs, valid values are NONEfor open access,AWS_IAMfor using AWS IAM permissions, andCUSTOMfor using a Lambda authorizer. For HTTP APIs, valid values areNONEfor open access,JWTfor using JSON Web Tokens,AWS_IAMfor using AWS IAM permissions, andCUSTOMfor using a Lambda authorizer.
- str
- The identifier of the Authorizerresource to be associated with this route. The authorizer identifier is generated by API Gateway when you created the authorizer.
- model_selection_ strexpression 
- The model selection expression for the route. Supported only for WebSocket APIs.
- operation_name str
- The operation name for the route.
- request_models Any
- The request models for the route. Supported only for WebSocket APIs. - Search the CloudFormation User Guide for - AWS::ApiGatewayV2::Routefor more information about the expected schema for this property.
- request_parameters Sequence[RouteParameter Constraints Args] 
- The request parameters for the route. Supported only for WebSocket APIs.
- route_response_ strselection_ expression 
- The route response selection expression for the route. Supported only for WebSocket APIs.
- target str
- The target for the route.
- apiId String
- The API identifier.
- routeKey String
- 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.
- apiKey BooleanRequired 
- Specifies whether an API key is required for the route. Supported only for WebSocket APIs.
- List<String>
- The authorization scopes supported by this route.
- String
- The authorization type for the route. For WebSocket APIs, valid values are NONEfor open access,AWS_IAMfor using AWS IAM permissions, andCUSTOMfor using a Lambda authorizer. For HTTP APIs, valid values areNONEfor open access,JWTfor using JSON Web Tokens,AWS_IAMfor using AWS IAM permissions, andCUSTOMfor using a Lambda authorizer.
- String
- The identifier of the Authorizerresource to be associated with this route. The authorizer identifier is generated by API Gateway when you created the authorizer.
- modelSelection StringExpression 
- The model selection expression for the route. Supported only for WebSocket APIs.
- operationName String
- The operation name for the route.
- requestModels Any
- The request models for the route. Supported only for WebSocket APIs. - Search the CloudFormation User Guide for - AWS::ApiGatewayV2::Routefor more information about the expected schema for this property.
- requestParameters List<Property Map>
- The request parameters for the route. Supported only for WebSocket APIs.
- routeResponse StringSelection Expression 
- The route response selection expression for the route. Supported only for WebSocket APIs.
- target String
- The target for the route.
Outputs
All input properties are implicitly available as output properties. Additionally, the Route resource produces the following output properties:
Supporting Types
RouteParameterConstraints, RouteParameterConstraintsArgs      
- Required bool
- Required bool
- required Boolean
- required boolean
- required bool
- required Boolean
Package Details
- Repository
- AWS Native pulumi/pulumi-aws-native
- License
- Apache-2.0
We recommend new projects start with resources from the AWS provider.