1. Packages
  2. AWS
  3. API Docs
  4. apigatewayv2
  5. RoutingRule
AWS v7.19.0 published on Friday, Feb 6, 2026 by Pulumi
aws logo
AWS v7.19.0 published on Friday, Feb 6, 2026 by Pulumi

    Resource for managing an AWS API Gateway V2 Routing Rule.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.apigatewayv2.RoutingRule("example", {
        domainName: "test.example.com",
        conditions: [{
            matchHeaders: {
                anyOf: {
                    header: "X-Example-Header",
                    valueGlob: "example-value-*",
                },
            },
            matchBasePaths: {
                anyOfs: [
                    "example-path",
                    "another-path",
                ],
            },
        }],
        actions: [{
            invokeApi: {
                apiId: "example-api-id",
                stage: "example-stage",
                stripBasePath: true,
            },
        }],
        priority: 1,
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.apigatewayv2.RoutingRule("example",
        domain_name="test.example.com",
        conditions=[{
            "match_headers": {
                "any_of": {
                    "header": "X-Example-Header",
                    "value_glob": "example-value-*",
                },
            },
            "match_base_paths": {
                "any_ofs": [
                    "example-path",
                    "another-path",
                ],
            },
        }],
        actions=[{
            "invoke_api": {
                "api_id": "example-api-id",
                "stage": "example-stage",
                "strip_base_path": True,
            },
        }],
        priority=1)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/apigatewayv2"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := apigatewayv2.NewRoutingRule(ctx, "example", &apigatewayv2.RoutingRuleArgs{
    			DomainName: pulumi.String("test.example.com"),
    			Conditions: apigatewayv2.RoutingRuleConditionArray{
    				&apigatewayv2.RoutingRuleConditionArgs{
    					MatchHeaders: &apigatewayv2.RoutingRuleConditionMatchHeadersArgs{
    						AnyOf: &apigatewayv2.RoutingRuleConditionMatchHeadersAnyOfArgs{
    							Header:    pulumi.String("X-Example-Header"),
    							ValueGlob: pulumi.String("example-value-*"),
    						},
    					},
    					MatchBasePaths: &apigatewayv2.RoutingRuleConditionMatchBasePathsArgs{
    						AnyOfs: pulumi.StringArray{
    							pulumi.String("example-path"),
    							pulumi.String("another-path"),
    						},
    					},
    				},
    			},
    			Actions: apigatewayv2.RoutingRuleActionArray{
    				&apigatewayv2.RoutingRuleActionArgs{
    					InvokeApi: &apigatewayv2.RoutingRuleActionInvokeApiArgs{
    						ApiId:         pulumi.String("example-api-id"),
    						Stage:         pulumi.String("example-stage"),
    						StripBasePath: pulumi.Bool(true),
    					},
    				},
    			},
    			Priority: pulumi.Int(1),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Aws.ApiGatewayV2.RoutingRule("example", new()
        {
            DomainName = "test.example.com",
            Conditions = new[]
            {
                new Aws.ApiGatewayV2.Inputs.RoutingRuleConditionArgs
                {
                    MatchHeaders = new Aws.ApiGatewayV2.Inputs.RoutingRuleConditionMatchHeadersArgs
                    {
                        AnyOf = new Aws.ApiGatewayV2.Inputs.RoutingRuleConditionMatchHeadersAnyOfArgs
                        {
                            Header = "X-Example-Header",
                            ValueGlob = "example-value-*",
                        },
                    },
                    MatchBasePaths = new Aws.ApiGatewayV2.Inputs.RoutingRuleConditionMatchBasePathsArgs
                    {
                        AnyOfs = new[]
                        {
                            "example-path",
                            "another-path",
                        },
                    },
                },
            },
            Actions = new[]
            {
                new Aws.ApiGatewayV2.Inputs.RoutingRuleActionArgs
                {
                    InvokeApi = new Aws.ApiGatewayV2.Inputs.RoutingRuleActionInvokeApiArgs
                    {
                        ApiId = "example-api-id",
                        Stage = "example-stage",
                        StripBasePath = true,
                    },
                },
            },
            Priority = 1,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.apigatewayv2.RoutingRule;
    import com.pulumi.aws.apigatewayv2.RoutingRuleArgs;
    import com.pulumi.aws.apigatewayv2.inputs.RoutingRuleConditionArgs;
    import com.pulumi.aws.apigatewayv2.inputs.RoutingRuleConditionMatchHeadersArgs;
    import com.pulumi.aws.apigatewayv2.inputs.RoutingRuleConditionMatchHeadersAnyOfArgs;
    import com.pulumi.aws.apigatewayv2.inputs.RoutingRuleConditionMatchBasePathsArgs;
    import com.pulumi.aws.apigatewayv2.inputs.RoutingRuleActionArgs;
    import com.pulumi.aws.apigatewayv2.inputs.RoutingRuleActionInvokeApiArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var example = new RoutingRule("example", RoutingRuleArgs.builder()
                .domainName("test.example.com")
                .conditions(RoutingRuleConditionArgs.builder()
                    .matchHeaders(RoutingRuleConditionMatchHeadersArgs.builder()
                        .anyOf(RoutingRuleConditionMatchHeadersAnyOfArgs.builder()
                            .header("X-Example-Header")
                            .valueGlob("example-value-*")
                            .build())
                        .build())
                    .matchBasePaths(RoutingRuleConditionMatchBasePathsArgs.builder()
                        .anyOfs(                    
                            "example-path",
                            "another-path")
                        .build())
                    .build())
                .actions(RoutingRuleActionArgs.builder()
                    .invokeApi(RoutingRuleActionInvokeApiArgs.builder()
                        .apiId("example-api-id")
                        .stage("example-stage")
                        .stripBasePath(true)
                        .build())
                    .build())
                .priority(1)
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:apigatewayv2:RoutingRule
        properties:
          domainName: test.example.com
          conditions:
            - matchHeaders:
                anyOf:
                  header: X-Example-Header
                  valueGlob: example-value-*
              matchBasePaths:
                anyOfs:
                  - example-path
                  - another-path
          actions:
            - invokeApi:
                apiId: example-api-id
                stage: example-stage
                stripBasePath: true
          priority: 1
    

    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: Optional[str] = None,
                    priority: Optional[int] = None,
                    region: Optional[str] = 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: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.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var routingRuleResource = new Aws.ApiGatewayV2.RoutingRule("routingRuleResource", new()
    {
        Actions = new[]
        {
            new Aws.ApiGatewayV2.Inputs.RoutingRuleActionArgs
            {
                InvokeApi = new Aws.ApiGatewayV2.Inputs.RoutingRuleActionInvokeApiArgs
                {
                    ApiId = "string",
                    Stage = "string",
                    StripBasePath = false,
                },
            },
        },
        Conditions = new[]
        {
            new Aws.ApiGatewayV2.Inputs.RoutingRuleConditionArgs
            {
                MatchBasePaths = new Aws.ApiGatewayV2.Inputs.RoutingRuleConditionMatchBasePathsArgs
                {
                    AnyOfs = new[]
                    {
                        "string",
                    },
                },
                MatchHeaders = new Aws.ApiGatewayV2.Inputs.RoutingRuleConditionMatchHeadersArgs
                {
                    AnyOf = new Aws.ApiGatewayV2.Inputs.RoutingRuleConditionMatchHeadersAnyOfArgs
                    {
                        Header = "string",
                        ValueGlob = "string",
                    },
                },
            },
        },
        DomainName = "string",
        Priority = 0,
        Region = "string",
    });
    
    example, err := apigatewayv2.NewRoutingRule(ctx, "routingRuleResource", &apigatewayv2.RoutingRuleArgs{
    	Actions: apigatewayv2.RoutingRuleActionArray{
    		&apigatewayv2.RoutingRuleActionArgs{
    			InvokeApi: &apigatewayv2.RoutingRuleActionInvokeApiArgs{
    				ApiId:         pulumi.String("string"),
    				Stage:         pulumi.String("string"),
    				StripBasePath: pulumi.Bool(false),
    			},
    		},
    	},
    	Conditions: apigatewayv2.RoutingRuleConditionArray{
    		&apigatewayv2.RoutingRuleConditionArgs{
    			MatchBasePaths: &apigatewayv2.RoutingRuleConditionMatchBasePathsArgs{
    				AnyOfs: pulumi.StringArray{
    					pulumi.String("string"),
    				},
    			},
    			MatchHeaders: &apigatewayv2.RoutingRuleConditionMatchHeadersArgs{
    				AnyOf: &apigatewayv2.RoutingRuleConditionMatchHeadersAnyOfArgs{
    					Header:    pulumi.String("string"),
    					ValueGlob: pulumi.String("string"),
    				},
    			},
    		},
    	},
    	DomainName: pulumi.String("string"),
    	Priority:   pulumi.Int(0),
    	Region:     pulumi.String("string"),
    })
    
    var routingRuleResource = new RoutingRule("routingRuleResource", RoutingRuleArgs.builder()
        .actions(RoutingRuleActionArgs.builder()
            .invokeApi(RoutingRuleActionInvokeApiArgs.builder()
                .apiId("string")
                .stage("string")
                .stripBasePath(false)
                .build())
            .build())
        .conditions(RoutingRuleConditionArgs.builder()
            .matchBasePaths(RoutingRuleConditionMatchBasePathsArgs.builder()
                .anyOfs("string")
                .build())
            .matchHeaders(RoutingRuleConditionMatchHeadersArgs.builder()
                .anyOf(RoutingRuleConditionMatchHeadersAnyOfArgs.builder()
                    .header("string")
                    .valueGlob("string")
                    .build())
                .build())
            .build())
        .domainName("string")
        .priority(0)
        .region("string")
        .build());
    
    routing_rule_resource = aws.apigatewayv2.RoutingRule("routingRuleResource",
        actions=[{
            "invoke_api": {
                "api_id": "string",
                "stage": "string",
                "strip_base_path": False,
            },
        }],
        conditions=[{
            "match_base_paths": {
                "any_ofs": ["string"],
            },
            "match_headers": {
                "any_of": {
                    "header": "string",
                    "value_glob": "string",
                },
            },
        }],
        domain_name="string",
        priority=0,
        region="string")
    
    const routingRuleResource = new aws.apigatewayv2.RoutingRule("routingRuleResource", {
        actions: [{
            invokeApi: {
                apiId: "string",
                stage: "string",
                stripBasePath: false,
            },
        }],
        conditions: [{
            matchBasePaths: {
                anyOfs: ["string"],
            },
            matchHeaders: {
                anyOf: {
                    header: "string",
                    valueGlob: "string",
                },
            },
        }],
        domainName: "string",
        priority: 0,
        region: "string",
    });
    
    type: aws:apigatewayv2:RoutingRule
    properties:
        actions:
            - invokeApi:
                apiId: string
                stage: string
                stripBasePath: false
        conditions:
            - matchBasePaths:
                anyOfs:
                    - string
              matchHeaders:
                anyOf:
                    header: string
                    valueGlob: string
        domainName: string
        priority: 0
        region: string
    

    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<RoutingRuleAction>
    Configuration of resulting action based on matching routing rules condition. See below.
    Conditions List<RoutingRuleCondition>
    Conditions configuration. See below.
    DomainName string

    Domain name. Must be between 1 and 512 characters in length.

    The following arguments are optional:

    Priority int
    The order of rule evaluation. Priority is evaluated from the lowest value to the highest value. Rules can't have the same priority. Value must be between 1 and 1,000,000.
    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    Actions []RoutingRuleActionArgs
    Configuration of resulting action based on matching routing rules condition. See below.
    Conditions []RoutingRuleConditionArgs
    Conditions configuration. See below.
    DomainName string

    Domain name. Must be between 1 and 512 characters in length.

    The following arguments are optional:

    Priority int
    The order of rule evaluation. Priority is evaluated from the lowest value to the highest value. Rules can't have the same priority. Value must be between 1 and 1,000,000.
    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    actions List<RoutingRuleAction>
    Configuration of resulting action based on matching routing rules condition. See below.
    conditions List<RoutingRuleCondition>
    Conditions configuration. See below.
    domainName String

    Domain name. Must be between 1 and 512 characters in length.

    The following arguments are optional:

    priority Integer
    The order of rule evaluation. Priority is evaluated from the lowest value to the highest value. Rules can't have the same priority. Value must be between 1 and 1,000,000.
    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    actions RoutingRuleAction[]
    Configuration of resulting action based on matching routing rules condition. See below.
    conditions RoutingRuleCondition[]
    Conditions configuration. See below.
    domainName string

    Domain name. Must be between 1 and 512 characters in length.

    The following arguments are optional:

    priority number
    The order of rule evaluation. Priority is evaluated from the lowest value to the highest value. Rules can't have the same priority. Value must be between 1 and 1,000,000.
    region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    actions Sequence[RoutingRuleActionArgs]
    Configuration of resulting action based on matching routing rules condition. See below.
    conditions Sequence[RoutingRuleConditionArgs]
    Conditions configuration. See below.
    domain_name str

    Domain name. Must be between 1 and 512 characters in length.

    The following arguments are optional:

    priority int
    The order of rule evaluation. Priority is evaluated from the lowest value to the highest value. Rules can't have the same priority. Value must be between 1 and 1,000,000.
    region str
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    actions List<Property Map>
    Configuration of resulting action based on matching routing rules condition. See below.
    conditions List<Property Map>
    Conditions configuration. See below.
    domainName String

    Domain name. Must be between 1 and 512 characters in length.

    The following arguments are optional:

    priority Number
    The order of rule evaluation. Priority is evaluated from the lowest value to the highest value. Rules can't have the same priority. Value must be between 1 and 1,000,000.
    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.

    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
    ARN of the Routing Rule.
    RoutingRuleId string
    ID of the Routing Rule.
    Id string
    The provider-assigned unique ID for this managed resource.
    RoutingRuleArn string
    ARN of the Routing Rule.
    RoutingRuleId string
    ID of the Routing Rule.
    id String
    The provider-assigned unique ID for this managed resource.
    routingRuleArn String
    ARN of the Routing Rule.
    routingRuleId String
    ID of the Routing Rule.
    id string
    The provider-assigned unique ID for this managed resource.
    routingRuleArn string
    ARN of the Routing Rule.
    routingRuleId string
    ID of the Routing Rule.
    id str
    The provider-assigned unique ID for this managed resource.
    routing_rule_arn str
    ARN of the Routing Rule.
    routing_rule_id str
    ID of the Routing Rule.
    id String
    The provider-assigned unique ID for this managed resource.
    routingRuleArn String
    ARN of the Routing Rule.
    routingRuleId String
    ID of the Routing Rule.

    Look up Existing RoutingRule Resource

    Get an existing RoutingRule resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: RoutingRuleState, opts?: CustomResourceOptions): RoutingRule
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            actions: Optional[Sequence[RoutingRuleActionArgs]] = None,
            conditions: Optional[Sequence[RoutingRuleConditionArgs]] = None,
            domain_name: Optional[str] = None,
            priority: Optional[int] = None,
            region: Optional[str] = None,
            routing_rule_arn: Optional[str] = None,
            routing_rule_id: Optional[str] = None) -> RoutingRule
    func GetRoutingRule(ctx *Context, name string, id IDInput, state *RoutingRuleState, opts ...ResourceOption) (*RoutingRule, error)
    public static RoutingRule Get(string name, Input<string> id, RoutingRuleState? state, CustomResourceOptions? opts = null)
    public static RoutingRule get(String name, Output<String> id, RoutingRuleState state, CustomResourceOptions options)
    resources:  _:    type: aws:apigatewayv2:RoutingRule    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Actions List<RoutingRuleAction>
    Configuration of resulting action based on matching routing rules condition. See below.
    Conditions List<RoutingRuleCondition>
    Conditions configuration. See below.
    DomainName string

    Domain name. Must be between 1 and 512 characters in length.

    The following arguments are optional:

    Priority int
    The order of rule evaluation. Priority is evaluated from the lowest value to the highest value. Rules can't have the same priority. Value must be between 1 and 1,000,000.
    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    RoutingRuleArn string
    ARN of the Routing Rule.
    RoutingRuleId string
    ID of the Routing Rule.
    Actions []RoutingRuleActionArgs
    Configuration of resulting action based on matching routing rules condition. See below.
    Conditions []RoutingRuleConditionArgs
    Conditions configuration. See below.
    DomainName string

    Domain name. Must be between 1 and 512 characters in length.

    The following arguments are optional:

    Priority int
    The order of rule evaluation. Priority is evaluated from the lowest value to the highest value. Rules can't have the same priority. Value must be between 1 and 1,000,000.
    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    RoutingRuleArn string
    ARN of the Routing Rule.
    RoutingRuleId string
    ID of the Routing Rule.
    actions List<RoutingRuleAction>
    Configuration of resulting action based on matching routing rules condition. See below.
    conditions List<RoutingRuleCondition>
    Conditions configuration. See below.
    domainName String

    Domain name. Must be between 1 and 512 characters in length.

    The following arguments are optional:

    priority Integer
    The order of rule evaluation. Priority is evaluated from the lowest value to the highest value. Rules can't have the same priority. Value must be between 1 and 1,000,000.
    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    routingRuleArn String
    ARN of the Routing Rule.
    routingRuleId String
    ID of the Routing Rule.
    actions RoutingRuleAction[]
    Configuration of resulting action based on matching routing rules condition. See below.
    conditions RoutingRuleCondition[]
    Conditions configuration. See below.
    domainName string

    Domain name. Must be between 1 and 512 characters in length.

    The following arguments are optional:

    priority number
    The order of rule evaluation. Priority is evaluated from the lowest value to the highest value. Rules can't have the same priority. Value must be between 1 and 1,000,000.
    region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    routingRuleArn string
    ARN of the Routing Rule.
    routingRuleId string
    ID of the Routing Rule.
    actions Sequence[RoutingRuleActionArgs]
    Configuration of resulting action based on matching routing rules condition. See below.
    conditions Sequence[RoutingRuleConditionArgs]
    Conditions configuration. See below.
    domain_name str

    Domain name. Must be between 1 and 512 characters in length.

    The following arguments are optional:

    priority int
    The order of rule evaluation. Priority is evaluated from the lowest value to the highest value. Rules can't have the same priority. Value must be between 1 and 1,000,000.
    region str
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    routing_rule_arn str
    ARN of the Routing Rule.
    routing_rule_id str
    ID of the Routing Rule.
    actions List<Property Map>
    Configuration of resulting action based on matching routing rules condition. See below.
    conditions List<Property Map>
    Conditions configuration. See below.
    domainName String

    Domain name. Must be between 1 and 512 characters in length.

    The following arguments are optional:

    priority Number
    The order of rule evaluation. Priority is evaluated from the lowest value to the highest value. Rules can't have the same priority. Value must be between 1 and 1,000,000.
    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    routingRuleArn String
    ARN of the Routing Rule.
    routingRuleId String
    ID of the Routing Rule.

    Supporting Types

    RoutingRuleAction, RoutingRuleActionArgs

    InvokeApi RoutingRuleActionInvokeApi
    Configuration to invoke a stage of a target API. Only REST APIs are supported. See below.
    InvokeApi RoutingRuleActionInvokeApi
    Configuration to invoke a stage of a target API. Only REST APIs are supported. See below.
    invokeApi RoutingRuleActionInvokeApi
    Configuration to invoke a stage of a target API. Only REST APIs are supported. See below.
    invokeApi RoutingRuleActionInvokeApi
    Configuration to invoke a stage of a target API. Only REST APIs are supported. See below.
    invoke_api RoutingRuleActionInvokeApi
    Configuration to invoke a stage of a target API. Only REST APIs are supported. See below.
    invokeApi Property Map
    Configuration to invoke a stage of a target API. Only REST APIs are supported. See below.

    RoutingRuleActionInvokeApi, RoutingRuleActionInvokeApiArgs

    ApiId string
    Action to invoke a stage of a target API. Only REST APIs are supported.
    Stage string
    Action to invoke a stage of a target API. Only REST APIs are supported.
    StripBasePath bool
    Action to invoke a stage of a target API. Only REST APIs are supported.
    ApiId string
    Action to invoke a stage of a target API. Only REST APIs are supported.
    Stage string
    Action to invoke a stage of a target API. Only REST APIs are supported.
    StripBasePath bool
    Action to invoke a stage of a target API. Only REST APIs are supported.
    apiId String
    Action to invoke a stage of a target API. Only REST APIs are supported.
    stage String
    Action to invoke a stage of a target API. Only REST APIs are supported.
    stripBasePath Boolean
    Action to invoke a stage of a target API. Only REST APIs are supported.
    apiId string
    Action to invoke a stage of a target API. Only REST APIs are supported.
    stage string
    Action to invoke a stage of a target API. Only REST APIs are supported.
    stripBasePath boolean
    Action to invoke a stage of a target API. Only REST APIs are supported.
    api_id str
    Action to invoke a stage of a target API. Only REST APIs are supported.
    stage str
    Action to invoke a stage of a target API. Only REST APIs are supported.
    strip_base_path bool
    Action to invoke a stage of a target API. Only REST APIs are supported.
    apiId String
    Action to invoke a stage of a target API. Only REST APIs are supported.
    stage String
    Action to invoke a stage of a target API. Only REST APIs are supported.
    stripBasePath Boolean
    Action to invoke a stage of a target API. Only REST APIs are supported.

    RoutingRuleCondition, RoutingRuleConditionArgs

    MatchBasePaths RoutingRuleConditionMatchBasePaths
    The base path to be matched. See below.
    MatchHeaders RoutingRuleConditionMatchHeaders
    The headers to be matched. See below.
    MatchBasePaths RoutingRuleConditionMatchBasePaths
    The base path to be matched. See below.
    MatchHeaders RoutingRuleConditionMatchHeaders
    The headers to be matched. See below.
    matchBasePaths RoutingRuleConditionMatchBasePaths
    The base path to be matched. See below.
    matchHeaders RoutingRuleConditionMatchHeaders
    The headers to be matched. See below.
    matchBasePaths RoutingRuleConditionMatchBasePaths
    The base path to be matched. See below.
    matchHeaders RoutingRuleConditionMatchHeaders
    The headers to be matched. See below.
    match_base_paths RoutingRuleConditionMatchBasePaths
    The base path to be matched. See below.
    match_headers RoutingRuleConditionMatchHeaders
    The headers to be matched. See below.
    matchBasePaths Property Map
    The base path to be matched. See below.
    matchHeaders Property Map
    The headers to be matched. See below.

    RoutingRuleConditionMatchBasePaths, RoutingRuleConditionMatchBasePathsArgs

    AnyOfs List<string>
    List of strings of the case sensitive base path to be matched.
    AnyOfs []string
    List of strings of the case sensitive base path to be matched.
    anyOfs List<String>
    List of strings of the case sensitive base path to be matched.
    anyOfs string[]
    List of strings of the case sensitive base path to be matched.
    any_ofs Sequence[str]
    List of strings of the case sensitive base path to be matched.
    anyOfs List<String>
    List of strings of the case sensitive base path to be matched.

    RoutingRuleConditionMatchHeaders, RoutingRuleConditionMatchHeadersArgs

    AnyOf RoutingRuleConditionMatchHeadersAnyOf
    Configuration of the headers to be matched. There is a match if any of the header name and header value globs are matched. See below.
    AnyOf RoutingRuleConditionMatchHeadersAnyOf
    Configuration of the headers to be matched. There is a match if any of the header name and header value globs are matched. See below.
    anyOf RoutingRuleConditionMatchHeadersAnyOf
    Configuration of the headers to be matched. There is a match if any of the header name and header value globs are matched. See below.
    anyOf RoutingRuleConditionMatchHeadersAnyOf
    Configuration of the headers to be matched. There is a match if any of the header name and header value globs are matched. See below.
    any_of RoutingRuleConditionMatchHeadersAnyOf
    Configuration of the headers to be matched. There is a match if any of the header name and header value globs are matched. See below.
    anyOf Property Map
    Configuration of the headers to be matched. There is a match if any of the header name and header value globs are matched. See below.

    RoutingRuleConditionMatchHeadersAnyOf, RoutingRuleConditionMatchHeadersAnyOfArgs

    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 for *prefix-match, suffix-match*, or *infix*-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 for *prefix-match, suffix-match*, or *infix*-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 for *prefix-match, suffix-match*, or *infix*-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 for *prefix-match, suffix-match*, or *infix*-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 for *prefix-match, suffix-match*, or *infix*-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 for *prefix-match, suffix-match*, or *infix*-match.

    Import

    Using pulumi import, import API Gateway V2 Routing Rule using the routing_rule_arn. For example:

    $ pulumi import aws:apigatewayv2/routingRule:RoutingRule example arn:aws:apigateway:us-east-1:123456789012:/domainnames/example.com/routingrules/rule1
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo
    AWS v7.19.0 published on Friday, Feb 6, 2026 by Pulumi
      Meet Neo: Your AI Platform Teammate