1. Packages
  2. AWS Native
  3. API Docs
  4. apigatewayv2
  5. Route

AWS Native is in preview. AWS Classic is fully supported.

AWS Native v0.109.0 published on Wednesday, Jun 26, 2024 by Pulumi

aws-native.apigatewayv2.Route

Explore with Pulumi AI

aws-native logo

AWS Native is in preview. AWS Classic is fully supported.

AWS Native v0.109.0 published on Wednesday, Jun 26, 2024 by Pulumi

    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)
    public Route(String name, RouteArgs args)
    public Route(String name, RouteArgs args, CustomResourceOptions options)
    
    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

    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.
    ApiKeyRequired bool
    Specifies whether an API key is required for the route. Supported only for WebSocket APIs.
    AuthorizationScopes List<string>
    The authorization scopes supported by this route.
    AuthorizationType string
    The authorization type for the route. For WebSocket APIs, valid values are NONE for open access, AWS_IAM for using AWS IAM permissions, and CUSTOM for using a Lambda authorizer. For HTTP APIs, valid values are NONE for open access, JWT for using JSON Web Tokens, AWS_IAM for using AWS IAM permissions, and CUSTOM for using a Lambda authorizer.
    AuthorizerId 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.
    ModelSelectionExpression string
    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::Route for more information about the expected schema for this property.

    RequestParameters List<Pulumi.AwsNative.ApiGatewayV2.Inputs.RouteParameterConstraints>
    The request parameters for the route. Supported only for WebSocket APIs.
    RouteResponseSelectionExpression string
    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.
    ApiKeyRequired bool
    Specifies whether an API key is required for the route. Supported only for WebSocket APIs.
    AuthorizationScopes []string
    The authorization scopes supported by this route.
    AuthorizationType string
    The authorization type for the route. For WebSocket APIs, valid values are NONE for open access, AWS_IAM for using AWS IAM permissions, and CUSTOM for using a Lambda authorizer. For HTTP APIs, valid values are NONE for open access, JWT for using JSON Web Tokens, AWS_IAM for using AWS IAM permissions, and CUSTOM for using a Lambda authorizer.
    AuthorizerId 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.
    ModelSelectionExpression string
    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::Route for more information about the expected schema for this property.

    RequestParameters []RouteParameterConstraintsArgs
    The request parameters for the route. Supported only for WebSocket APIs.
    RouteResponseSelectionExpression string
    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.
    apiKeyRequired Boolean
    Specifies whether an API key is required for the route. Supported only for WebSocket APIs.
    authorizationScopes List<String>
    The authorization scopes supported by this route.
    authorizationType String
    The authorization type for the route. For WebSocket APIs, valid values are NONE for open access, AWS_IAM for using AWS IAM permissions, and CUSTOM for using a Lambda authorizer. For HTTP APIs, valid values are NONE for open access, JWT for using JSON Web Tokens, AWS_IAM for using AWS IAM permissions, and CUSTOM for using a Lambda authorizer.
    authorizerId 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.
    modelSelectionExpression String
    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::Route for more information about the expected schema for this property.

    requestParameters List<RouteParameterConstraints>
    The request parameters for the route. Supported only for WebSocket APIs.
    routeResponseSelectionExpression String
    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.
    apiKeyRequired boolean
    Specifies whether an API key is required for the route. Supported only for WebSocket APIs.
    authorizationScopes string[]
    The authorization scopes supported by this route.
    authorizationType string
    The authorization type for the route. For WebSocket APIs, valid values are NONE for open access, AWS_IAM for using AWS IAM permissions, and CUSTOM for using a Lambda authorizer. For HTTP APIs, valid values are NONE for open access, JWT for using JSON Web Tokens, AWS_IAM for using AWS IAM permissions, and CUSTOM for using a Lambda authorizer.
    authorizerId 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.
    modelSelectionExpression string
    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::Route for more information about the expected schema for this property.

    requestParameters RouteParameterConstraints[]
    The request parameters for the route. Supported only for WebSocket APIs.
    routeResponseSelectionExpression string
    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_required bool
    Specifies whether an API key is required for the route. Supported only for WebSocket APIs.
    authorization_scopes Sequence[str]
    The authorization scopes supported by this route.
    authorization_type str
    The authorization type for the route. For WebSocket APIs, valid values are NONE for open access, AWS_IAM for using AWS IAM permissions, and CUSTOM for using a Lambda authorizer. For HTTP APIs, valid values are NONE for open access, JWT for using JSON Web Tokens, AWS_IAM for using AWS IAM permissions, and CUSTOM for using a Lambda authorizer.
    authorizer_id 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_expression str
    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[RouteParameterConstraintsArgs]
    The request parameters for the route. Supported only for WebSocket APIs.
    route_response_selection_expression str
    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.
    apiKeyRequired Boolean
    Specifies whether an API key is required for the route. Supported only for WebSocket APIs.
    authorizationScopes List<String>
    The authorization scopes supported by this route.
    authorizationType String
    The authorization type for the route. For WebSocket APIs, valid values are NONE for open access, AWS_IAM for using AWS IAM permissions, and CUSTOM for using a Lambda authorizer. For HTTP APIs, valid values are NONE for open access, JWT for using JSON Web Tokens, AWS_IAM for using AWS IAM permissions, and CUSTOM for using a Lambda authorizer.
    authorizerId 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.
    modelSelectionExpression String
    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::Route for more information about the expected schema for this property.

    requestParameters List<Property Map>
    The request parameters for the route. Supported only for WebSocket APIs.
    routeResponseSelectionExpression String
    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:

    Id string
    The provider-assigned unique ID for this managed resource.
    RouteId string
    The route ID.
    Id string
    The provider-assigned unique ID for this managed resource.
    RouteId string
    The route ID.
    id String
    The provider-assigned unique ID for this managed resource.
    routeId String
    The route ID.
    id string
    The provider-assigned unique ID for this managed resource.
    routeId string
    The route ID.
    id str
    The provider-assigned unique ID for this managed resource.
    route_id str
    The route ID.
    id String
    The provider-assigned unique ID for this managed resource.
    routeId String
    The route ID.

    Supporting Types

    RouteParameterConstraints, RouteParameterConstraintsArgs

    required Boolean
    required boolean
    required Boolean

    Package Details

    Repository
    AWS Native pulumi/pulumi-aws-native
    License
    Apache-2.0
    aws-native logo

    AWS Native is in preview. AWS Classic is fully supported.

    AWS Native v0.109.0 published on Wednesday, Jun 26, 2024 by Pulumi