1. Registry
  2. Packages
  3. AWS
  4. API Docs
  5. vpclattice
  6. ListenerRule
Viewing docs for AWS v7.43.0
published on Thursday, Aug 20, 2026 by Pulumi
aws logo aws logo
Viewing docs for AWS v7.43.0
published on Thursday, Aug 20, 2026 by Pulumi

    Resource for managing an AWS VPC Lattice Listener Rule.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.vpclattice.ListenerRule("example", {
        name: "example",
        listenerIdentifier: exampleAwsVpclatticeListener.listenerId,
        serviceIdentifier: exampleAwsVpclatticeService.id,
        priority: 20,
        match: {
            httpMatch: {
                headerMatches: [{
                    name: "example-header",
                    caseSensitive: false,
                    match: {
                        exact: "example-contains",
                    },
                }],
                pathMatch: {
                    caseSensitive: true,
                    match: {
                        prefix: "/example-path",
                    },
                },
            },
        },
        action: {
            forward: {
                targetGroups: [
                    {
                        targetGroupIdentifier: exampleAwsVpclatticeTargetGroup.id,
                        weight: 1,
                    },
                    {
                        targetGroupIdentifier: example2.id,
                        weight: 2,
                    },
                ],
            },
        },
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.vpclattice.ListenerRule("example",
        name="example",
        listener_identifier=example_aws_vpclattice_listener["listenerId"],
        service_identifier=example_aws_vpclattice_service["id"],
        priority=20,
        match={
            "http_match": {
                "header_matches": [{
                    "name": "example-header",
                    "case_sensitive": False,
                    "match": {
                        "exact": "example-contains",
                    },
                }],
                "path_match": {
                    "case_sensitive": True,
                    "match": {
                        "prefix": "/example-path",
                    },
                },
            },
        },
        action={
            "forward": {
                "target_groups": [
                    {
                        "target_group_identifier": example_aws_vpclattice_target_group["id"],
                        "weight": 1,
                    },
                    {
                        "target_group_identifier": example2["id"],
                        "weight": 2,
                    },
                ],
            },
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/vpclattice"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := vpclattice.NewListenerRule(ctx, "example", &vpclattice.ListenerRuleArgs{
    			Name:               pulumi.String("example"),
    			ListenerIdentifier: pulumi.Any(exampleAwsVpclatticeListener.ListenerId),
    			ServiceIdentifier:  pulumi.Any(exampleAwsVpclatticeService.Id),
    			Priority:           pulumi.Int(20),
    			Match: &vpclattice.ListenerRuleMatchArgs{
    				HttpMatch: &vpclattice.ListenerRuleMatchHttpMatchArgs{
    					HeaderMatches: vpclattice.ListenerRuleMatchHttpMatchHeaderMatchArray{
    						&vpclattice.ListenerRuleMatchHttpMatchHeaderMatchArgs{
    							Name:          pulumi.String("example-header"),
    							CaseSensitive: pulumi.Bool(false),
    							Match: &vpclattice.ListenerRuleMatchHttpMatchHeaderMatchMatchArgs{
    								Exact: pulumi.String("example-contains"),
    							},
    						},
    					},
    					PathMatch: &vpclattice.ListenerRuleMatchHttpMatchPathMatchArgs{
    						CaseSensitive: pulumi.Bool(true),
    						Match: &vpclattice.ListenerRuleMatchHttpMatchPathMatchMatchArgs{
    							Prefix: pulumi.String("/example-path"),
    						},
    					},
    				},
    			},
    			Action: &vpclattice.ListenerRuleActionArgs{
    				Forward: &vpclattice.ListenerRuleActionForwardArgs{
    					TargetGroups: vpclattice.ListenerRuleActionForwardTargetGroupArray{
    						&vpclattice.ListenerRuleActionForwardTargetGroupArgs{
    							TargetGroupIdentifier: pulumi.Any(exampleAwsVpclatticeTargetGroup.Id),
    							Weight:                pulumi.Int(1),
    						},
    						&vpclattice.ListenerRuleActionForwardTargetGroupArgs{
    							TargetGroupIdentifier: pulumi.Any(example2.Id),
    							Weight:                pulumi.Int(2),
    						},
    					},
    				},
    			},
    		})
    		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.VpcLattice.ListenerRule("example", new()
        {
            Name = "example",
            ListenerIdentifier = exampleAwsVpclatticeListener.ListenerId,
            ServiceIdentifier = exampleAwsVpclatticeService.Id,
            Priority = 20,
            Match = new Aws.VpcLattice.Inputs.ListenerRuleMatchArgs
            {
                HttpMatch = new Aws.VpcLattice.Inputs.ListenerRuleMatchHttpMatchArgs
                {
                    HeaderMatches = new[]
                    {
                        new Aws.VpcLattice.Inputs.ListenerRuleMatchHttpMatchHeaderMatchArgs
                        {
                            Name = "example-header",
                            CaseSensitive = false,
                            Match = new Aws.VpcLattice.Inputs.ListenerRuleMatchHttpMatchHeaderMatchMatchArgs
                            {
                                Exact = "example-contains",
                            },
                        },
                    },
                    PathMatch = new Aws.VpcLattice.Inputs.ListenerRuleMatchHttpMatchPathMatchArgs
                    {
                        CaseSensitive = true,
                        Match = new Aws.VpcLattice.Inputs.ListenerRuleMatchHttpMatchPathMatchMatchArgs
                        {
                            Prefix = "/example-path",
                        },
                    },
                },
            },
            Action = new Aws.VpcLattice.Inputs.ListenerRuleActionArgs
            {
                Forward = new Aws.VpcLattice.Inputs.ListenerRuleActionForwardArgs
                {
                    TargetGroups = new[]
                    {
                        new Aws.VpcLattice.Inputs.ListenerRuleActionForwardTargetGroupArgs
                        {
                            TargetGroupIdentifier = exampleAwsVpclatticeTargetGroup.Id,
                            Weight = 1,
                        },
                        new Aws.VpcLattice.Inputs.ListenerRuleActionForwardTargetGroupArgs
                        {
                            TargetGroupIdentifier = example2.Id,
                            Weight = 2,
                        },
                    },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.vpclattice.ListenerRule;
    import com.pulumi.aws.vpclattice.ListenerRuleArgs;
    import com.pulumi.aws.vpclattice.inputs.ListenerRuleMatchArgs;
    import com.pulumi.aws.vpclattice.inputs.ListenerRuleMatchHttpMatchArgs;
    import com.pulumi.aws.vpclattice.inputs.ListenerRuleMatchHttpMatchHeaderMatchArgs;
    import com.pulumi.aws.vpclattice.inputs.ListenerRuleMatchHttpMatchHeaderMatchMatchArgs;
    import com.pulumi.aws.vpclattice.inputs.ListenerRuleMatchHttpMatchPathMatchArgs;
    import com.pulumi.aws.vpclattice.inputs.ListenerRuleMatchHttpMatchPathMatchMatchArgs;
    import com.pulumi.aws.vpclattice.inputs.ListenerRuleActionArgs;
    import com.pulumi.aws.vpclattice.inputs.ListenerRuleActionForwardArgs;
    import com.pulumi.aws.vpclattice.inputs.ListenerRuleActionForwardTargetGroupArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    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 ListenerRule("example", ListenerRuleArgs.builder()
                .name("example")
                .listenerIdentifier(exampleAwsVpclatticeListener.listenerId())
                .serviceIdentifier(exampleAwsVpclatticeService.id())
                .priority(20)
                .match(ListenerRuleMatchArgs.builder()
                    .httpMatch(ListenerRuleMatchHttpMatchArgs.builder()
                        .headerMatches(ListenerRuleMatchHttpMatchHeaderMatchArgs.builder()
                            .name("example-header")
                            .caseSensitive(false)
                            .match(ListenerRuleMatchHttpMatchHeaderMatchMatchArgs.builder()
                                .exact("example-contains")
                                .build())
                            .build())
                        .pathMatch(ListenerRuleMatchHttpMatchPathMatchArgs.builder()
                            .caseSensitive(true)
                            .match(ListenerRuleMatchHttpMatchPathMatchMatchArgs.builder()
                                .prefix("/example-path")
                                .build())
                            .build())
                        .build())
                    .build())
                .action(ListenerRuleActionArgs.builder()
                    .forward(ListenerRuleActionForwardArgs.builder()
                        .targetGroups(                    
                            ListenerRuleActionForwardTargetGroupArgs.builder()
                                .targetGroupIdentifier(exampleAwsVpclatticeTargetGroup.id())
                                .weight(1)
                                .build(),
                            ListenerRuleActionForwardTargetGroupArgs.builder()
                                .targetGroupIdentifier(example2.id())
                                .weight(2)
                                .build())
                        .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:vpclattice:ListenerRule
        properties:
          name: example
          listenerIdentifier: ${exampleAwsVpclatticeListener.listenerId}
          serviceIdentifier: ${exampleAwsVpclatticeService.id}
          priority: 20
          match:
            httpMatch:
              headerMatches:
                - name: example-header
                  caseSensitive: false
                  match:
                    exact: example-contains
              pathMatch:
                caseSensitive: true
                match:
                  prefix: /example-path
          action:
            forward:
              targetGroups:
                - targetGroupIdentifier: ${exampleAwsVpclatticeTargetGroup.id}
                  weight: 1
                - targetGroupIdentifier: ${example2.id}
                  weight: 2
    
    pulumi {
      required_providers {
        aws = {
          source = "pulumi/aws"
        }
      }
    }
    
    resource "aws_vpclattice_listenerrule" "example" {
      name                = "example"
      listener_identifier = exampleAwsVpclatticeListener.listenerId
      service_identifier  = exampleAwsVpclatticeService.id
      priority            = 20
      match = {
        http_match = {
          header_matches = [{
            "name"          = "example-header"
            "caseSensitive" = false
            "match" = {
              "exact" = "example-contains"
            }
          }]
          path_match = {
            case_sensitive = true
            match = {
              prefix = "/example-path"
            }
          }
        }
      }
      action = {
        forward = {
          target_groups = [{
            "targetGroupIdentifier" = exampleAwsVpclatticeTargetGroup.id
            "weight"                = 1
            }, {
            "targetGroupIdentifier" = example2.id
            "weight"                = 2
          }]
        }
      }
    }
    

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.vpclattice.ListenerRule("example", {
        name: "example",
        listenerIdentifier: exampleAwsVpclatticeListener.listenerId,
        serviceIdentifier: exampleAwsVpclatticeService.id,
        priority: 10,
        match: {
            httpMatch: {
                pathMatch: {
                    caseSensitive: false,
                    match: {
                        exact: "/example-path",
                    },
                },
            },
        },
        action: {
            fixedResponse: {
                statusCode: 404,
            },
        },
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.vpclattice.ListenerRule("example",
        name="example",
        listener_identifier=example_aws_vpclattice_listener["listenerId"],
        service_identifier=example_aws_vpclattice_service["id"],
        priority=10,
        match={
            "http_match": {
                "path_match": {
                    "case_sensitive": False,
                    "match": {
                        "exact": "/example-path",
                    },
                },
            },
        },
        action={
            "fixed_response": {
                "status_code": 404,
            },
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/vpclattice"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := vpclattice.NewListenerRule(ctx, "example", &vpclattice.ListenerRuleArgs{
    			Name:               pulumi.String("example"),
    			ListenerIdentifier: pulumi.Any(exampleAwsVpclatticeListener.ListenerId),
    			ServiceIdentifier:  pulumi.Any(exampleAwsVpclatticeService.Id),
    			Priority:           pulumi.Int(10),
    			Match: &vpclattice.ListenerRuleMatchArgs{
    				HttpMatch: &vpclattice.ListenerRuleMatchHttpMatchArgs{
    					PathMatch: &vpclattice.ListenerRuleMatchHttpMatchPathMatchArgs{
    						CaseSensitive: pulumi.Bool(false),
    						Match: &vpclattice.ListenerRuleMatchHttpMatchPathMatchMatchArgs{
    							Exact: pulumi.String("/example-path"),
    						},
    					},
    				},
    			},
    			Action: &vpclattice.ListenerRuleActionArgs{
    				FixedResponse: &vpclattice.ListenerRuleActionFixedResponseArgs{
    					StatusCode: pulumi.Int(404),
    				},
    			},
    		})
    		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.VpcLattice.ListenerRule("example", new()
        {
            Name = "example",
            ListenerIdentifier = exampleAwsVpclatticeListener.ListenerId,
            ServiceIdentifier = exampleAwsVpclatticeService.Id,
            Priority = 10,
            Match = new Aws.VpcLattice.Inputs.ListenerRuleMatchArgs
            {
                HttpMatch = new Aws.VpcLattice.Inputs.ListenerRuleMatchHttpMatchArgs
                {
                    PathMatch = new Aws.VpcLattice.Inputs.ListenerRuleMatchHttpMatchPathMatchArgs
                    {
                        CaseSensitive = false,
                        Match = new Aws.VpcLattice.Inputs.ListenerRuleMatchHttpMatchPathMatchMatchArgs
                        {
                            Exact = "/example-path",
                        },
                    },
                },
            },
            Action = new Aws.VpcLattice.Inputs.ListenerRuleActionArgs
            {
                FixedResponse = new Aws.VpcLattice.Inputs.ListenerRuleActionFixedResponseArgs
                {
                    StatusCode = 404,
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.vpclattice.ListenerRule;
    import com.pulumi.aws.vpclattice.ListenerRuleArgs;
    import com.pulumi.aws.vpclattice.inputs.ListenerRuleMatchArgs;
    import com.pulumi.aws.vpclattice.inputs.ListenerRuleMatchHttpMatchArgs;
    import com.pulumi.aws.vpclattice.inputs.ListenerRuleMatchHttpMatchPathMatchArgs;
    import com.pulumi.aws.vpclattice.inputs.ListenerRuleMatchHttpMatchPathMatchMatchArgs;
    import com.pulumi.aws.vpclattice.inputs.ListenerRuleActionArgs;
    import com.pulumi.aws.vpclattice.inputs.ListenerRuleActionFixedResponseArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    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 ListenerRule("example", ListenerRuleArgs.builder()
                .name("example")
                .listenerIdentifier(exampleAwsVpclatticeListener.listenerId())
                .serviceIdentifier(exampleAwsVpclatticeService.id())
                .priority(10)
                .match(ListenerRuleMatchArgs.builder()
                    .httpMatch(ListenerRuleMatchHttpMatchArgs.builder()
                        .pathMatch(ListenerRuleMatchHttpMatchPathMatchArgs.builder()
                            .caseSensitive(false)
                            .match(ListenerRuleMatchHttpMatchPathMatchMatchArgs.builder()
                                .exact("/example-path")
                                .build())
                            .build())
                        .build())
                    .build())
                .action(ListenerRuleActionArgs.builder()
                    .fixedResponse(ListenerRuleActionFixedResponseArgs.builder()
                        .statusCode(404)
                        .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:vpclattice:ListenerRule
        properties:
          name: example
          listenerIdentifier: ${exampleAwsVpclatticeListener.listenerId}
          serviceIdentifier: ${exampleAwsVpclatticeService.id}
          priority: 10
          match:
            httpMatch:
              pathMatch:
                caseSensitive: false
                match:
                  exact: /example-path
          action:
            fixedResponse:
              statusCode: 404
    
    pulumi {
      required_providers {
        aws = {
          source = "pulumi/aws"
        }
      }
    }
    
    resource "aws_vpclattice_listenerrule" "example" {
      name                = "example"
      listener_identifier = exampleAwsVpclatticeListener.listenerId
      service_identifier  = exampleAwsVpclatticeService.id
      priority            = 10
      match = {
        http_match = {
          path_match = {
            case_sensitive = false
            match = {
              exact = "/example-path"
            }
          }
        }
      }
      action = {
        fixed_response = {
          status_code = 404
        }
      }
    }
    

    Create ListenerRule Resource

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

    Constructor syntax

    new ListenerRule(name: string, args: ListenerRuleArgs, opts?: CustomResourceOptions);
    @overload
    def ListenerRule(resource_name: str,
                     args: ListenerRuleArgs,
                     opts: Optional[ResourceOptions] = None)
    
    @overload
    def ListenerRule(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     action: Optional[ListenerRuleActionArgs] = None,
                     listener_identifier: Optional[str] = None,
                     match: Optional[ListenerRuleMatchArgs] = None,
                     priority: Optional[int] = None,
                     service_identifier: Optional[str] = None,
                     name: Optional[str] = None,
                     region: Optional[str] = None,
                     tags: Optional[Mapping[str, str]] = None)
    func NewListenerRule(ctx *Context, name string, args ListenerRuleArgs, opts ...ResourceOption) (*ListenerRule, error)
    public ListenerRule(string name, ListenerRuleArgs args, CustomResourceOptions? opts = null)
    public ListenerRule(String name, ListenerRuleArgs args)
    public ListenerRule(String name, ListenerRuleArgs args, CustomResourceOptions options)
    
    type: aws:vpclattice:ListenerRule
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "aws_vpclattice_listener_rule" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args ListenerRuleArgs
    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 ListenerRuleArgs
    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 ListenerRuleArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ListenerRuleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ListenerRuleArgs
    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 examplelistenerRuleResourceResourceFromVpclatticelistenerRule = new Aws.VpcLattice.ListenerRule("examplelistenerRuleResourceResourceFromVpclatticelistenerRule", new()
    {
        Action = new Aws.VpcLattice.Inputs.ListenerRuleActionArgs
        {
            FixedResponse = new Aws.VpcLattice.Inputs.ListenerRuleActionFixedResponseArgs
            {
                StatusCode = 0,
            },
            Forward = new Aws.VpcLattice.Inputs.ListenerRuleActionForwardArgs
            {
                TargetGroups = new[]
                {
                    new Aws.VpcLattice.Inputs.ListenerRuleActionForwardTargetGroupArgs
                    {
                        TargetGroupIdentifier = "string",
                        Weight = 0,
                    },
                },
            },
        },
        ListenerIdentifier = "string",
        Match = new Aws.VpcLattice.Inputs.ListenerRuleMatchArgs
        {
            HttpMatch = new Aws.VpcLattice.Inputs.ListenerRuleMatchHttpMatchArgs
            {
                HeaderMatches = new[]
                {
                    new Aws.VpcLattice.Inputs.ListenerRuleMatchHttpMatchHeaderMatchArgs
                    {
                        Match = new Aws.VpcLattice.Inputs.ListenerRuleMatchHttpMatchHeaderMatchMatchArgs
                        {
                            Contains = "string",
                            Exact = "string",
                            Prefix = "string",
                        },
                        Name = "string",
                        CaseSensitive = false,
                    },
                },
                Method = "string",
                PathMatch = new Aws.VpcLattice.Inputs.ListenerRuleMatchHttpMatchPathMatchArgs
                {
                    Match = new Aws.VpcLattice.Inputs.ListenerRuleMatchHttpMatchPathMatchMatchArgs
                    {
                        Exact = "string",
                        Prefix = "string",
                    },
                    CaseSensitive = false,
                },
            },
        },
        Priority = 0,
        ServiceIdentifier = "string",
        Name = "string",
        Region = "string",
        Tags = 
        {
            { "string", "string" },
        },
    });
    
    example, err := vpclattice.NewListenerRule(ctx, "examplelistenerRuleResourceResourceFromVpclatticelistenerRule", &vpclattice.ListenerRuleArgs{
    	Action: &vpclattice.ListenerRuleActionArgs{
    		FixedResponse: &vpclattice.ListenerRuleActionFixedResponseArgs{
    			StatusCode: pulumi.Int(0),
    		},
    		Forward: &vpclattice.ListenerRuleActionForwardArgs{
    			TargetGroups: vpclattice.ListenerRuleActionForwardTargetGroupArray{
    				&vpclattice.ListenerRuleActionForwardTargetGroupArgs{
    					TargetGroupIdentifier: pulumi.String("string"),
    					Weight:                pulumi.Int(0),
    				},
    			},
    		},
    	},
    	ListenerIdentifier: pulumi.String("string"),
    	Match: &vpclattice.ListenerRuleMatchArgs{
    		HttpMatch: &vpclattice.ListenerRuleMatchHttpMatchArgs{
    			HeaderMatches: vpclattice.ListenerRuleMatchHttpMatchHeaderMatchArray{
    				&vpclattice.ListenerRuleMatchHttpMatchHeaderMatchArgs{
    					Match: &vpclattice.ListenerRuleMatchHttpMatchHeaderMatchMatchArgs{
    						Contains: pulumi.String("string"),
    						Exact:    pulumi.String("string"),
    						Prefix:   pulumi.String("string"),
    					},
    					Name:          pulumi.String("string"),
    					CaseSensitive: pulumi.Bool(false),
    				},
    			},
    			Method: pulumi.String("string"),
    			PathMatch: &vpclattice.ListenerRuleMatchHttpMatchPathMatchArgs{
    				Match: &vpclattice.ListenerRuleMatchHttpMatchPathMatchMatchArgs{
    					Exact:  pulumi.String("string"),
    					Prefix: pulumi.String("string"),
    				},
    				CaseSensitive: pulumi.Bool(false),
    			},
    		},
    	},
    	Priority:          pulumi.Int(0),
    	ServiceIdentifier: pulumi.String("string"),
    	Name:              pulumi.String("string"),
    	Region:            pulumi.String("string"),
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    })
    
    resource "aws_vpclattice_listener_rule" "examplelistenerRuleResourceResourceFromVpclatticelistenerRule" {
      lifecycle {
        create_before_destroy = true
      }
      action = {
        fixed_response = {
          status_code = 0
        }
        forward = {
          target_groups = [{
            target_group_identifier = "string"
            weight                  = 0
          }]
        }
      }
      listener_identifier = "string"
      match = {
        http_match = {
          header_matches = [{
            match = {
              contains = "string"
              exact    = "string"
              prefix   = "string"
            }
            name           = "string"
            case_sensitive = false
          }]
          method = "string"
          path_match = {
            match = {
              exact  = "string"
              prefix = "string"
            }
            case_sensitive = false
          }
        }
      }
      priority           = 0
      service_identifier = "string"
      name               = "string"
      region             = "string"
      tags = {
        "string" = "string"
      }
    }
    
    var examplelistenerRuleResourceResourceFromVpclatticelistenerRule = new com.pulumi.aws.vpclattice.ListenerRule("examplelistenerRuleResourceResourceFromVpclatticelistenerRule", com.pulumi.aws.vpclattice.ListenerRuleArgs.builder()
        .action(com.pulumi.aws.vpclattice.inputs.ListenerRuleActionArgs.builder()
            .fixedResponse(com.pulumi.aws.vpclattice.inputs.ListenerRuleActionFixedResponseArgs.builder()
                .statusCode(0)
                .build())
            .forward(com.pulumi.aws.vpclattice.inputs.ListenerRuleActionForwardArgs.builder()
                .targetGroups(com.pulumi.aws.vpclattice.inputs.ListenerRuleActionForwardTargetGroupArgs.builder()
                    .targetGroupIdentifier("string")
                    .weight(0)
                    .build())
                .build())
            .build())
        .listenerIdentifier("string")
        .match(ListenerRuleMatchArgs.builder()
            .httpMatch(ListenerRuleMatchHttpMatchArgs.builder()
                .headerMatches(ListenerRuleMatchHttpMatchHeaderMatchArgs.builder()
                    .match(ListenerRuleMatchHttpMatchHeaderMatchMatchArgs.builder()
                        .contains("string")
                        .exact("string")
                        .prefix("string")
                        .build())
                    .name("string")
                    .caseSensitive(false)
                    .build())
                .method("string")
                .pathMatch(ListenerRuleMatchHttpMatchPathMatchArgs.builder()
                    .match(ListenerRuleMatchHttpMatchPathMatchMatchArgs.builder()
                        .exact("string")
                        .prefix("string")
                        .build())
                    .caseSensitive(false)
                    .build())
                .build())
            .build())
        .priority(0)
        .serviceIdentifier("string")
        .name("string")
        .region("string")
        .tags(Map.of("string", "string"))
        .build());
    
    examplelistener_rule_resource_resource_from_vpclatticelistener_rule = aws.vpclattice.ListenerRule("examplelistenerRuleResourceResourceFromVpclatticelistenerRule",
        action={
            "fixed_response": {
                "status_code": 0,
            },
            "forward": {
                "target_groups": [{
                    "target_group_identifier": "string",
                    "weight": 0,
                }],
            },
        },
        listener_identifier="string",
        match={
            "http_match": {
                "header_matches": [{
                    "match": {
                        "contains": "string",
                        "exact": "string",
                        "prefix": "string",
                    },
                    "name": "string",
                    "case_sensitive": False,
                }],
                "method": "string",
                "path_match": {
                    "match": {
                        "exact": "string",
                        "prefix": "string",
                    },
                    "case_sensitive": False,
                },
            },
        },
        priority=0,
        service_identifier="string",
        name="string",
        region="string",
        tags={
            "string": "string",
        })
    
    const examplelistenerRuleResourceResourceFromVpclatticelistenerRule = new aws.vpclattice.ListenerRule("examplelistenerRuleResourceResourceFromVpclatticelistenerRule", {
        action: {
            fixedResponse: {
                statusCode: 0,
            },
            forward: {
                targetGroups: [{
                    targetGroupIdentifier: "string",
                    weight: 0,
                }],
            },
        },
        listenerIdentifier: "string",
        match: {
            httpMatch: {
                headerMatches: [{
                    match: {
                        contains: "string",
                        exact: "string",
                        prefix: "string",
                    },
                    name: "string",
                    caseSensitive: false,
                }],
                method: "string",
                pathMatch: {
                    match: {
                        exact: "string",
                        prefix: "string",
                    },
                    caseSensitive: false,
                },
            },
        },
        priority: 0,
        serviceIdentifier: "string",
        name: "string",
        region: "string",
        tags: {
            string: "string",
        },
    });
    
    type: aws:vpclattice:ListenerRule
    properties:
        action:
            fixedResponse:
                statusCode: 0
            forward:
                targetGroups:
                    - targetGroupIdentifier: string
                      weight: 0
        listenerIdentifier: string
        match:
            httpMatch:
                headerMatches:
                    - caseSensitive: false
                      match:
                        contains: string
                        exact: string
                        prefix: string
                      name: string
                method: string
                pathMatch:
                    caseSensitive: false
                    match:
                        exact: string
                        prefix: string
        name: string
        priority: 0
        region: string
        serviceIdentifier: string
        tags:
            string: string
    

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

    Action ListenerRuleAction
    Action for the listener rule. See action Block for details.
    ListenerIdentifier string
    ID or Amazon Resource Name (ARN) of the listener.
    Match ListenerRuleMatch
    Rule match. See match Block for details.
    Priority int
    Priority assigned to the rule. Each rule for a specific listener must have a unique priority. The lower the priority number the higher the priority.
    ServiceIdentifier string

    ID or Amazon Resource Name (ARN) of the service.

    The following arguments are optional:

    Name string
    Name of the rule. Must be unique within the listener. Valid characters are a-z, 0-9, and hyphens (-). You can't use a hyphen as the first or last character, or immediately after another hyphen.
    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    Tags Dictionary<string, string>
    Key-value mapping of resource tags. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    Action ListenerRuleActionArgs
    Action for the listener rule. See action Block for details.
    ListenerIdentifier string
    ID or Amazon Resource Name (ARN) of the listener.
    Match ListenerRuleMatchArgs
    Rule match. See match Block for details.
    Priority int
    Priority assigned to the rule. Each rule for a specific listener must have a unique priority. The lower the priority number the higher the priority.
    ServiceIdentifier string

    ID or Amazon Resource Name (ARN) of the service.

    The following arguments are optional:

    Name string
    Name of the rule. Must be unique within the listener. Valid characters are a-z, 0-9, and hyphens (-). You can't use a hyphen as the first or last character, or immediately after another hyphen.
    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    Tags map[string]string
    Key-value mapping of resource tags. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    action object
    Action for the listener rule. See action Block for details.
    listener_identifier string
    ID or Amazon Resource Name (ARN) of the listener.
    match object
    Rule match. See match Block for details.
    priority number
    Priority assigned to the rule. Each rule for a specific listener must have a unique priority. The lower the priority number the higher the priority.
    service_identifier string

    ID or Amazon Resource Name (ARN) of the service.

    The following arguments are optional:

    name string
    Name of the rule. Must be unique within the listener. Valid characters are a-z, 0-9, and hyphens (-). You can't use a hyphen as the first or last character, or immediately after another hyphen.
    region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    tags map(string)
    Key-value mapping of resource tags. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    action ListenerRuleAction
    Action for the listener rule. See action Block for details.
    listenerIdentifier String
    ID or Amazon Resource Name (ARN) of the listener.
    match ListenerRuleMatch
    Rule match. See match Block for details.
    priority Integer
    Priority assigned to the rule. Each rule for a specific listener must have a unique priority. The lower the priority number the higher the priority.
    serviceIdentifier String

    ID or Amazon Resource Name (ARN) of the service.

    The following arguments are optional:

    name String
    Name of the rule. Must be unique within the listener. Valid characters are a-z, 0-9, and hyphens (-). You can't use a hyphen as the first or last character, or immediately after another hyphen.
    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    tags Map<String,String>
    Key-value mapping of resource tags. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    action ListenerRuleAction
    Action for the listener rule. See action Block for details.
    listenerIdentifier string
    ID or Amazon Resource Name (ARN) of the listener.
    match ListenerRuleMatch
    Rule match. See match Block for details.
    priority number
    Priority assigned to the rule. Each rule for a specific listener must have a unique priority. The lower the priority number the higher the priority.
    serviceIdentifier string

    ID or Amazon Resource Name (ARN) of the service.

    The following arguments are optional:

    name string
    Name of the rule. Must be unique within the listener. Valid characters are a-z, 0-9, and hyphens (-). You can't use a hyphen as the first or last character, or immediately after another hyphen.
    region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    tags {[key: string]: string}
    Key-value mapping of resource tags. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    action ListenerRuleActionArgs
    Action for the listener rule. See action Block for details.
    listener_identifier str
    ID or Amazon Resource Name (ARN) of the listener.
    match ListenerRuleMatchArgs
    Rule match. See match Block for details.
    priority int
    Priority assigned to the rule. Each rule for a specific listener must have a unique priority. The lower the priority number the higher the priority.
    service_identifier str

    ID or Amazon Resource Name (ARN) of the service.

    The following arguments are optional:

    name str
    Name of the rule. Must be unique within the listener. Valid characters are a-z, 0-9, and hyphens (-). You can't use a hyphen as the first or last character, or immediately after another hyphen.
    region str
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    tags Mapping[str, str]
    Key-value mapping of resource tags. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    action Property Map
    Action for the listener rule. See action Block for details.
    listenerIdentifier String
    ID or Amazon Resource Name (ARN) of the listener.
    match Property Map
    Rule match. See match Block for details.
    priority Number
    Priority assigned to the rule. Each rule for a specific listener must have a unique priority. The lower the priority number the higher the priority.
    serviceIdentifier String

    ID or Amazon Resource Name (ARN) of the service.

    The following arguments are optional:

    name String
    Name of the rule. Must be unique within the listener. Valid characters are a-z, 0-9, and hyphens (-). You can't use a hyphen as the first or last character, or immediately after another hyphen.
    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    tags Map<String>
    Key-value mapping of resource tags. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

    Outputs

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

    Arn string
    ARN for the listener rule.
    Id string
    The provider-assigned unique ID for this managed resource.
    RuleId string
    Unique identifier for the listener rule.
    TagsAll Dictionary<string, string>
    Map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
    Arn string
    ARN for the listener rule.
    Id string
    The provider-assigned unique ID for this managed resource.
    RuleId string
    Unique identifier for the listener rule.
    TagsAll map[string]string
    Map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
    arn string
    ARN for the listener rule.
    id string
    The provider-assigned unique ID for this managed resource.
    rule_id string
    Unique identifier for the listener rule.
    tags_all map(string)
    Map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
    arn String
    ARN for the listener rule.
    id String
    The provider-assigned unique ID for this managed resource.
    ruleId String
    Unique identifier for the listener rule.
    tagsAll Map<String,String>
    Map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
    arn string
    ARN for the listener rule.
    id string
    The provider-assigned unique ID for this managed resource.
    ruleId string
    Unique identifier for the listener rule.
    tagsAll {[key: string]: string}
    Map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
    arn str
    ARN for the listener rule.
    id str
    The provider-assigned unique ID for this managed resource.
    rule_id str
    Unique identifier for the listener rule.
    tags_all Mapping[str, str]
    Map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
    arn String
    ARN for the listener rule.
    id String
    The provider-assigned unique ID for this managed resource.
    ruleId String
    Unique identifier for the listener rule.
    tagsAll Map<String>
    Map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.

    Look up Existing ListenerRule Resource

    Get an existing ListenerRule 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?: ListenerRuleState, opts?: CustomResourceOptions): ListenerRule
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            action: Optional[ListenerRuleActionArgs] = None,
            arn: Optional[str] = None,
            listener_identifier: Optional[str] = None,
            match: Optional[ListenerRuleMatchArgs] = None,
            name: Optional[str] = None,
            priority: Optional[int] = None,
            region: Optional[str] = None,
            rule_id: Optional[str] = None,
            service_identifier: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None,
            tags_all: Optional[Mapping[str, str]] = None) -> ListenerRule
    func GetListenerRule(ctx *Context, name string, id IDInput, state *ListenerRuleState, opts ...ResourceOption) (*ListenerRule, error)
    public static ListenerRule Get(string name, Input<string> id, ListenerRuleState? state, CustomResourceOptions? opts = null)
    public static ListenerRule get(String name, Output<String> id, ListenerRuleState state, CustomResourceOptions options)
    resources:  _:    type: aws:vpclattice:ListenerRule    get:      id: ${id}
    import {
      to = aws_vpclattice_listener_rule.example
      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:
    Action ListenerRuleAction
    Action for the listener rule. See action Block for details.
    Arn string
    ARN for the listener rule.
    ListenerIdentifier string
    ID or Amazon Resource Name (ARN) of the listener.
    Match ListenerRuleMatch
    Rule match. See match Block for details.
    Name string
    Name of the rule. Must be unique within the listener. Valid characters are a-z, 0-9, and hyphens (-). You can't use a hyphen as the first or last character, or immediately after another hyphen.
    Priority int
    Priority assigned to the rule. Each rule for a specific listener must have a unique priority. The lower the priority number the higher the priority.
    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    RuleId string
    Unique identifier for the listener rule.
    ServiceIdentifier string

    ID or Amazon Resource Name (ARN) of the service.

    The following arguments are optional:

    Tags Dictionary<string, string>
    Key-value mapping of resource tags. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TagsAll Dictionary<string, string>
    Map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
    Action ListenerRuleActionArgs
    Action for the listener rule. See action Block for details.
    Arn string
    ARN for the listener rule.
    ListenerIdentifier string
    ID or Amazon Resource Name (ARN) of the listener.
    Match ListenerRuleMatchArgs
    Rule match. See match Block for details.
    Name string
    Name of the rule. Must be unique within the listener. Valid characters are a-z, 0-9, and hyphens (-). You can't use a hyphen as the first or last character, or immediately after another hyphen.
    Priority int
    Priority assigned to the rule. Each rule for a specific listener must have a unique priority. The lower the priority number the higher the priority.
    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    RuleId string
    Unique identifier for the listener rule.
    ServiceIdentifier string

    ID or Amazon Resource Name (ARN) of the service.

    The following arguments are optional:

    Tags map[string]string
    Key-value mapping of resource tags. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TagsAll map[string]string
    Map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
    action object
    Action for the listener rule. See action Block for details.
    arn string
    ARN for the listener rule.
    listener_identifier string
    ID or Amazon Resource Name (ARN) of the listener.
    match object
    Rule match. See match Block for details.
    name string
    Name of the rule. Must be unique within the listener. Valid characters are a-z, 0-9, and hyphens (-). You can't use a hyphen as the first or last character, or immediately after another hyphen.
    priority number
    Priority assigned to the rule. Each rule for a specific listener must have a unique priority. The lower the priority number the higher the priority.
    region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    rule_id string
    Unique identifier for the listener rule.
    service_identifier string

    ID or Amazon Resource Name (ARN) of the service.

    The following arguments are optional:

    tags map(string)
    Key-value mapping of resource tags. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tags_all map(string)
    Map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
    action ListenerRuleAction
    Action for the listener rule. See action Block for details.
    arn String
    ARN for the listener rule.
    listenerIdentifier String
    ID or Amazon Resource Name (ARN) of the listener.
    match ListenerRuleMatch
    Rule match. See match Block for details.
    name String
    Name of the rule. Must be unique within the listener. Valid characters are a-z, 0-9, and hyphens (-). You can't use a hyphen as the first or last character, or immediately after another hyphen.
    priority Integer
    Priority assigned to the rule. Each rule for a specific listener must have a unique priority. The lower the priority number the higher the priority.
    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    ruleId String
    Unique identifier for the listener rule.
    serviceIdentifier String

    ID or Amazon Resource Name (ARN) of the service.

    The following arguments are optional:

    tags Map<String,String>
    Key-value mapping of resource tags. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll Map<String,String>
    Map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
    action ListenerRuleAction
    Action for the listener rule. See action Block for details.
    arn string
    ARN for the listener rule.
    listenerIdentifier string
    ID or Amazon Resource Name (ARN) of the listener.
    match ListenerRuleMatch
    Rule match. See match Block for details.
    name string
    Name of the rule. Must be unique within the listener. Valid characters are a-z, 0-9, and hyphens (-). You can't use a hyphen as the first or last character, or immediately after another hyphen.
    priority number
    Priority assigned to the rule. Each rule for a specific listener must have a unique priority. The lower the priority number the higher the priority.
    region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    ruleId string
    Unique identifier for the listener rule.
    serviceIdentifier string

    ID or Amazon Resource Name (ARN) of the service.

    The following arguments are optional:

    tags {[key: string]: string}
    Key-value mapping of resource tags. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll {[key: string]: string}
    Map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
    action ListenerRuleActionArgs
    Action for the listener rule. See action Block for details.
    arn str
    ARN for the listener rule.
    listener_identifier str
    ID or Amazon Resource Name (ARN) of the listener.
    match ListenerRuleMatchArgs
    Rule match. See match Block for details.
    name str
    Name of the rule. Must be unique within the listener. Valid characters are a-z, 0-9, and hyphens (-). You can't use a hyphen as the first or last character, or immediately after another hyphen.
    priority int
    Priority assigned to the rule. Each rule for a specific listener must have a unique priority. The lower the priority number the higher the priority.
    region str
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    rule_id str
    Unique identifier for the listener rule.
    service_identifier str

    ID or Amazon Resource Name (ARN) of the service.

    The following arguments are optional:

    tags Mapping[str, str]
    Key-value mapping of resource tags. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tags_all Mapping[str, str]
    Map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
    action Property Map
    Action for the listener rule. See action Block for details.
    arn String
    ARN for the listener rule.
    listenerIdentifier String
    ID or Amazon Resource Name (ARN) of the listener.
    match Property Map
    Rule match. See match Block for details.
    name String
    Name of the rule. Must be unique within the listener. Valid characters are a-z, 0-9, and hyphens (-). You can't use a hyphen as the first or last character, or immediately after another hyphen.
    priority Number
    Priority assigned to the rule. Each rule for a specific listener must have a unique priority. The lower the priority number the higher the priority.
    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    ruleId String
    Unique identifier for the listener rule.
    serviceIdentifier String

    ID or Amazon Resource Name (ARN) of the service.

    The following arguments are optional:

    tags Map<String>
    Key-value mapping of resource tags. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll Map<String>
    Map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.

    Supporting Types

    ListenerRuleAction, ListenerRuleActionArgs

    FixedResponse ListenerRuleActionFixedResponse
    Rule action that returns a custom HTTP response. See fixedResponse Block for details.
    Forward ListenerRuleActionForward
    Forward action. Traffic that matches the rule is forwarded to the specified target groups. See forward Block for details.
    FixedResponse ListenerRuleActionFixedResponse
    Rule action that returns a custom HTTP response. See fixedResponse Block for details.
    Forward ListenerRuleActionForward
    Forward action. Traffic that matches the rule is forwarded to the specified target groups. See forward Block for details.
    fixed_response object
    Rule action that returns a custom HTTP response. See fixedResponse Block for details.
    forward object
    Forward action. Traffic that matches the rule is forwarded to the specified target groups. See forward Block for details.
    fixedResponse ListenerRuleActionFixedResponse
    Rule action that returns a custom HTTP response. See fixedResponse Block for details.
    forward ListenerRuleActionForward
    Forward action. Traffic that matches the rule is forwarded to the specified target groups. See forward Block for details.
    fixedResponse ListenerRuleActionFixedResponse
    Rule action that returns a custom HTTP response. See fixedResponse Block for details.
    forward ListenerRuleActionForward
    Forward action. Traffic that matches the rule is forwarded to the specified target groups. See forward Block for details.
    fixed_response ListenerRuleActionFixedResponse
    Rule action that returns a custom HTTP response. See fixedResponse Block for details.
    forward ListenerRuleActionForward
    Forward action. Traffic that matches the rule is forwarded to the specified target groups. See forward Block for details.
    fixedResponse Property Map
    Rule action that returns a custom HTTP response. See fixedResponse Block for details.
    forward Property Map
    Forward action. Traffic that matches the rule is forwarded to the specified target groups. See forward Block for details.

    ListenerRuleActionFixedResponse, ListenerRuleActionFixedResponseArgs

    StatusCode int
    HTTP response code.
    StatusCode int
    HTTP response code.
    status_code number
    HTTP response code.
    statusCode Integer
    HTTP response code.
    statusCode number
    HTTP response code.
    status_code int
    HTTP response code.
    statusCode Number
    HTTP response code.

    ListenerRuleActionForward, ListenerRuleActionForwardArgs

    TargetGroups List<ListenerRuleActionForwardTargetGroup>
    Target groups that traffic matching the rule is forwarded to. See targetGroups Block for details.
    TargetGroups []ListenerRuleActionForwardTargetGroup
    Target groups that traffic matching the rule is forwarded to. See targetGroups Block for details.
    target_groups list(object)
    Target groups that traffic matching the rule is forwarded to. See targetGroups Block for details.
    targetGroups List<ListenerRuleActionForwardTargetGroup>
    Target groups that traffic matching the rule is forwarded to. See targetGroups Block for details.
    targetGroups ListenerRuleActionForwardTargetGroup[]
    Target groups that traffic matching the rule is forwarded to. See targetGroups Block for details.
    target_groups Sequence[ListenerRuleActionForwardTargetGroup]
    Target groups that traffic matching the rule is forwarded to. See targetGroups Block for details.
    targetGroups List<Property Map>
    Target groups that traffic matching the rule is forwarded to. See targetGroups Block for details.

    ListenerRuleActionForwardTargetGroup, ListenerRuleActionForwardTargetGroupArgs

    TargetGroupIdentifier string
    ID or ARN of the target group.
    Weight int
    Weight assigned to the target group, controlling the prioritization and selection of each target group so that requests are distributed based on their weights. Default is 100.
    TargetGroupIdentifier string
    ID or ARN of the target group.
    Weight int
    Weight assigned to the target group, controlling the prioritization and selection of each target group so that requests are distributed based on their weights. Default is 100.
    target_group_identifier string
    ID or ARN of the target group.
    weight number
    Weight assigned to the target group, controlling the prioritization and selection of each target group so that requests are distributed based on their weights. Default is 100.
    targetGroupIdentifier String
    ID or ARN of the target group.
    weight Integer
    Weight assigned to the target group, controlling the prioritization and selection of each target group so that requests are distributed based on their weights. Default is 100.
    targetGroupIdentifier string
    ID or ARN of the target group.
    weight number
    Weight assigned to the target group, controlling the prioritization and selection of each target group so that requests are distributed based on their weights. Default is 100.
    target_group_identifier str
    ID or ARN of the target group.
    weight int
    Weight assigned to the target group, controlling the prioritization and selection of each target group so that requests are distributed based on their weights. Default is 100.
    targetGroupIdentifier String
    ID or ARN of the target group.
    weight Number
    Weight assigned to the target group, controlling the prioritization and selection of each target group so that requests are distributed based on their weights. Default is 100.

    ListenerRuleMatch, ListenerRuleMatchArgs

    HttpMatch ListenerRuleMatchHttpMatch
    HTTP criteria that a rule must match. See httpMatch Block for details.
    HttpMatch ListenerRuleMatchHttpMatch
    HTTP criteria that a rule must match. See httpMatch Block for details.
    http_match object
    HTTP criteria that a rule must match. See httpMatch Block for details.
    httpMatch ListenerRuleMatchHttpMatch
    HTTP criteria that a rule must match. See httpMatch Block for details.
    httpMatch ListenerRuleMatchHttpMatch
    HTTP criteria that a rule must match. See httpMatch Block for details.
    http_match ListenerRuleMatchHttpMatch
    HTTP criteria that a rule must match. See httpMatch Block for details.
    httpMatch Property Map
    HTTP criteria that a rule must match. See httpMatch Block for details.

    ListenerRuleMatchHttpMatch, ListenerRuleMatchHttpMatchArgs

    HeaderMatches List<ListenerRuleMatchHttpMatchHeaderMatch>
    Header matches that match incoming requests based on the request header value before applying the rule action. See headerMatches Block for details.
    Method string
    HTTP method type.
    PathMatch ListenerRuleMatchHttpMatchPathMatch
    Path match. See pathMatch Block for details.
    HeaderMatches []ListenerRuleMatchHttpMatchHeaderMatch
    Header matches that match incoming requests based on the request header value before applying the rule action. See headerMatches Block for details.
    Method string
    HTTP method type.
    PathMatch ListenerRuleMatchHttpMatchPathMatch
    Path match. See pathMatch Block for details.
    header_matches list(object)
    Header matches that match incoming requests based on the request header value before applying the rule action. See headerMatches Block for details.
    method string
    HTTP method type.
    path_match object
    Path match. See pathMatch Block for details.
    headerMatches List<ListenerRuleMatchHttpMatchHeaderMatch>
    Header matches that match incoming requests based on the request header value before applying the rule action. See headerMatches Block for details.
    method String
    HTTP method type.
    pathMatch ListenerRuleMatchHttpMatchPathMatch
    Path match. See pathMatch Block for details.
    headerMatches ListenerRuleMatchHttpMatchHeaderMatch[]
    Header matches that match incoming requests based on the request header value before applying the rule action. See headerMatches Block for details.
    method string
    HTTP method type.
    pathMatch ListenerRuleMatchHttpMatchPathMatch
    Path match. See pathMatch Block for details.
    header_matches Sequence[ListenerRuleMatchHttpMatchHeaderMatch]
    Header matches that match incoming requests based on the request header value before applying the rule action. See headerMatches Block for details.
    method str
    HTTP method type.
    path_match ListenerRuleMatchHttpMatchPathMatch
    Path match. See pathMatch Block for details.
    headerMatches List<Property Map>
    Header matches that match incoming requests based on the request header value before applying the rule action. See headerMatches Block for details.
    method String
    HTTP method type.
    pathMatch Property Map
    Path match. See pathMatch Block for details.

    ListenerRuleMatchHttpMatchHeaderMatch, ListenerRuleMatchHttpMatchHeaderMatchArgs

    Match ListenerRuleMatchHttpMatchHeaderMatchMatch
    Header match type. See match.http_match.header_matches.match Block for details.
    Name string
    Name of the header.
    CaseSensitive bool
    Whether the match is case sensitive. Default is false.
    Match ListenerRuleMatchHttpMatchHeaderMatchMatch
    Header match type. See match.http_match.header_matches.match Block for details.
    Name string
    Name of the header.
    CaseSensitive bool
    Whether the match is case sensitive. Default is false.
    match object
    Header match type. See match.http_match.header_matches.match Block for details.
    name string
    Name of the header.
    case_sensitive bool
    Whether the match is case sensitive. Default is false.
    match ListenerRuleMatchHttpMatchHeaderMatchMatch
    Header match type. See match.http_match.header_matches.match Block for details.
    name String
    Name of the header.
    caseSensitive Boolean
    Whether the match is case sensitive. Default is false.
    match ListenerRuleMatchHttpMatchHeaderMatchMatch
    Header match type. See match.http_match.header_matches.match Block for details.
    name string
    Name of the header.
    caseSensitive boolean
    Whether the match is case sensitive. Default is false.
    match ListenerRuleMatchHttpMatchHeaderMatchMatch
    Header match type. See match.http_match.header_matches.match Block for details.
    name str
    Name of the header.
    case_sensitive bool
    Whether the match is case sensitive. Default is false.
    match Property Map
    Header match type. See match.http_match.header_matches.match Block for details.
    name String
    Name of the header.
    caseSensitive Boolean
    Whether the match is case sensitive. Default is false.

    ListenerRuleMatchHttpMatchHeaderMatchMatch, ListenerRuleMatchHttpMatchHeaderMatchMatchArgs

    Contains string
    Value that the header must contain to match.
    Exact string
    Exact type match.
    Prefix string
    Prefix type match. Matches the value with the prefix.
    Contains string
    Value that the header must contain to match.
    Exact string
    Exact type match.
    Prefix string
    Prefix type match. Matches the value with the prefix.
    contains string
    Value that the header must contain to match.
    exact string
    Exact type match.
    prefix string
    Prefix type match. Matches the value with the prefix.
    contains String
    Value that the header must contain to match.
    exact String
    Exact type match.
    prefix String
    Prefix type match. Matches the value with the prefix.
    contains string
    Value that the header must contain to match.
    exact string
    Exact type match.
    prefix string
    Prefix type match. Matches the value with the prefix.
    contains str
    Value that the header must contain to match.
    exact str
    Exact type match.
    prefix str
    Prefix type match. Matches the value with the prefix.
    contains String
    Value that the header must contain to match.
    exact String
    Exact type match.
    prefix String
    Prefix type match. Matches the value with the prefix.

    ListenerRuleMatchHttpMatchPathMatch, ListenerRuleMatchHttpMatchPathMatchArgs

    Match ListenerRuleMatchHttpMatchPathMatchMatch
    Path match type. See match.http_match.path_match.match Block for details.
    CaseSensitive bool
    Whether the match is case sensitive. Default is false.
    Match ListenerRuleMatchHttpMatchPathMatchMatch
    Path match type. See match.http_match.path_match.match Block for details.
    CaseSensitive bool
    Whether the match is case sensitive. Default is false.
    match object
    Path match type. See match.http_match.path_match.match Block for details.
    case_sensitive bool
    Whether the match is case sensitive. Default is false.
    match ListenerRuleMatchHttpMatchPathMatchMatch
    Path match type. See match.http_match.path_match.match Block for details.
    caseSensitive Boolean
    Whether the match is case sensitive. Default is false.
    match ListenerRuleMatchHttpMatchPathMatchMatch
    Path match type. See match.http_match.path_match.match Block for details.
    caseSensitive boolean
    Whether the match is case sensitive. Default is false.
    match ListenerRuleMatchHttpMatchPathMatchMatch
    Path match type. See match.http_match.path_match.match Block for details.
    case_sensitive bool
    Whether the match is case sensitive. Default is false.
    match Property Map
    Path match type. See match.http_match.path_match.match Block for details.
    caseSensitive Boolean
    Whether the match is case sensitive. Default is false.

    ListenerRuleMatchHttpMatchPathMatchMatch, ListenerRuleMatchHttpMatchPathMatchMatchArgs

    Exact string
    Exact type match.
    Prefix string
    Prefix type match. Matches the value with the prefix.
    Exact string
    Exact type match.
    Prefix string
    Prefix type match. Matches the value with the prefix.
    exact string
    Exact type match.
    prefix string
    Prefix type match. Matches the value with the prefix.
    exact String
    Exact type match.
    prefix String
    Prefix type match. Matches the value with the prefix.
    exact string
    Exact type match.
    prefix string
    Prefix type match. Matches the value with the prefix.
    exact str
    Exact type match.
    prefix str
    Prefix type match. Matches the value with the prefix.
    exact String
    Exact type match.
    prefix String
    Prefix type match. Matches the value with the prefix.

    Import

    Using pulumi import, import VPC Lattice Listener Rule using the id. For example:

    $ pulumi import aws:vpclattice/listenerRule:ListenerRule example service123/listener456/rule789
    

    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 logo
    Viewing docs for AWS v7.43.0
    published on Thursday, Aug 20, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial