1. Packages
  2. AWS Cloud Control
  3. API Docs
  4. apigatewayv2
  5. getRoute

We recommend new projects start with resources from the AWS provider.

AWS Cloud Control v1.26.0 published on Wednesday, Mar 12, 2025 by Pulumi

aws-native.apigatewayv2.getRoute

Explore with Pulumi AI

We recommend new projects start with resources from the AWS provider.

AWS Cloud Control v1.26.0 published on Wednesday, Mar 12, 2025 by Pulumi

The AWS::ApiGatewayV2::Route resource creates a route for an API.

Using getRoute

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getRoute(args: GetRouteArgs, opts?: InvokeOptions): Promise<GetRouteResult>
function getRouteOutput(args: GetRouteOutputArgs, opts?: InvokeOptions): Output<GetRouteResult>
Copy
def get_route(api_id: Optional[str] = None,
              route_id: Optional[str] = None,
              opts: Optional[InvokeOptions] = None) -> GetRouteResult
def get_route_output(api_id: Optional[pulumi.Input[str]] = None,
              route_id: Optional[pulumi.Input[str]] = None,
              opts: Optional[InvokeOptions] = None) -> Output[GetRouteResult]
Copy
func LookupRoute(ctx *Context, args *LookupRouteArgs, opts ...InvokeOption) (*LookupRouteResult, error)
func LookupRouteOutput(ctx *Context, args *LookupRouteOutputArgs, opts ...InvokeOption) LookupRouteResultOutput
Copy

> Note: This function is named LookupRoute in the Go SDK.

public static class GetRoute 
{
    public static Task<GetRouteResult> InvokeAsync(GetRouteArgs args, InvokeOptions? opts = null)
    public static Output<GetRouteResult> Invoke(GetRouteInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetRouteResult> getRoute(GetRouteArgs args, InvokeOptions options)
public static Output<GetRouteResult> getRoute(GetRouteArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: aws-native:apigatewayv2:getRoute
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

ApiId This property is required. string
The API identifier.
RouteId This property is required. string
The route ID.
ApiId This property is required. string
The API identifier.
RouteId This property is required. string
The route ID.
apiId This property is required. String
The API identifier.
routeId This property is required. String
The route ID.
apiId This property is required. string
The API identifier.
routeId This property is required. string
The route ID.
api_id This property is required. str
The API identifier.
route_id This property is required. str
The route ID.
apiId This property is required. String
The API identifier.
routeId This property is required. String
The route ID.

getRoute Result

The following output properties are available:

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.
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.

RouteId string
The route ID.
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.
RouteResponseSelectionExpression string
The route response selection expression for the route. Supported only for WebSocket APIs.
Target string
The target for the route.
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.
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.

RouteId string
The route ID.
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.
RouteResponseSelectionExpression string
The route response selection expression for the route. Supported only for WebSocket APIs.
Target string
The target for the route.
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.
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.

routeId String
The route ID.
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.
routeResponseSelectionExpression String
The route response selection expression for the route. Supported only for WebSocket APIs.
target String
The target for the route.
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.
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.

routeId string
The route ID.
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.
routeResponseSelectionExpression string
The route response selection expression for the route. Supported only for WebSocket APIs.
target string
The target for the route.
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.
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.

route_id str
The route ID.
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.
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.
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.
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.

routeId String
The route ID.
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.
routeResponseSelectionExpression String
The route response selection expression for the route. Supported only for WebSocket APIs.
target String
The target for the route.

Package Details

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

We recommend new projects start with resources from the AWS provider.

AWS Cloud Control v1.26.0 published on Wednesday, Mar 12, 2025 by Pulumi