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

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

AWS Cloud Control v1.29.0 published on Thursday, Jun 5, 2025 by Pulumi

aws-native.apigatewayv2.getRoutingRule

Explore with Pulumi AI

aws-native logo

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

AWS Cloud Control v1.29.0 published on Thursday, Jun 5, 2025 by Pulumi

    Schema for AWS::ApiGatewayV2::RoutingRule

    Using getRoutingRule

    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 getRoutingRule(args: GetRoutingRuleArgs, opts?: InvokeOptions): Promise<GetRoutingRuleResult>
    function getRoutingRuleOutput(args: GetRoutingRuleOutputArgs, opts?: InvokeOptions): Output<GetRoutingRuleResult>
    def get_routing_rule(routing_rule_arn: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetRoutingRuleResult
    def get_routing_rule_output(routing_rule_arn: Optional[pulumi.Input[str]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetRoutingRuleResult]
    func LookupRoutingRule(ctx *Context, args *LookupRoutingRuleArgs, opts ...InvokeOption) (*LookupRoutingRuleResult, error)
    func LookupRoutingRuleOutput(ctx *Context, args *LookupRoutingRuleOutputArgs, opts ...InvokeOption) LookupRoutingRuleResultOutput

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

    public static class GetRoutingRule 
    {
        public static Task<GetRoutingRuleResult> InvokeAsync(GetRoutingRuleArgs args, InvokeOptions? opts = null)
        public static Output<GetRoutingRuleResult> Invoke(GetRoutingRuleInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetRoutingRuleResult> getRoutingRule(GetRoutingRuleArgs args, InvokeOptions options)
    public static Output<GetRoutingRuleResult> getRoutingRule(GetRoutingRuleArgs args, InvokeOptions options)
    
    fn::invoke:
      function: aws-native:apigatewayv2:getRoutingRule
      arguments:
        # arguments dictionary

    The following arguments are supported:

    RoutingRuleArn string
    Amazon Resource Name (ARN) of the resource.
    RoutingRuleArn string
    Amazon Resource Name (ARN) of the resource.
    routingRuleArn String
    Amazon Resource Name (ARN) of the resource.
    routingRuleArn string
    Amazon Resource Name (ARN) of the resource.
    routing_rule_arn str
    Amazon Resource Name (ARN) of the resource.
    routingRuleArn String
    Amazon Resource Name (ARN) of the resource.

    getRoutingRule Result

    The following output properties are available:

    Actions List<Pulumi.AwsNative.ApiGatewayV2.Outputs.RoutingRuleAction>
    The resulting action based on matching a routing rules condition. Only InvokeApi is supported.
    Conditions List<Pulumi.AwsNative.ApiGatewayV2.Outputs.RoutingRuleCondition>
    The conditions of the routing rule.
    Priority int
    The order in which API Gateway evaluates a rule. Priority is evaluated from the lowest value to the highest value. Rules can't have the same priority. Priority values 1-1,000,000 are supported.
    RoutingRuleArn string
    Amazon Resource Name (ARN) of the resource.
    RoutingRuleId string
    RoutingRule Id generated by service
    Actions []RoutingRuleAction
    The resulting action based on matching a routing rules condition. Only InvokeApi is supported.
    Conditions []RoutingRuleCondition
    The conditions of the routing rule.
    Priority int
    The order in which API Gateway evaluates a rule. Priority is evaluated from the lowest value to the highest value. Rules can't have the same priority. Priority values 1-1,000,000 are supported.
    RoutingRuleArn string
    Amazon Resource Name (ARN) of the resource.
    RoutingRuleId string
    RoutingRule Id generated by service
    actions List<RoutingRuleAction>
    The resulting action based on matching a routing rules condition. Only InvokeApi is supported.
    conditions List<RoutingRuleCondition>
    The conditions of the routing rule.
    priority Integer
    The order in which API Gateway evaluates a rule. Priority is evaluated from the lowest value to the highest value. Rules can't have the same priority. Priority values 1-1,000,000 are supported.
    routingRuleArn String
    Amazon Resource Name (ARN) of the resource.
    routingRuleId String
    RoutingRule Id generated by service
    actions RoutingRuleAction[]
    The resulting action based on matching a routing rules condition. Only InvokeApi is supported.
    conditions RoutingRuleCondition[]
    The conditions of the routing rule.
    priority number
    The order in which API Gateway evaluates a rule. Priority is evaluated from the lowest value to the highest value. Rules can't have the same priority. Priority values 1-1,000,000 are supported.
    routingRuleArn string
    Amazon Resource Name (ARN) of the resource.
    routingRuleId string
    RoutingRule Id generated by service
    actions Sequence[RoutingRuleAction]
    The resulting action based on matching a routing rules condition. Only InvokeApi is supported.
    conditions Sequence[RoutingRuleCondition]
    The conditions of the routing rule.
    priority int
    The order in which API Gateway evaluates a rule. Priority is evaluated from the lowest value to the highest value. Rules can't have the same priority. Priority values 1-1,000,000 are supported.
    routing_rule_arn str
    Amazon Resource Name (ARN) of the resource.
    routing_rule_id str
    RoutingRule Id generated by service
    actions List<Property Map>
    The resulting action based on matching a routing rules condition. Only InvokeApi is supported.
    conditions List<Property Map>
    The conditions of the routing rule.
    priority Number
    The order in which API Gateway evaluates a rule. Priority is evaluated from the lowest value to the highest value. Rules can't have the same priority. Priority values 1-1,000,000 are supported.
    routingRuleArn String
    Amazon Resource Name (ARN) of the resource.
    routingRuleId String
    RoutingRule Id generated by service

    Supporting Types

    RoutingRuleAction

    InvokeApi RoutingRuleActionInvokeApi
    Represents an InvokeApi action.
    invokeApi RoutingRuleActionInvokeApi
    Represents an InvokeApi action.
    invokeApi RoutingRuleActionInvokeApi
    Represents an InvokeApi action.
    invoke_api RoutingRuleActionInvokeApi
    Represents an InvokeApi action.
    invokeApi Property Map
    Represents an InvokeApi action.

    RoutingRuleActionInvokeApi

    ApiId string
    The API identifier of the target API.
    Stage string
    The name of the target stage.
    StripBasePath bool
    The strip base path setting. When true, API Gateway strips the incoming matched base path when forwarding the request to the target API.
    ApiId string
    The API identifier of the target API.
    Stage string
    The name of the target stage.
    StripBasePath bool
    The strip base path setting. When true, API Gateway strips the incoming matched base path when forwarding the request to the target API.
    apiId String
    The API identifier of the target API.
    stage String
    The name of the target stage.
    stripBasePath Boolean
    The strip base path setting. When true, API Gateway strips the incoming matched base path when forwarding the request to the target API.
    apiId string
    The API identifier of the target API.
    stage string
    The name of the target stage.
    stripBasePath boolean
    The strip base path setting. When true, API Gateway strips the incoming matched base path when forwarding the request to the target API.
    api_id str
    The API identifier of the target API.
    stage str
    The name of the target stage.
    strip_base_path bool
    The strip base path setting. When true, API Gateway strips the incoming matched base path when forwarding the request to the target API.
    apiId String
    The API identifier of the target API.
    stage String
    The name of the target stage.
    stripBasePath Boolean
    The strip base path setting. When true, API Gateway strips the incoming matched base path when forwarding the request to the target API.

    RoutingRuleCondition

    MatchBasePaths RoutingRuleMatchBasePaths
    The base path to be matched.
    MatchHeaders RoutingRuleMatchHeaders
    The headers to be matched.
    matchBasePaths RoutingRuleMatchBasePaths
    The base path to be matched.
    matchHeaders RoutingRuleMatchHeaders
    The headers to be matched.
    matchBasePaths RoutingRuleMatchBasePaths
    The base path to be matched.
    matchHeaders RoutingRuleMatchHeaders
    The headers to be matched.
    match_base_paths RoutingRuleMatchBasePaths
    The base path to be matched.
    match_headers RoutingRuleMatchHeaders
    The headers to be matched.
    matchBasePaths Property Map
    The base path to be matched.
    matchHeaders Property Map
    The headers to be matched.

    RoutingRuleMatchBasePaths

    AnyOf List<string>
    The string of the case sensitive base path to be matched.
    AnyOf []string
    The string of the case sensitive base path to be matched.
    anyOf List<String>
    The string of the case sensitive base path to be matched.
    anyOf string[]
    The string of the case sensitive base path to be matched.
    any_of Sequence[str]
    The string of the case sensitive base path to be matched.
    anyOf List<String>
    The string of the case sensitive base path to be matched.

    RoutingRuleMatchHeaderValue

    Header string
    The case insensitive header name to be matched. The header name must be less than 40 characters and the only allowed characters are a-z , A-Z , 0-9 , and the following special characters: *?-!#$%&'.^_|~.` .
    ValueGlob string
    The case sensitive header glob value to be matched against entire header value. The header glob value must be less than 128 characters and the only allowed characters are a-z , A-Z , 0-9 , and the following special characters: *?-!#$%&'.^_|~. Wildcard matching is supported for header glob values but must be forprefix-match,suffix-match, orinfix-match` .
    Header string
    The case insensitive header name to be matched. The header name must be less than 40 characters and the only allowed characters are a-z , A-Z , 0-9 , and the following special characters: *?-!#$%&'.^_|~.` .
    ValueGlob string
    The case sensitive header glob value to be matched against entire header value. The header glob value must be less than 128 characters and the only allowed characters are a-z , A-Z , 0-9 , and the following special characters: *?-!#$%&'.^_|~. Wildcard matching is supported for header glob values but must be forprefix-match,suffix-match, orinfix-match` .
    header String
    The case insensitive header name to be matched. The header name must be less than 40 characters and the only allowed characters are a-z , A-Z , 0-9 , and the following special characters: *?-!#$%&'.^_|~.` .
    valueGlob String
    The case sensitive header glob value to be matched against entire header value. The header glob value must be less than 128 characters and the only allowed characters are a-z , A-Z , 0-9 , and the following special characters: *?-!#$%&'.^_|~. Wildcard matching is supported for header glob values but must be forprefix-match,suffix-match, orinfix-match` .
    header string
    The case insensitive header name to be matched. The header name must be less than 40 characters and the only allowed characters are a-z , A-Z , 0-9 , and the following special characters: *?-!#$%&'.^_|~.` .
    valueGlob string
    The case sensitive header glob value to be matched against entire header value. The header glob value must be less than 128 characters and the only allowed characters are a-z , A-Z , 0-9 , and the following special characters: *?-!#$%&'.^_|~. Wildcard matching is supported for header glob values but must be forprefix-match,suffix-match, orinfix-match` .
    header str
    The case insensitive header name to be matched. The header name must be less than 40 characters and the only allowed characters are a-z , A-Z , 0-9 , and the following special characters: *?-!#$%&'.^_|~.` .
    value_glob str
    The case sensitive header glob value to be matched against entire header value. The header glob value must be less than 128 characters and the only allowed characters are a-z , A-Z , 0-9 , and the following special characters: *?-!#$%&'.^_|~. Wildcard matching is supported for header glob values but must be forprefix-match,suffix-match, orinfix-match` .
    header String
    The case insensitive header name to be matched. The header name must be less than 40 characters and the only allowed characters are a-z , A-Z , 0-9 , and the following special characters: *?-!#$%&'.^_|~.` .
    valueGlob String
    The case sensitive header glob value to be matched against entire header value. The header glob value must be less than 128 characters and the only allowed characters are a-z , A-Z , 0-9 , and the following special characters: *?-!#$%&'.^_|~. Wildcard matching is supported for header glob values but must be forprefix-match,suffix-match, orinfix-match` .

    RoutingRuleMatchHeaders

    AnyOf List<Pulumi.AwsNative.ApiGatewayV2.Inputs.RoutingRuleMatchHeaderValue>
    The header name and header value glob to be matched. The matchHeaders condition is matched if any of the header name and header value globs are matched.
    AnyOf []RoutingRuleMatchHeaderValue
    The header name and header value glob to be matched. The matchHeaders condition is matched if any of the header name and header value globs are matched.
    anyOf List<RoutingRuleMatchHeaderValue>
    The header name and header value glob to be matched. The matchHeaders condition is matched if any of the header name and header value globs are matched.
    anyOf RoutingRuleMatchHeaderValue[]
    The header name and header value glob to be matched. The matchHeaders condition is matched if any of the header name and header value globs are matched.
    any_of Sequence[RoutingRuleMatchHeaderValue]
    The header name and header value glob to be matched. The matchHeaders condition is matched if any of the header name and header value globs are matched.
    anyOf List<Property Map>
    The header name and header value glob to be matched. The matchHeaders condition is matched if any of the header name and header value globs are matched.

    Package Details

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

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

    AWS Cloud Control v1.29.0 published on Thursday, Jun 5, 2025 by Pulumi