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:
- Api
Id string - The API identifier.
- Route
Key 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
. - Api
Key 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
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. - string
- 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 stringExpression - The model selection expression for the route. Supported only for WebSocket APIs.
- Operation
Name string - The operation name for the route.
- Request
Models object The request models for the route. Supported only for WebSocket APIs.
Search the CloudFormation User Guide for
AWS::ApiGatewayV2::Route
for more information about the expected schema for this property.- Request
Parameters List<Pulumi.Aws Native. Api Gateway V2. Inputs. Route Parameter Constraints> - The request parameters for the route. Supported only for WebSocket APIs.
- Route
Response stringSelection Expression - The route response selection expression for the route. Supported only for WebSocket APIs.
- Target string
- The target for the route.
- Api
Id string - The API identifier.
- Route
Key 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
. - Api
Key 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
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. - string
- 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 stringExpression - The model selection expression for the route. Supported only for WebSocket APIs.
- Operation
Name string - The operation name for the route.
- Request
Models interface{} The request models for the route. Supported only for WebSocket APIs.
Search the CloudFormation User Guide for
AWS::ApiGatewayV2::Route
for more information about the expected schema for this property.- Request
Parameters []RouteParameter Constraints Args - The request parameters for the route. Supported only for WebSocket APIs.
- Route
Response stringSelection Expression - The route response selection expression for the route. Supported only for WebSocket APIs.
- Target string
- The target for the route.
- api
Id String - The API identifier.
- route
Key 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
. - api
Key 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
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. - String
- 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 StringExpression - The model selection expression for the route. Supported only for WebSocket APIs.
- operation
Name String - The operation name for the route.
- request
Models Object The request models for the route. Supported only for WebSocket APIs.
Search the CloudFormation User Guide for
AWS::ApiGatewayV2::Route
for more information about the expected schema for this property.- request
Parameters List<RouteParameter Constraints> - The request parameters for the route. Supported only for WebSocket APIs.
- route
Response StringSelection Expression - The route response selection expression for the route. Supported only for WebSocket APIs.
- target String
- The target for the route.
- api
Id string - The API identifier.
- route
Key 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
. - api
Key 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
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. - string
- 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 stringExpression - The model selection expression for the route. Supported only for WebSocket APIs.
- operation
Name string - 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::Route
for more information about the expected schema for this property.- request
Parameters RouteParameter Constraints[] - The request parameters for the route. Supported only for WebSocket APIs.
- route
Response 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
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. - str
- 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_ 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::Route
for 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.
- api
Id String - The API identifier.
- route
Key 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
. - api
Key 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
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. - String
- 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 StringExpression - The model selection expression for the route. Supported only for WebSocket APIs.
- operation
Name String - 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::Route
for more information about the expected schema for this property.- request
Parameters List<Property Map> - The request parameters for the route. Supported only for WebSocket APIs.
- route
Response 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.