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

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

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

    Create RoutingRule Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new RoutingRule(name: string, args: RoutingRuleArgs, opts?: CustomResourceOptions);
    @overload
    def RoutingRule(resource_name: str,
                    args: RoutingRuleArgs,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def RoutingRule(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    actions: Optional[Sequence[RoutingRuleActionArgs]] = None,
                    conditions: Optional[Sequence[RoutingRuleConditionArgs]] = None,
                    domain_name_arn: Optional[str] = None,
                    priority: Optional[int] = None)
    func NewRoutingRule(ctx *Context, name string, args RoutingRuleArgs, opts ...ResourceOption) (*RoutingRule, error)
    public RoutingRule(string name, RoutingRuleArgs args, CustomResourceOptions? opts = null)
    public RoutingRule(String name, RoutingRuleArgs args)
    public RoutingRule(String name, RoutingRuleArgs args, CustomResourceOptions options)
    
    type: aws-native:apigatewayv2:RoutingRule
    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 RoutingRuleArgs
    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 RoutingRuleArgs
    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 RoutingRuleArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args RoutingRuleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args RoutingRuleArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    RoutingRule 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 RoutingRule resource accepts the following input properties:

    Actions List<Pulumi.AwsNative.ApiGatewayV2.Inputs.RoutingRuleAction>
    The resulting action based on matching a routing rules condition. Only InvokeApi is supported.
    Conditions List<Pulumi.AwsNative.ApiGatewayV2.Inputs.RoutingRuleCondition>
    The conditions of the routing rule.
    DomainNameArn string
    The amazon resource name (ARN) of the domain name resource.
    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.
    Actions []RoutingRuleActionArgs
    The resulting action based on matching a routing rules condition. Only InvokeApi is supported.
    Conditions []RoutingRuleConditionArgs
    The conditions of the routing rule.
    DomainNameArn string
    The amazon resource name (ARN) of the domain name resource.
    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.
    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.
    domainNameArn String
    The amazon resource name (ARN) of the domain name resource.
    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.
    actions RoutingRuleAction[]
    The resulting action based on matching a routing rules condition. Only InvokeApi is supported.
    conditions RoutingRuleCondition[]
    The conditions of the routing rule.
    domainNameArn string
    The amazon resource name (ARN) of the domain name resource.
    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.
    actions Sequence[RoutingRuleActionArgs]
    The resulting action based on matching a routing rules condition. Only InvokeApi is supported.
    conditions Sequence[RoutingRuleConditionArgs]
    The conditions of the routing rule.
    domain_name_arn str
    The amazon resource name (ARN) of the domain name resource.
    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.
    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.
    domainNameArn String
    The amazon resource name (ARN) of the domain name resource.
    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.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the RoutingRule resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    RoutingRuleArn string
    Amazon Resource Name (ARN) of the resource.
    RoutingRuleId string
    RoutingRule Id generated by service
    Id string
    The provider-assigned unique ID for this managed resource.
    RoutingRuleArn string
    Amazon Resource Name (ARN) of the resource.
    RoutingRuleId string
    RoutingRule Id generated by service
    id String
    The provider-assigned unique ID for this managed resource.
    routingRuleArn String
    Amazon Resource Name (ARN) of the resource.
    routingRuleId String
    RoutingRule Id generated by service
    id string
    The provider-assigned unique ID for this managed resource.
    routingRuleArn string
    Amazon Resource Name (ARN) of the resource.
    routingRuleId string
    RoutingRule Id generated by service
    id str
    The provider-assigned unique ID for this managed resource.
    routing_rule_arn str
    Amazon Resource Name (ARN) of the resource.
    routing_rule_id str
    RoutingRule Id generated by service
    id String
    The provider-assigned unique ID for this managed resource.
    routingRuleArn String
    Amazon Resource Name (ARN) of the resource.
    routingRuleId String
    RoutingRule Id generated by service

    Supporting Types

    RoutingRuleAction, RoutingRuleActionArgs

    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, RoutingRuleActionInvokeApiArgs

    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, RoutingRuleConditionArgs

    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, RoutingRuleMatchBasePathsArgs

    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, RoutingRuleMatchHeaderValueArgs

    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, RoutingRuleMatchHeadersArgs

    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