ListenerRule

Provides a Load Balancer Listener Rule resource.

Note: aws.alb.ListenerRule is known as aws.lb.ListenerRule. The functionality is identical.

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var frontEndLoadBalancer = new Aws.LB.LoadBalancer("frontEndLoadBalancer", new Aws.LB.LoadBalancerArgs
        {
        });
        var frontEndListener = new Aws.LB.Listener("frontEndListener", new Aws.LB.ListenerArgs
        {
        });
        var @static = new Aws.LB.ListenerRule("static", new Aws.LB.ListenerRuleArgs
        {
            Actions = 
            {
                new Aws.LB.Inputs.ListenerRuleActionArgs
                {
                    TargetGroupArn = aws_lb_target_group.Static.Arn,
                    Type = "forward",
                },
            },
            Conditions = 
            {
                new Aws.LB.Inputs.ListenerRuleConditionArgs
                {
                    PathPattern = new Aws.LB.Inputs.ListenerRuleConditionPathPatternArgs
                    {
                        Values = 
                        {
                            "/static/*",
                        },
                    },
                },
                new Aws.LB.Inputs.ListenerRuleConditionArgs
                {
                    HostHeader = new Aws.LB.Inputs.ListenerRuleConditionHostHeaderArgs
                    {
                        Values = 
                        {
                            "example.com",
                        },
                    },
                },
            },
            ListenerArn = frontEndListener.Arn,
            Priority = 100,
        });
        var hostBasedRouting = new Aws.LB.ListenerRule("hostBasedRouting", new Aws.LB.ListenerRuleArgs
        {
            Actions = 
            {
                new Aws.LB.Inputs.ListenerRuleActionArgs
                {
                    Forward = new Aws.LB.Inputs.ListenerRuleActionForwardArgs
                    {
                        Stickiness = new Aws.LB.Inputs.ListenerRuleActionForwardStickinessArgs
                        {
                            Duration = 600,
                            Enabled = true,
                        },
                        TargetGroup = 
                        {
                            
                            {
                                { "arn", aws_lb_target_group.Main.Arn },
                                { "weight", 80 },
                            },
                            
                            {
                                { "arn", aws_lb_target_group.Canary.Arn },
                                { "weight", 20 },
                            },
                        },
                    },
                    Type = "forward",
                },
            },
            Conditions = 
            {
                new Aws.LB.Inputs.ListenerRuleConditionArgs
                {
                    HostHeader = new Aws.LB.Inputs.ListenerRuleConditionHostHeaderArgs
                    {
                        Values = 
                        {
                            "my-service.*.mycompany.io",
                        },
                    },
                },
            },
            ListenerArn = frontEndListener.Arn,
            Priority = 99,
        });
        var hostBasedWeightedRouting = new Aws.LB.ListenerRule("hostBasedWeightedRouting", new Aws.LB.ListenerRuleArgs
        {
            Actions = 
            {
                new Aws.LB.Inputs.ListenerRuleActionArgs
                {
                    TargetGroupArn = aws_lb_target_group.Static.Arn,
                    Type = "forward",
                },
            },
            Conditions = 
            {
                new Aws.LB.Inputs.ListenerRuleConditionArgs
                {
                    HostHeader = new Aws.LB.Inputs.ListenerRuleConditionHostHeaderArgs
                    {
                        Values = 
                        {
                            "my-service.*.mydomain.io",
                        },
                    },
                },
            },
            ListenerArn = frontEndListener.Arn,
            Priority = 99,
        });
        var redirectHttpToHttps = new Aws.LB.ListenerRule("redirectHttpToHttps", new Aws.LB.ListenerRuleArgs
        {
            Actions = 
            {
                new Aws.LB.Inputs.ListenerRuleActionArgs
                {
                    Redirect = new Aws.LB.Inputs.ListenerRuleActionRedirectArgs
                    {
                        Port = "443",
                        Protocol = "HTTPS",
                        StatusCode = "HTTP_301",
                    },
                    Type = "redirect",
                },
            },
            Conditions = 
            {
                new Aws.LB.Inputs.ListenerRuleConditionArgs
                {
                    HttpHeader = new Aws.LB.Inputs.ListenerRuleConditionHttpHeaderArgs
                    {
                        HttpHeaderName = "X-Forwarded-For",
                        Values = 
                        {
                            "192.168.1.*",
                        },
                    },
                },
            },
            ListenerArn = frontEndListener.Arn,
        });
        var healthCheck = new Aws.LB.ListenerRule("healthCheck", new Aws.LB.ListenerRuleArgs
        {
            Actions = 
            {
                new Aws.LB.Inputs.ListenerRuleActionArgs
                {
                    FixedResponse = new Aws.LB.Inputs.ListenerRuleActionFixedResponseArgs
                    {
                        ContentType = "text/plain",
                        MessageBody = "HEALTHY",
                        StatusCode = "200",
                    },
                    Type = "fixed-response",
                },
            },
            Conditions = 
            {
                new Aws.LB.Inputs.ListenerRuleConditionArgs
                {
                    QueryStrings = 
                    {
                        new Aws.LB.Inputs.ListenerRuleConditionQueryStringArgs
                        {
                            Key = "health",
                            Value = "check",
                        },
                        new Aws.LB.Inputs.ListenerRuleConditionQueryStringArgs
                        {
                            Value = "bar",
                        },
                    },
                },
            },
            ListenerArn = frontEndListener.Arn,
        });
        var pool = new Aws.Cognito.UserPool("pool", new Aws.Cognito.UserPoolArgs
        {
        });
        var client = new Aws.Cognito.UserPoolClient("client", new Aws.Cognito.UserPoolClientArgs
        {
        });
        var domain = new Aws.Cognito.UserPoolDomain("domain", new Aws.Cognito.UserPoolDomainArgs
        {
        });
        var admin = new Aws.LB.ListenerRule("admin", new Aws.LB.ListenerRuleArgs
        {
            Actions = 
            {
                new Aws.LB.Inputs.ListenerRuleActionArgs
                {
                    AuthenticateOidc = new Aws.LB.Inputs.ListenerRuleActionAuthenticateOidcArgs
                    {
                        AuthorizationEndpoint = "https://example.com/authorization_endpoint",
                        ClientId = "client_id",
                        ClientSecret = "client_secret",
                        Issuer = "https://example.com",
                        TokenEndpoint = "https://example.com/token_endpoint",
                        UserInfoEndpoint = "https://example.com/user_info_endpoint",
                    },
                    Type = "authenticate-oidc",
                },
                new Aws.LB.Inputs.ListenerRuleActionArgs
                {
                    TargetGroupArn = aws_lb_target_group.Static.Arn,
                    Type = "forward",
                },
            },
            ListenerArn = frontEndListener.Arn,
        });
    }

}
package main

import (
    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/cognito"
    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/lb"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := lb.NewLoadBalancer(ctx, "frontEndLoadBalancer", nil)
        if err != nil {
            return err
        }
        frontEndListener, err := lb.NewListener(ctx, "frontEndListener", nil)
        if err != nil {
            return err
        }
        _, err = lb.NewListenerRule(ctx, "static", &lb.ListenerRuleArgs{
            Actions: lb.ListenerRuleActionArray{
                &lb.ListenerRuleActionArgs{
                    TargetGroupArn: pulumi.String(aws_lb_target_group.Static.Arn),
                    Type:           pulumi.String("forward"),
                },
            },
            Conditions: lb.ListenerRuleConditionArray{
                &lb.ListenerRuleConditionArgs{
                    PathPattern: &lb.ListenerRuleConditionPathPatternArgs{
                        Values: pulumi.StringArray{
                            pulumi.String("/static/*"),
                        },
                    },
                },
                &lb.ListenerRuleConditionArgs{
                    HostHeader: &lb.ListenerRuleConditionHostHeaderArgs{
                        Values: pulumi.StringArray{
                            pulumi.String("example.com"),
                        },
                    },
                },
            },
            ListenerArn: frontEndListener.Arn,
            Priority:    pulumi.Int(100),
        })
        if err != nil {
            return err
        }
        _, err = lb.NewListenerRule(ctx, "hostBasedRouting", &lb.ListenerRuleArgs{
            Actions: lb.ListenerRuleActionArray{
                &lb.ListenerRuleActionArgs{
                    Forward: &lb.ListenerRuleActionForwardArgs{
                        Stickiness: &lb.ListenerRuleActionForwardStickinessArgs{
                            Duration: pulumi.Int(600),
                            Enabled:  pulumi.Bool(true),
                        },
                        TargetGroup: pulumi.MapArray{
                            pulumi.Map{
                                "arn":    pulumi.String(aws_lb_target_group.Main.Arn),
                                "weight": pulumi.Float64(80),
                            },
                            pulumi.Map{
                                "arn":    pulumi.String(aws_lb_target_group.Canary.Arn),
                                "weight": pulumi.Float64(20),
                            },
                        },
                    },
                    Type: pulumi.String("forward"),
                },
            },
            Conditions: lb.ListenerRuleConditionArray{
                &lb.ListenerRuleConditionArgs{
                    HostHeader: &lb.ListenerRuleConditionHostHeaderArgs{
                        Values: pulumi.StringArray{
                            pulumi.String("my-service.*.mycompany.io"),
                        },
                    },
                },
            },
            ListenerArn: frontEndListener.Arn,
            Priority:    pulumi.Int(99),
        })
        if err != nil {
            return err
        }
        _, err = lb.NewListenerRule(ctx, "hostBasedWeightedRouting", &lb.ListenerRuleArgs{
            Actions: lb.ListenerRuleActionArray{
                &lb.ListenerRuleActionArgs{
                    TargetGroupArn: pulumi.String(aws_lb_target_group.Static.Arn),
                    Type:           pulumi.String("forward"),
                },
            },
            Conditions: lb.ListenerRuleConditionArray{
                &lb.ListenerRuleConditionArgs{
                    HostHeader: &lb.ListenerRuleConditionHostHeaderArgs{
                        Values: pulumi.StringArray{
                            pulumi.String("my-service.*.mydomain.io"),
                        },
                    },
                },
            },
            ListenerArn: frontEndListener.Arn,
            Priority:    pulumi.Int(99),
        })
        if err != nil {
            return err
        }
        _, err = lb.NewListenerRule(ctx, "redirectHttpToHttps", &lb.ListenerRuleArgs{
            Actions: lb.ListenerRuleActionArray{
                &lb.ListenerRuleActionArgs{
                    Redirect: &lb.ListenerRuleActionRedirectArgs{
                        Port:       pulumi.String("443"),
                        Protocol:   pulumi.String("HTTPS"),
                        StatusCode: pulumi.String("HTTP_301"),
                    },
                    Type: pulumi.String("redirect"),
                },
            },
            Conditions: lb.ListenerRuleConditionArray{
                &lb.ListenerRuleConditionArgs{
                    HttpHeader: &lb.ListenerRuleConditionHttpHeaderArgs{
                        HttpHeaderName: pulumi.String("X-Forwarded-For"),
                        Values: pulumi.StringArray{
                            pulumi.String("192.168.1.*"),
                        },
                    },
                },
            },
            ListenerArn: frontEndListener.Arn,
        })
        if err != nil {
            return err
        }
        _, err = lb.NewListenerRule(ctx, "healthCheck", &lb.ListenerRuleArgs{
            Actions: lb.ListenerRuleActionArray{
                &lb.ListenerRuleActionArgs{
                    FixedResponse: &lb.ListenerRuleActionFixedResponseArgs{
                        ContentType: pulumi.String("text/plain"),
                        MessageBody: pulumi.String("HEALTHY"),
                        StatusCode:  pulumi.String("200"),
                    },
                    Type: pulumi.String("fixed-response"),
                },
            },
            Conditions: lb.ListenerRuleConditionArray{
                &lb.ListenerRuleConditionArgs{
                    QueryStrings: lb.ListenerRuleConditionQueryStringArray{
                        &lb.ListenerRuleConditionQueryStringArgs{
                            Key:   pulumi.String("health"),
                            Value: pulumi.String("check"),
                        },
                        &lb.ListenerRuleConditionQueryStringArgs{
                            Value: pulumi.String("bar"),
                        },
                    },
                },
            },
            ListenerArn: frontEndListener.Arn,
        })
        if err != nil {
            return err
        }
        _, err = cognito.NewUserPool(ctx, "pool", nil)
        if err != nil {
            return err
        }
        _, err = cognito.NewUserPoolClient(ctx, "client", nil)
        if err != nil {
            return err
        }
        _, err = cognito.NewUserPoolDomain(ctx, "domain", nil)
        if err != nil {
            return err
        }
        _, err = lb.NewListenerRule(ctx, "admin", &lb.ListenerRuleArgs{
            Actions: lb.ListenerRuleActionArray{
                &lb.ListenerRuleActionArgs{
                    AuthenticateOidc: &lb.ListenerRuleActionAuthenticateOidcArgs{
                        AuthorizationEndpoint: pulumi.String("https://example.com/authorization_endpoint"),
                        ClientId:              pulumi.String("client_id"),
                        ClientSecret:          pulumi.String("client_secret"),
                        Issuer:                pulumi.String("https://example.com"),
                        TokenEndpoint:         pulumi.String("https://example.com/token_endpoint"),
                        UserInfoEndpoint:      pulumi.String("https://example.com/user_info_endpoint"),
                    },
                    Type: pulumi.String("authenticate-oidc"),
                },
                &lb.ListenerRuleActionArgs{
                    TargetGroupArn: pulumi.String(aws_lb_target_group.Static.Arn),
                    Type:           pulumi.String("forward"),
                },
            },
            ListenerArn: frontEndListener.Arn,
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aws as aws

front_end_load_balancer = aws.lb.LoadBalancer("frontEndLoadBalancer")
front_end_listener = aws.lb.Listener("frontEndListener")
static = aws.lb.ListenerRule("static",
    actions=[{
        "target_group_arn": aws_lb_target_group["static"]["arn"],
        "type": "forward",
    }],
    conditions=[
        {
            "pathPattern": {
                "values": ["/static/*"],
            },
        },
        {
            "hostHeader": {
                "values": ["example.com"],
            },
        },
    ],
    listener_arn=front_end_listener.arn,
    priority=100)
host_based_routing = aws.lb.ListenerRule("hostBasedRouting",
    actions=[{
        "forward": {
            "stickiness": {
                "duration": 600,
                "enabled": True,
            },
            "targetGroup": [
                {
                    "arn": aws_lb_target_group["main"]["arn"],
                    "weight": 80,
                },
                {
                    "arn": aws_lb_target_group["canary"]["arn"],
                    "weight": 20,
                },
            ],
        },
        "type": "forward",
    }],
    conditions=[{
        "hostHeader": {
            "values": ["my-service.*.mycompany.io"],
        },
    }],
    listener_arn=front_end_listener.arn,
    priority=99)
host_based_weighted_routing = aws.lb.ListenerRule("hostBasedWeightedRouting",
    actions=[{
        "target_group_arn": aws_lb_target_group["static"]["arn"],
        "type": "forward",
    }],
    conditions=[{
        "hostHeader": {
            "values": ["my-service.*.mydomain.io"],
        },
    }],
    listener_arn=front_end_listener.arn,
    priority=99)
redirect_http_to_https = aws.lb.ListenerRule("redirectHttpToHttps",
    actions=[{
        "redirect": {
            "port": "443",
            "protocol": "HTTPS",
            "status_code": "HTTP_301",
        },
        "type": "redirect",
    }],
    conditions=[{
        "httpHeader": {
            "httpHeaderName": "X-Forwarded-For",
            "values": ["192.168.1.*"],
        },
    }],
    listener_arn=front_end_listener.arn)
health_check = aws.lb.ListenerRule("healthCheck",
    actions=[{
        "fixedResponse": {
            "content_type": "text/plain",
            "messageBody": "HEALTHY",
            "status_code": "200",
        },
        "type": "fixed-response",
    }],
    conditions=[{
        "queryStrings": [
            {
                "key": "health",
                "value": "check",
            },
            {
                "value": "bar",
            },
        ],
    }],
    listener_arn=front_end_listener.arn)
pool = aws.cognito.UserPool("pool")
client = aws.cognito.UserPoolClient("client")
domain = aws.cognito.UserPoolDomain("domain")
admin = aws.lb.ListenerRule("admin",
    actions=[
        {
            "authenticateOidc": {
                "authorizationEndpoint": "https://example.com/authorization_endpoint",
                "client_id": "client_id",
                "client_secret": "client_secret",
                "issuer": "https://example.com",
                "tokenEndpoint": "https://example.com/token_endpoint",
                "userInfoEndpoint": "https://example.com/user_info_endpoint",
            },
            "type": "authenticate-oidc",
        },
        {
            "target_group_arn": aws_lb_target_group["static"]["arn"],
            "type": "forward",
        },
    ],
    listener_arn=front_end_listener.arn)
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const frontEndLoadBalancer = new aws.lb.LoadBalancer("front_end", {});
const frontEndListener = new aws.lb.Listener("front_end", {});
const static = new aws.lb.ListenerRule("static", {
    actions: [{
        targetGroupArn: aws_lb_target_group_static.arn,
        type: "forward",
    }],
    conditions: [
        {
            pathPattern: {
                values: ["/static/*"],
            },
        },
        {
            hostHeader: {
                values: ["example.com"],
            },
        },
    ],
    listenerArn: frontEndListener.arn,
    priority: 100,
});
const hostBasedRouting = new aws.lb.ListenerRule("host_based_routing", {
    actions: [{
        forward: {
            stickiness: {
                duration: 600,
                enabled: true,
            },
            targetGroups: [
                {
                    arn: aws_lb_target_group_main.arn,
                    weight: 80,
                },
                {
                    arn: aws_lb_target_group_canary.arn,
                    weight: 20,
                },
            ],
        },
        type: "forward",
    }],
    conditions: [{
        hostHeader: {
            values: ["my-service.*.mycompany.io"],
        },
    }],
    listenerArn: frontEndListener.arn,
    priority: 99,
});
const hostBasedWeightedRouting = new aws.lb.ListenerRule("host_based_weighted_routing", {
    actions: [{
        targetGroupArn: aws_lb_target_group_static.arn,
        type: "forward",
    }],
    conditions: [{
        hostHeader: {
            values: ["my-service.*.mydomain.io"],
        },
    }],
    listenerArn: frontEndListener.arn,
    priority: 99,
});
const redirectHttpToHttps = new aws.lb.ListenerRule("redirect_http_to_https", {
    actions: [{
        redirect: {
            port: "443",
            protocol: "HTTPS",
            statusCode: "HTTP_301",
        },
        type: "redirect",
    }],
    conditions: [{
        httpHeader: {
            httpHeaderName: "X-Forwarded-For",
            values: ["192.168.1.*"],
        },
    }],
    listenerArn: frontEndListener.arn,
});
const healthCheck = new aws.lb.ListenerRule("health_check", {
    actions: [{
        fixedResponse: {
            contentType: "text/plain",
            messageBody: "HEALTHY",
            statusCode: "200",
        },
        type: "fixed-response",
    }],
    conditions: [{
        queryStrings: [
            {
                key: "health",
                value: "check",
            },
            {
                value: "bar",
            },
        ],
    }],
    listenerArn: frontEndListener.arn,
});
const pool = new aws.cognito.UserPool("pool", {});
const client = new aws.cognito.UserPoolClient("client", {});
const domain = new aws.cognito.UserPoolDomain("domain", {});
const admin = new aws.lb.ListenerRule("admin", {
    actions: [
        {
            authenticateOidc: {
                authorizationEndpoint: "https://example.com/authorization_endpoint",
                clientId: "client_id",
                clientSecret: "client_secret",
                issuer: "https://example.com",
                tokenEndpoint: "https://example.com/token_endpoint",
                userInfoEndpoint: "https://example.com/user_info_endpoint",
            },
            type: "authenticate-oidc",
        },
        {
            targetGroupArn: aws_lb_target_group_static.arn,
            type: "forward",
        },
    ],
    listenerArn: frontEndListener.arn,
});

Deprecated: aws.applicationloadbalancing.ListenerRule has been deprecated in favor of aws.alb.ListenerRule

Create a ListenerRule Resource

def ListenerRule(resource_name, opts=None, actions=None, conditions=None, listener_arn=None, priority=None, __props__=None);
func NewListenerRule(ctx *Context, name string, args ListenerRuleArgs, opts ...ResourceOption) (*ListenerRule, error)
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.
opts ResourceOptions
A bag of options that control this 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.

ListenerRule Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The ListenerRule resource accepts the following input properties:

Actions List<ListenerRuleActionArgs>

An Action block. Action blocks are documented below.

Conditions List<ListenerRuleConditionArgs>

A Condition block. Multiple condition blocks of different types can be set and all must be satisfied for the rule to match. Condition blocks are documented below.

ListenerArn string

The ARN of the listener to which to attach the rule.

Priority int

The priority for the rule between 1 and 50000. Leaving it unset will automatically set the rule with next available priority after currently existing highest rule. A listener can’t have multiple rules with the same priority.

Actions []ListenerRuleAction

An Action block. Action blocks are documented below.

Conditions []ListenerRuleCondition

A Condition block. Multiple condition blocks of different types can be set and all must be satisfied for the rule to match. Condition blocks are documented below.

ListenerArn string

The ARN of the listener to which to attach the rule.

Priority int

The priority for the rule between 1 and 50000. Leaving it unset will automatically set the rule with next available priority after currently existing highest rule. A listener can’t have multiple rules with the same priority.

actions ListenerRuleAction[]

An Action block. Action blocks are documented below.

conditions ListenerRuleCondition[]

A Condition block. Multiple condition blocks of different types can be set and all must be satisfied for the rule to match. Condition blocks are documented below.

listenerArn string

The ARN of the listener to which to attach the rule.

priority number

The priority for the rule between 1 and 50000. Leaving it unset will automatically set the rule with next available priority after currently existing highest rule. A listener can’t have multiple rules with the same priority.

actions List[ListenerRuleAction]

An Action block. Action blocks are documented below.

conditions List[ListenerRuleCondition]

A Condition block. Multiple condition blocks of different types can be set and all must be satisfied for the rule to match. Condition blocks are documented below.

listener_arn str

The ARN of the listener to which to attach the rule.

priority float

The priority for the rule between 1 and 50000. Leaving it unset will automatically set the rule with next available priority after currently existing highest rule. A listener can’t have multiple rules with the same priority.

Outputs

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

Arn string

The Amazon Resource Name (ARN) of the target group.

Id string
The provider-assigned unique ID for this managed resource.
Arn string

The Amazon Resource Name (ARN) of the target group.

Id string
The provider-assigned unique ID for this managed resource.
arn string

The Amazon Resource Name (ARN) of the target group.

id string
The provider-assigned unique ID for this managed resource.
arn str

The Amazon Resource Name (ARN) of the target group.

id str
The provider-assigned unique ID for this managed resource.

Look up an 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
static get(resource_name, id, opts=None, actions=None, arn=None, conditions=None, listener_arn=None, priority=None, __props__=None);
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)
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.

The following state arguments are supported:

Actions List<ListenerRuleActionArgs>

An Action block. Action blocks are documented below.

Arn string

The Amazon Resource Name (ARN) of the target group.

Conditions List<ListenerRuleConditionArgs>

A Condition block. Multiple condition blocks of different types can be set and all must be satisfied for the rule to match. Condition blocks are documented below.

ListenerArn string

The ARN of the listener to which to attach the rule.

Priority int

The priority for the rule between 1 and 50000. Leaving it unset will automatically set the rule with next available priority after currently existing highest rule. A listener can’t have multiple rules with the same priority.

Actions []ListenerRuleAction

An Action block. Action blocks are documented below.

Arn string

The Amazon Resource Name (ARN) of the target group.

Conditions []ListenerRuleCondition

A Condition block. Multiple condition blocks of different types can be set and all must be satisfied for the rule to match. Condition blocks are documented below.

ListenerArn string

The ARN of the listener to which to attach the rule.

Priority int

The priority for the rule between 1 and 50000. Leaving it unset will automatically set the rule with next available priority after currently existing highest rule. A listener can’t have multiple rules with the same priority.

actions ListenerRuleAction[]

An Action block. Action blocks are documented below.

arn string

The Amazon Resource Name (ARN) of the target group.

conditions ListenerRuleCondition[]

A Condition block. Multiple condition blocks of different types can be set and all must be satisfied for the rule to match. Condition blocks are documented below.

listenerArn string

The ARN of the listener to which to attach the rule.

priority number

The priority for the rule between 1 and 50000. Leaving it unset will automatically set the rule with next available priority after currently existing highest rule. A listener can’t have multiple rules with the same priority.

actions List[ListenerRuleAction]

An Action block. Action blocks are documented below.

arn str

The Amazon Resource Name (ARN) of the target group.

conditions List[ListenerRuleCondition]

A Condition block. Multiple condition blocks of different types can be set and all must be satisfied for the rule to match. Condition blocks are documented below.

listener_arn str

The ARN of the listener to which to attach the rule.

priority float

The priority for the rule between 1 and 50000. Leaving it unset will automatically set the rule with next available priority after currently existing highest rule. A listener can’t have multiple rules with the same priority.

Supporting Types

ListenerRuleAction

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Type string

The type of routing action. Valid values are forward, redirect, fixed-response, authenticate-cognito and authenticate-oidc.

AuthenticateCognito ListenerRuleActionAuthenticateCognitoArgs

Information for creating an authenticate action using Cognito. Required if type is authenticate-cognito.

AuthenticateOidc ListenerRuleActionAuthenticateOidcArgs

Information for creating an authenticate action using OIDC. Required if type is authenticate-oidc.

FixedResponse ListenerRuleActionFixedResponseArgs

Information for creating an action that returns a custom HTTP response. Required if type is fixed-response.

Forward ListenerRuleActionForwardArgs

Information for creating an action that distributes requests among one or more target groups. Specify only if type is forward. If you specify both forward block and target_group_arn attribute, you can specify only one target group using forward and it must be the same target group specified in target_group_arn.

Order int
Redirect ListenerRuleActionRedirectArgs

Information for creating a redirect action. Required if type is redirect.

TargetGroupArn string

The ARN of the Target Group to which to route traffic. Specify only if type is forward and you want to route to a single target group. To route to one or more target groups, use a forward block instead.

Type string

The type of routing action. Valid values are forward, redirect, fixed-response, authenticate-cognito and authenticate-oidc.

AuthenticateCognito ListenerRuleActionAuthenticateCognito

Information for creating an authenticate action using Cognito. Required if type is authenticate-cognito.

AuthenticateOidc ListenerRuleActionAuthenticateOidc

Information for creating an authenticate action using OIDC. Required if type is authenticate-oidc.

FixedResponse ListenerRuleActionFixedResponse

Information for creating an action that returns a custom HTTP response. Required if type is fixed-response.

Forward ListenerRuleActionForward

Information for creating an action that distributes requests among one or more target groups. Specify only if type is forward. If you specify both forward block and target_group_arn attribute, you can specify only one target group using forward and it must be the same target group specified in target_group_arn.

Order int
Redirect ListenerRuleActionRedirect

Information for creating a redirect action. Required if type is redirect.

TargetGroupArn string

The ARN of the Target Group to which to route traffic. Specify only if type is forward and you want to route to a single target group. To route to one or more target groups, use a forward block instead.

type string

The type of routing action. Valid values are forward, redirect, fixed-response, authenticate-cognito and authenticate-oidc.

authenticateCognito ListenerRuleActionAuthenticateCognito

Information for creating an authenticate action using Cognito. Required if type is authenticate-cognito.

authenticateOidc ListenerRuleActionAuthenticateOidc

Information for creating an authenticate action using OIDC. Required if type is authenticate-oidc.

fixedResponse ListenerRuleActionFixedResponse

Information for creating an action that returns a custom HTTP response. Required if type is fixed-response.

forward ListenerRuleActionForward

Information for creating an action that distributes requests among one or more target groups. Specify only if type is forward. If you specify both forward block and target_group_arn attribute, you can specify only one target group using forward and it must be the same target group specified in target_group_arn.

order number
redirect ListenerRuleActionRedirect

Information for creating a redirect action. Required if type is redirect.

targetGroupArn string

The ARN of the Target Group to which to route traffic. Specify only if type is forward and you want to route to a single target group. To route to one or more target groups, use a forward block instead.

type str

The type of routing action. Valid values are forward, redirect, fixed-response, authenticate-cognito and authenticate-oidc.

authenticateCognito Dict[ListenerRuleActionAuthenticateCognito]

Information for creating an authenticate action using Cognito. Required if type is authenticate-cognito.

authenticateOidc Dict[ListenerRuleActionAuthenticateOidc]

Information for creating an authenticate action using OIDC. Required if type is authenticate-oidc.

fixedResponse Dict[ListenerRuleActionFixedResponse]

Information for creating an action that returns a custom HTTP response. Required if type is fixed-response.

forward Dict[ListenerRuleActionForward]

Information for creating an action that distributes requests among one or more target groups. Specify only if type is forward. If you specify both forward block and target_group_arn attribute, you can specify only one target group using forward and it must be the same target group specified in target_group_arn.

order float
redirect Dict[ListenerRuleActionRedirect]

Information for creating a redirect action. Required if type is redirect.

target_group_arn str

The ARN of the Target Group to which to route traffic. Specify only if type is forward and you want to route to a single target group. To route to one or more target groups, use a forward block instead.

ListenerRuleActionAuthenticateCognito

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

UserPoolArn string

The ARN of the Cognito user pool.

UserPoolClientId string

The ID of the Cognito user pool client.

UserPoolDomain string

The domain prefix or fully-qualified domain name of the Cognito user pool.

AuthenticationRequestExtraParams Dictionary<string, string>

The query parameters to include in the redirect request to the authorization endpoint. Max: 10.

OnUnauthenticatedRequest string

The behavior if the user is not authenticated. Valid values: deny, allow and authenticate

Scope string

The set of user claims to be requested from the IdP.

SessionCookieName string

The name of the cookie used to maintain session information.

SessionTimeout int

The maximum duration of the authentication session, in seconds.

UserPoolArn string

The ARN of the Cognito user pool.

UserPoolClientId string

The ID of the Cognito user pool client.

UserPoolDomain string

The domain prefix or fully-qualified domain name of the Cognito user pool.

AuthenticationRequestExtraParams map[string]string

The query parameters to include in the redirect request to the authorization endpoint. Max: 10.

OnUnauthenticatedRequest string

The behavior if the user is not authenticated. Valid values: deny, allow and authenticate

Scope string

The set of user claims to be requested from the IdP.

SessionCookieName string

The name of the cookie used to maintain session information.

SessionTimeout int

The maximum duration of the authentication session, in seconds.

userPoolArn string

The ARN of the Cognito user pool.

userPoolClientId string

The ID of the Cognito user pool client.

userPoolDomain string

The domain prefix or fully-qualified domain name of the Cognito user pool.

authenticationRequestExtraParams {[key: string]: string}

The query parameters to include in the redirect request to the authorization endpoint. Max: 10.

onUnauthenticatedRequest string

The behavior if the user is not authenticated. Valid values: deny, allow and authenticate

scope string

The set of user claims to be requested from the IdP.

sessionCookieName string

The name of the cookie used to maintain session information.

sessionTimeout number

The maximum duration of the authentication session, in seconds.

userPoolArn str

The ARN of the Cognito user pool.

userPoolClientId str

The ID of the Cognito user pool client.

userPoolDomain str

The domain prefix or fully-qualified domain name of the Cognito user pool.

authenticationRequestExtraParams Dict[str, str]

The query parameters to include in the redirect request to the authorization endpoint. Max: 10.

onUnauthenticatedRequest str

The behavior if the user is not authenticated. Valid values: deny, allow and authenticate

scope str

The set of user claims to be requested from the IdP.

sessionCookieName str

The name of the cookie used to maintain session information.

sessionTimeout float

The maximum duration of the authentication session, in seconds.

ListenerRuleActionAuthenticateOidc

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

AuthorizationEndpoint string

The authorization endpoint of the IdP.

ClientId string

The OAuth 2.0 client identifier.

ClientSecret string

The OAuth 2.0 client secret.

Issuer string

The OIDC issuer identifier of the IdP.

TokenEndpoint string

The token endpoint of the IdP.

UserInfoEndpoint string

The user info endpoint of the IdP.

AuthenticationRequestExtraParams Dictionary<string, string>

The query parameters to include in the redirect request to the authorization endpoint. Max: 10.

OnUnauthenticatedRequest string

The behavior if the user is not authenticated. Valid values: deny, allow and authenticate

Scope string

The set of user claims to be requested from the IdP.

SessionCookieName string

The name of the cookie used to maintain session information.

SessionTimeout int

The maximum duration of the authentication session, in seconds.

AuthorizationEndpoint string

The authorization endpoint of the IdP.

ClientId string

The OAuth 2.0 client identifier.

ClientSecret string

The OAuth 2.0 client secret.

Issuer string

The OIDC issuer identifier of the IdP.

TokenEndpoint string

The token endpoint of the IdP.

UserInfoEndpoint string

The user info endpoint of the IdP.

AuthenticationRequestExtraParams map[string]string

The query parameters to include in the redirect request to the authorization endpoint. Max: 10.

OnUnauthenticatedRequest string

The behavior if the user is not authenticated. Valid values: deny, allow and authenticate

Scope string

The set of user claims to be requested from the IdP.

SessionCookieName string

The name of the cookie used to maintain session information.

SessionTimeout int

The maximum duration of the authentication session, in seconds.

authorizationEndpoint string

The authorization endpoint of the IdP.

clientId string

The OAuth 2.0 client identifier.

clientSecret string

The OAuth 2.0 client secret.

issuer string

The OIDC issuer identifier of the IdP.

tokenEndpoint string

The token endpoint of the IdP.

userInfoEndpoint string

The user info endpoint of the IdP.

authenticationRequestExtraParams {[key: string]: string}

The query parameters to include in the redirect request to the authorization endpoint. Max: 10.

onUnauthenticatedRequest string

The behavior if the user is not authenticated. Valid values: deny, allow and authenticate

scope string

The set of user claims to be requested from the IdP.

sessionCookieName string

The name of the cookie used to maintain session information.

sessionTimeout number

The maximum duration of the authentication session, in seconds.

authorizationEndpoint str

The authorization endpoint of the IdP.

client_id str

The OAuth 2.0 client identifier.

client_secret str

The OAuth 2.0 client secret.

issuer str

The OIDC issuer identifier of the IdP.

tokenEndpoint str

The token endpoint of the IdP.

userInfoEndpoint str

The user info endpoint of the IdP.

authenticationRequestExtraParams Dict[str, str]

The query parameters to include in the redirect request to the authorization endpoint. Max: 10.

onUnauthenticatedRequest str

The behavior if the user is not authenticated. Valid values: deny, allow and authenticate

scope str

The set of user claims to be requested from the IdP.

sessionCookieName str

The name of the cookie used to maintain session information.

sessionTimeout float

The maximum duration of the authentication session, in seconds.

ListenerRuleActionFixedResponse

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

ContentType string

The content type. Valid values are text/plain, text/css, text/html, application/javascript and application/json.

MessageBody string

The message body.

StatusCode string

The HTTP response code. Valid values are 2XX, 4XX, or 5XX.

ContentType string

The content type. Valid values are text/plain, text/css, text/html, application/javascript and application/json.

MessageBody string

The message body.

StatusCode string

The HTTP response code. Valid values are 2XX, 4XX, or 5XX.

contentType string

The content type. Valid values are text/plain, text/css, text/html, application/javascript and application/json.

messageBody string

The message body.

statusCode string

The HTTP response code. Valid values are 2XX, 4XX, or 5XX.

content_type str

The content type. Valid values are text/plain, text/css, text/html, application/javascript and application/json.

messageBody str

The message body.

status_code str

The HTTP response code. Valid values are 2XX, 4XX, or 5XX.

ListenerRuleActionForward

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

TargetGroups List<ListenerRuleActionForwardTargetGroupArgs>

One or more target groups block.

Stickiness ListenerRuleActionForwardStickinessArgs

The target group stickiness for the rule.

TargetGroups []ListenerRuleActionForwardTargetGroup

One or more target groups block.

Stickiness ListenerRuleActionForwardStickiness

The target group stickiness for the rule.

targetGroups ListenerRuleActionForwardTargetGroup[]

One or more target groups block.

stickiness ListenerRuleActionForwardStickiness

The target group stickiness for the rule.

targetGroups List[ListenerRuleActionForwardTargetGroup]

One or more target groups block.

stickiness Dict[ListenerRuleActionForwardStickiness]

The target group stickiness for the rule.

ListenerRuleActionForwardStickiness

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Duration int

The time period, in seconds, during which requests from a client should be routed to the same target group. The range is 1-604800 seconds (7 days).

Enabled bool

Indicates whether target group stickiness is enabled.

Duration int

The time period, in seconds, during which requests from a client should be routed to the same target group. The range is 1-604800 seconds (7 days).

Enabled bool

Indicates whether target group stickiness is enabled.

duration number

The time period, in seconds, during which requests from a client should be routed to the same target group. The range is 1-604800 seconds (7 days).

enabled boolean

Indicates whether target group stickiness is enabled.

duration float

The time period, in seconds, during which requests from a client should be routed to the same target group. The range is 1-604800 seconds (7 days).

enabled bool

Indicates whether target group stickiness is enabled.

ListenerRuleActionForwardTargetGroup

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Arn string

The Amazon Resource Name (ARN) of the target group.

Weight int

The weight. The range is 0 to 999.

Arn string

The Amazon Resource Name (ARN) of the target group.

Weight int

The weight. The range is 0 to 999.

arn string

The Amazon Resource Name (ARN) of the target group.

weight number

The weight. The range is 0 to 999.

arn str

The Amazon Resource Name (ARN) of the target group.

weight float

The weight. The range is 0 to 999.

ListenerRuleActionRedirect

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

StatusCode string

The HTTP redirect code. The redirect is either permanent (HTTP_301) or temporary (HTTP_302).

Host string

The hostname. This component is not percent-encoded. The hostname can contain #{host}. Defaults to #{host}.

Path string

The absolute path, starting with the leading “/”. This component is not percent-encoded. The path can contain #{host}, #{path}, and #{port}. Defaults to /#{path}.

Port string

The port. Specify a value from 1 to 65535 or #{port}. Defaults to #{port}.

Protocol string

The protocol. Valid values are HTTP, HTTPS, or #{protocol}. Defaults to #{protocol}.

Query string

The query parameters, URL-encoded when necessary, but not percent-encoded. Do not include the leading “?”. Defaults to #{query}.

StatusCode string

The HTTP redirect code. The redirect is either permanent (HTTP_301) or temporary (HTTP_302).

Host string

The hostname. This component is not percent-encoded. The hostname can contain #{host}. Defaults to #{host}.

Path string

The absolute path, starting with the leading “/”. This component is not percent-encoded. The path can contain #{host}, #{path}, and #{port}. Defaults to /#{path}.

Port string

The port. Specify a value from 1 to 65535 or #{port}. Defaults to #{port}.

Protocol string

The protocol. Valid values are HTTP, HTTPS, or #{protocol}. Defaults to #{protocol}.

Query string

The query parameters, URL-encoded when necessary, but not percent-encoded. Do not include the leading “?”. Defaults to #{query}.

statusCode string

The HTTP redirect code. The redirect is either permanent (HTTP_301) or temporary (HTTP_302).

host string

The hostname. This component is not percent-encoded. The hostname can contain #{host}. Defaults to #{host}.

path string

The absolute path, starting with the leading “/”. This component is not percent-encoded. The path can contain #{host}, #{path}, and #{port}. Defaults to /#{path}.

port string

The port. Specify a value from 1 to 65535 or #{port}. Defaults to #{port}.

protocol string

The protocol. Valid values are HTTP, HTTPS, or #{protocol}. Defaults to #{protocol}.

query string

The query parameters, URL-encoded when necessary, but not percent-encoded. Do not include the leading “?”. Defaults to #{query}.

status_code str

The HTTP redirect code. The redirect is either permanent (HTTP_301) or temporary (HTTP_302).

host str

The hostname. This component is not percent-encoded. The hostname can contain #{host}. Defaults to #{host}.

path str

The absolute path, starting with the leading “/”. This component is not percent-encoded. The path can contain #{host}, #{path}, and #{port}. Defaults to /#{path}.

port str

The port. Specify a value from 1 to 65535 or #{port}. Defaults to #{port}.

protocol str

The protocol. Valid values are HTTP, HTTPS, or #{protocol}. Defaults to #{protocol}.

query str

The query parameters, URL-encoded when necessary, but not percent-encoded. Do not include the leading “?”. Defaults to #{query}.

ListenerRuleCondition

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Field string

The type of condition. Valid values are host-header or path-pattern. Must also set values.

Deprecated: use 'host_header' or 'path_pattern' attribute instead

HostHeader ListenerRuleConditionHostHeaderArgs

Contains a single values item which is a list of host header patterns to match. The maximum size of each pattern is 128 characters. Comparison is case insensitive. Wildcard characters supported: * (matches 0 or more characters) and ? (matches exactly 1 character). Only one pattern needs to match for the condition to be satisfied.

HttpHeader ListenerRuleConditionHttpHeaderArgs

HTTP headers to match. HTTP Header block fields documented below.

HttpRequestMethod ListenerRuleConditionHttpRequestMethodArgs

Contains a single values item which is a list of HTTP request methods or verbs to match. Maximum size is 40 characters. Only allowed characters are A-Z, hyphen (-) and underscore (_). Comparison is case sensitive. Wildcards are not supported. Only one needs to match for the condition to be satisfied. AWS recommends that GET and HEAD requests are routed in the same way because the response to a HEAD request may be cached.

PathPattern ListenerRuleConditionPathPatternArgs

Contains a single values item which is a list of path patterns to match against the request URL. Maximum size of each pattern is 128 characters. Comparison is case sensitive. Wildcard characters supported: * (matches 0 or more characters) and ? (matches exactly 1 character). Only one pattern needs to match for the condition to be satisfied. Path pattern is compared only to the path of the URL, not to its query string. To compare against the query string, use a query_string condition.

QueryStrings List<ListenerRuleConditionQueryStringArgs>

Query strings to match. Query String block fields documented below.

SourceIp ListenerRuleConditionSourceIpArgs

Contains a single values item which is a list of source IP CIDR notations to match. You can use both IPv4 and IPv6 addresses. Wildcards are not supported. Condition is satisfied if the source IP address of the request matches one of the CIDR blocks. Condition is not satisfied by the addresses in the X-Forwarded-For header, use http_header condition instead.

Values string

List of exactly one pattern to match. Required when field is set.

Deprecated: use 'host_header' or 'path_pattern' attribute instead

Field string

The type of condition. Valid values are host-header or path-pattern. Must also set values.

Deprecated: use 'host_header' or 'path_pattern' attribute instead

HostHeader ListenerRuleConditionHostHeader

Contains a single values item which is a list of host header patterns to match. The maximum size of each pattern is 128 characters. Comparison is case insensitive. Wildcard characters supported: * (matches 0 or more characters) and ? (matches exactly 1 character). Only one pattern needs to match for the condition to be satisfied.

HttpHeader ListenerRuleConditionHttpHeader

HTTP headers to match. HTTP Header block fields documented below.

HttpRequestMethod ListenerRuleConditionHttpRequestMethod

Contains a single values item which is a list of HTTP request methods or verbs to match. Maximum size is 40 characters. Only allowed characters are A-Z, hyphen (-) and underscore (_). Comparison is case sensitive. Wildcards are not supported. Only one needs to match for the condition to be satisfied. AWS recommends that GET and HEAD requests are routed in the same way because the response to a HEAD request may be cached.

PathPattern ListenerRuleConditionPathPattern

Contains a single values item which is a list of path patterns to match against the request URL. Maximum size of each pattern is 128 characters. Comparison is case sensitive. Wildcard characters supported: * (matches 0 or more characters) and ? (matches exactly 1 character). Only one pattern needs to match for the condition to be satisfied. Path pattern is compared only to the path of the URL, not to its query string. To compare against the query string, use a query_string condition.

QueryStrings []ListenerRuleConditionQueryString

Query strings to match. Query String block fields documented below.

SourceIp ListenerRuleConditionSourceIp

Contains a single values item which is a list of source IP CIDR notations to match. You can use both IPv4 and IPv6 addresses. Wildcards are not supported. Condition is satisfied if the source IP address of the request matches one of the CIDR blocks. Condition is not satisfied by the addresses in the X-Forwarded-For header, use http_header condition instead.

Values string

List of exactly one pattern to match. Required when field is set.

Deprecated: use 'host_header' or 'path_pattern' attribute instead

field string

The type of condition. Valid values are host-header or path-pattern. Must also set values.

Deprecated: use 'host_header' or 'path_pattern' attribute instead

hostHeader ListenerRuleConditionHostHeader

Contains a single values item which is a list of host header patterns to match. The maximum size of each pattern is 128 characters. Comparison is case insensitive. Wildcard characters supported: * (matches 0 or more characters) and ? (matches exactly 1 character). Only one pattern needs to match for the condition to be satisfied.

httpHeader ListenerRuleConditionHttpHeader

HTTP headers to match. HTTP Header block fields documented below.

httpRequestMethod ListenerRuleConditionHttpRequestMethod

Contains a single values item which is a list of HTTP request methods or verbs to match. Maximum size is 40 characters. Only allowed characters are A-Z, hyphen (-) and underscore (_). Comparison is case sensitive. Wildcards are not supported. Only one needs to match for the condition to be satisfied. AWS recommends that GET and HEAD requests are routed in the same way because the response to a HEAD request may be cached.

pathPattern ListenerRuleConditionPathPattern

Contains a single values item which is a list of path patterns to match against the request URL. Maximum size of each pattern is 128 characters. Comparison is case sensitive. Wildcard characters supported: * (matches 0 or more characters) and ? (matches exactly 1 character). Only one pattern needs to match for the condition to be satisfied. Path pattern is compared only to the path of the URL, not to its query string. To compare against the query string, use a query_string condition.

queryStrings ListenerRuleConditionQueryString[]

Query strings to match. Query String block fields documented below.

sourceIp ListenerRuleConditionSourceIp

Contains a single values item which is a list of source IP CIDR notations to match. You can use both IPv4 and IPv6 addresses. Wildcards are not supported. Condition is satisfied if the source IP address of the request matches one of the CIDR blocks. Condition is not satisfied by the addresses in the X-Forwarded-For header, use http_header condition instead.

values string

List of exactly one pattern to match. Required when field is set.

Deprecated: use 'host_header' or 'path_pattern' attribute instead

field str

The type of condition. Valid values are host-header or path-pattern. Must also set values.

Deprecated: use 'host_header' or 'path_pattern' attribute instead

hostHeader Dict[ListenerRuleConditionHostHeader]

Contains a single values item which is a list of host header patterns to match. The maximum size of each pattern is 128 characters. Comparison is case insensitive. Wildcard characters supported: * (matches 0 or more characters) and ? (matches exactly 1 character). Only one pattern needs to match for the condition to be satisfied.

httpHeader Dict[ListenerRuleConditionHttpHeader]

HTTP headers to match. HTTP Header block fields documented below.

httpRequestMethod Dict[ListenerRuleConditionHttpRequestMethod]

Contains a single values item which is a list of HTTP request methods or verbs to match. Maximum size is 40 characters. Only allowed characters are A-Z, hyphen (-) and underscore (_). Comparison is case sensitive. Wildcards are not supported. Only one needs to match for the condition to be satisfied. AWS recommends that GET and HEAD requests are routed in the same way because the response to a HEAD request may be cached.

pathPattern Dict[ListenerRuleConditionPathPattern]

Contains a single values item which is a list of path patterns to match against the request URL. Maximum size of each pattern is 128 characters. Comparison is case sensitive. Wildcard characters supported: * (matches 0 or more characters) and ? (matches exactly 1 character). Only one pattern needs to match for the condition to be satisfied. Path pattern is compared only to the path of the URL, not to its query string. To compare against the query string, use a query_string condition.

queryStrings List[ListenerRuleConditionQueryString]

Query strings to match. Query String block fields documented below.

sourceIp Dict[ListenerRuleConditionSourceIp]

Contains a single values item which is a list of source IP CIDR notations to match. You can use both IPv4 and IPv6 addresses. Wildcards are not supported. Condition is satisfied if the source IP address of the request matches one of the CIDR blocks. Condition is not satisfied by the addresses in the X-Forwarded-For header, use http_header condition instead.

values str

List of exactly one pattern to match. Required when field is set.

Deprecated: use 'host_header' or 'path_pattern' attribute instead

ListenerRuleConditionHostHeader

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Values List<string>

List of exactly one pattern to match. Required when field is set.

Values []string

List of exactly one pattern to match. Required when field is set.

values string[]

List of exactly one pattern to match. Required when field is set.

values List[str]

List of exactly one pattern to match. Required when field is set.

ListenerRuleConditionHttpHeader

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

HttpHeaderName string

Name of HTTP header to search. The maximum size is 40 characters. Comparison is case insensitive. Only RFC7240 characters are supported. Wildcards are not supported. You cannot use HTTP header condition to specify the host header, use a host-header condition instead.

Values List<string>

List of header value patterns to match. Maximum size of each pattern is 128 characters. Comparison is case insensitive. Wildcard characters supported: * (matches 0 or more characters) and ? (matches exactly 1 character). If the same header appears multiple times in the request they will be searched in order until a match is found. Only one pattern needs to match for the condition to be satisfied. To require that all of the strings are a match, create one condition block per string.

HttpHeaderName string

Name of HTTP header to search. The maximum size is 40 characters. Comparison is case insensitive. Only RFC7240 characters are supported. Wildcards are not supported. You cannot use HTTP header condition to specify the host header, use a host-header condition instead.

Values []string

List of header value patterns to match. Maximum size of each pattern is 128 characters. Comparison is case insensitive. Wildcard characters supported: * (matches 0 or more characters) and ? (matches exactly 1 character). If the same header appears multiple times in the request they will be searched in order until a match is found. Only one pattern needs to match for the condition to be satisfied. To require that all of the strings are a match, create one condition block per string.

httpHeaderName string

Name of HTTP header to search. The maximum size is 40 characters. Comparison is case insensitive. Only RFC7240 characters are supported. Wildcards are not supported. You cannot use HTTP header condition to specify the host header, use a host-header condition instead.

values string[]

List of header value patterns to match. Maximum size of each pattern is 128 characters. Comparison is case insensitive. Wildcard characters supported: * (matches 0 or more characters) and ? (matches exactly 1 character). If the same header appears multiple times in the request they will be searched in order until a match is found. Only one pattern needs to match for the condition to be satisfied. To require that all of the strings are a match, create one condition block per string.

httpHeaderName str

Name of HTTP header to search. The maximum size is 40 characters. Comparison is case insensitive. Only RFC7240 characters are supported. Wildcards are not supported. You cannot use HTTP header condition to specify the host header, use a host-header condition instead.

values List[str]

List of header value patterns to match. Maximum size of each pattern is 128 characters. Comparison is case insensitive. Wildcard characters supported: * (matches 0 or more characters) and ? (matches exactly 1 character). If the same header appears multiple times in the request they will be searched in order until a match is found. Only one pattern needs to match for the condition to be satisfied. To require that all of the strings are a match, create one condition block per string.

ListenerRuleConditionHttpRequestMethod

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Values List<string>

List of exactly one pattern to match. Required when field is set.

Values []string

List of exactly one pattern to match. Required when field is set.

values string[]

List of exactly one pattern to match. Required when field is set.

values List[str]

List of exactly one pattern to match. Required when field is set.

ListenerRuleConditionPathPattern

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Values List<string>

List of exactly one pattern to match. Required when field is set.

Values []string

List of exactly one pattern to match. Required when field is set.

values string[]

List of exactly one pattern to match. Required when field is set.

values List[str]

List of exactly one pattern to match. Required when field is set.

ListenerRuleConditionQueryString

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Value string

Query string value pattern to match.

Key string

Query string key pattern to match.

Value string

Query string value pattern to match.

Key string

Query string key pattern to match.

value string

Query string value pattern to match.

key string

Query string key pattern to match.

value str

Query string value pattern to match.

key str

Query string key pattern to match.

ListenerRuleConditionSourceIp

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Values List<string>

List of exactly one pattern to match. Required when field is set.

Values []string

List of exactly one pattern to match. Required when field is set.

values string[]

List of exactly one pattern to match. Required when field is set.

values List[str]

List of exactly one pattern to match. Required when field is set.

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.