1. Packages
  2. AWS Classic
  3. API Docs
  4. elb
  5. ListenerPolicy

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.44.0 published on Monday, Jul 8, 2024 by Pulumi

aws.elb.ListenerPolicy

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.44.0 published on Monday, Jul 8, 2024 by Pulumi

    Attaches a load balancer policy to an ELB Listener.

    Example Usage

    Custom Policy

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const wu_tang = new aws.elb.LoadBalancer("wu-tang", {
        name: "wu-tang",
        availabilityZones: ["us-east-1a"],
        listeners: [{
            instancePort: 443,
            instanceProtocol: "http",
            lbPort: 443,
            lbProtocol: "https",
            sslCertificateId: "arn:aws:iam::000000000000:server-certificate/wu-tang.net",
        }],
        tags: {
            Name: "wu-tang",
        },
    });
    const wu_tang_ssl = new aws.elb.LoadBalancerPolicy("wu-tang-ssl", {
        loadBalancerName: wu_tang.name,
        policyName: "wu-tang-ssl",
        policyTypeName: "SSLNegotiationPolicyType",
        policyAttributes: [
            {
                name: "ECDHE-ECDSA-AES128-GCM-SHA256",
                value: "true",
            },
            {
                name: "Protocol-TLSv1.2",
                value: "true",
            },
        ],
    });
    const wu_tang_listener_policies_443 = new aws.elb.ListenerPolicy("wu-tang-listener-policies-443", {
        loadBalancerName: wu_tang.name,
        loadBalancerPort: 443,
        policyNames: [wu_tang_ssl.policyName],
    });
    
    import pulumi
    import pulumi_aws as aws
    
    wu_tang = aws.elb.LoadBalancer("wu-tang",
        name="wu-tang",
        availability_zones=["us-east-1a"],
        listeners=[{
            "instancePort": 443,
            "instanceProtocol": "http",
            "lbPort": 443,
            "lbProtocol": "https",
            "sslCertificateId": "arn:aws:iam::000000000000:server-certificate/wu-tang.net",
        }],
        tags={
            "Name": "wu-tang",
        })
    wu_tang_ssl = aws.elb.LoadBalancerPolicy("wu-tang-ssl",
        load_balancer_name=wu_tang.name,
        policy_name="wu-tang-ssl",
        policy_type_name="SSLNegotiationPolicyType",
        policy_attributes=[
            {
                "name": "ECDHE-ECDSA-AES128-GCM-SHA256",
                "value": "true",
            },
            {
                "name": "Protocol-TLSv1.2",
                "value": "true",
            },
        ])
    wu_tang_listener_policies_443 = aws.elb.ListenerPolicy("wu-tang-listener-policies-443",
        load_balancer_name=wu_tang.name,
        load_balancer_port=443,
        policy_names=[wu_tang_ssl.policy_name])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/elb"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := elb.NewLoadBalancer(ctx, "wu-tang", &elb.LoadBalancerArgs{
    			Name: pulumi.String("wu-tang"),
    			AvailabilityZones: pulumi.StringArray{
    				pulumi.String("us-east-1a"),
    			},
    			Listeners: elb.LoadBalancerListenerArray{
    				&elb.LoadBalancerListenerArgs{
    					InstancePort:     pulumi.Int(443),
    					InstanceProtocol: pulumi.String("http"),
    					LbPort:           pulumi.Int(443),
    					LbProtocol:       pulumi.String("https"),
    					SslCertificateId: pulumi.String("arn:aws:iam::000000000000:server-certificate/wu-tang.net"),
    				},
    			},
    			Tags: pulumi.StringMap{
    				"Name": pulumi.String("wu-tang"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = elb.NewLoadBalancerPolicy(ctx, "wu-tang-ssl", &elb.LoadBalancerPolicyArgs{
    			LoadBalancerName: wu_tang.Name,
    			PolicyName:       pulumi.String("wu-tang-ssl"),
    			PolicyTypeName:   pulumi.String("SSLNegotiationPolicyType"),
    			PolicyAttributes: elb.LoadBalancerPolicyPolicyAttributeArray{
    				&elb.LoadBalancerPolicyPolicyAttributeArgs{
    					Name:  pulumi.String("ECDHE-ECDSA-AES128-GCM-SHA256"),
    					Value: pulumi.String("true"),
    				},
    				&elb.LoadBalancerPolicyPolicyAttributeArgs{
    					Name:  pulumi.String("Protocol-TLSv1.2"),
    					Value: pulumi.String("true"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = elb.NewListenerPolicy(ctx, "wu-tang-listener-policies-443", &elb.ListenerPolicyArgs{
    			LoadBalancerName: wu_tang.Name,
    			LoadBalancerPort: pulumi.Int(443),
    			PolicyNames: pulumi.StringArray{
    				wu_tang_ssl.PolicyName,
    			},
    		})
    		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 wu_tang = new Aws.Elb.LoadBalancer("wu-tang", new()
        {
            Name = "wu-tang",
            AvailabilityZones = new[]
            {
                "us-east-1a",
            },
            Listeners = new[]
            {
                new Aws.Elb.Inputs.LoadBalancerListenerArgs
                {
                    InstancePort = 443,
                    InstanceProtocol = "http",
                    LbPort = 443,
                    LbProtocol = "https",
                    SslCertificateId = "arn:aws:iam::000000000000:server-certificate/wu-tang.net",
                },
            },
            Tags = 
            {
                { "Name", "wu-tang" },
            },
        });
    
        var wu_tang_ssl = new Aws.Elb.LoadBalancerPolicy("wu-tang-ssl", new()
        {
            LoadBalancerName = wu_tang.Name,
            PolicyName = "wu-tang-ssl",
            PolicyTypeName = "SSLNegotiationPolicyType",
            PolicyAttributes = new[]
            {
                new Aws.Elb.Inputs.LoadBalancerPolicyPolicyAttributeArgs
                {
                    Name = "ECDHE-ECDSA-AES128-GCM-SHA256",
                    Value = "true",
                },
                new Aws.Elb.Inputs.LoadBalancerPolicyPolicyAttributeArgs
                {
                    Name = "Protocol-TLSv1.2",
                    Value = "true",
                },
            },
        });
    
        var wu_tang_listener_policies_443 = new Aws.Elb.ListenerPolicy("wu-tang-listener-policies-443", new()
        {
            LoadBalancerName = wu_tang.Name,
            LoadBalancerPort = 443,
            PolicyNames = new[]
            {
                wu_tang_ssl.PolicyName,
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.elb.LoadBalancer;
    import com.pulumi.aws.elb.LoadBalancerArgs;
    import com.pulumi.aws.elb.inputs.LoadBalancerListenerArgs;
    import com.pulumi.aws.elb.LoadBalancerPolicy;
    import com.pulumi.aws.elb.LoadBalancerPolicyArgs;
    import com.pulumi.aws.elb.inputs.LoadBalancerPolicyPolicyAttributeArgs;
    import com.pulumi.aws.elb.ListenerPolicy;
    import com.pulumi.aws.elb.ListenerPolicyArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var wu_tang = new LoadBalancer("wu-tang", LoadBalancerArgs.builder()
                .name("wu-tang")
                .availabilityZones("us-east-1a")
                .listeners(LoadBalancerListenerArgs.builder()
                    .instancePort(443)
                    .instanceProtocol("http")
                    .lbPort(443)
                    .lbProtocol("https")
                    .sslCertificateId("arn:aws:iam::000000000000:server-certificate/wu-tang.net")
                    .build())
                .tags(Map.of("Name", "wu-tang"))
                .build());
    
            var wu_tang_ssl = new LoadBalancerPolicy("wu-tang-ssl", LoadBalancerPolicyArgs.builder()
                .loadBalancerName(wu_tang.name())
                .policyName("wu-tang-ssl")
                .policyTypeName("SSLNegotiationPolicyType")
                .policyAttributes(            
                    LoadBalancerPolicyPolicyAttributeArgs.builder()
                        .name("ECDHE-ECDSA-AES128-GCM-SHA256")
                        .value("true")
                        .build(),
                    LoadBalancerPolicyPolicyAttributeArgs.builder()
                        .name("Protocol-TLSv1.2")
                        .value("true")
                        .build())
                .build());
    
            var wu_tang_listener_policies_443 = new ListenerPolicy("wu-tang-listener-policies-443", ListenerPolicyArgs.builder()
                .loadBalancerName(wu_tang.name())
                .loadBalancerPort(443)
                .policyNames(wu_tang_ssl.policyName())
                .build());
    
        }
    }
    
    resources:
      wu-tang:
        type: aws:elb:LoadBalancer
        properties:
          name: wu-tang
          availabilityZones:
            - us-east-1a
          listeners:
            - instancePort: 443
              instanceProtocol: http
              lbPort: 443
              lbProtocol: https
              sslCertificateId: arn:aws:iam::000000000000:server-certificate/wu-tang.net
          tags:
            Name: wu-tang
      wu-tang-ssl:
        type: aws:elb:LoadBalancerPolicy
        properties:
          loadBalancerName: ${["wu-tang"].name}
          policyName: wu-tang-ssl
          policyTypeName: SSLNegotiationPolicyType
          policyAttributes:
            - name: ECDHE-ECDSA-AES128-GCM-SHA256
              value: 'true'
            - name: Protocol-TLSv1.2
              value: 'true'
      wu-tang-listener-policies-443:
        type: aws:elb:ListenerPolicy
        properties:
          loadBalancerName: ${["wu-tang"].name}
          loadBalancerPort: 443
          policyNames:
            - ${["wu-tang-ssl"].policyName}
    

    This example shows how to customize the TLS settings of an HTTPS listener.

    AWS Predefined Security Policy

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const wu_tang = new aws.elb.LoadBalancer("wu-tang", {
        name: "wu-tang",
        availabilityZones: ["us-east-1a"],
        listeners: [{
            instancePort: 443,
            instanceProtocol: "http",
            lbPort: 443,
            lbProtocol: "https",
            sslCertificateId: "arn:aws:iam::000000000000:server-certificate/wu-tang.net",
        }],
        tags: {
            Name: "wu-tang",
        },
    });
    const wu_tang_ssl_tls_1_1 = new aws.elb.LoadBalancerPolicy("wu-tang-ssl-tls-1-1", {
        loadBalancerName: wu_tang.name,
        policyName: "wu-tang-ssl",
        policyTypeName: "SSLNegotiationPolicyType",
        policyAttributes: [{
            name: "Reference-Security-Policy",
            value: "ELBSecurityPolicy-TLS-1-1-2017-01",
        }],
    });
    const wu_tang_listener_policies_443 = new aws.elb.ListenerPolicy("wu-tang-listener-policies-443", {
        loadBalancerName: wu_tang.name,
        loadBalancerPort: 443,
        policyNames: [wu_tang_ssl_tls_1_1.policyName],
    });
    
    import pulumi
    import pulumi_aws as aws
    
    wu_tang = aws.elb.LoadBalancer("wu-tang",
        name="wu-tang",
        availability_zones=["us-east-1a"],
        listeners=[{
            "instancePort": 443,
            "instanceProtocol": "http",
            "lbPort": 443,
            "lbProtocol": "https",
            "sslCertificateId": "arn:aws:iam::000000000000:server-certificate/wu-tang.net",
        }],
        tags={
            "Name": "wu-tang",
        })
    wu_tang_ssl_tls_1_1 = aws.elb.LoadBalancerPolicy("wu-tang-ssl-tls-1-1",
        load_balancer_name=wu_tang.name,
        policy_name="wu-tang-ssl",
        policy_type_name="SSLNegotiationPolicyType",
        policy_attributes=[{
            "name": "Reference-Security-Policy",
            "value": "ELBSecurityPolicy-TLS-1-1-2017-01",
        }])
    wu_tang_listener_policies_443 = aws.elb.ListenerPolicy("wu-tang-listener-policies-443",
        load_balancer_name=wu_tang.name,
        load_balancer_port=443,
        policy_names=[wu_tang_ssl_tls_1_1.policy_name])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/elb"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := elb.NewLoadBalancer(ctx, "wu-tang", &elb.LoadBalancerArgs{
    			Name: pulumi.String("wu-tang"),
    			AvailabilityZones: pulumi.StringArray{
    				pulumi.String("us-east-1a"),
    			},
    			Listeners: elb.LoadBalancerListenerArray{
    				&elb.LoadBalancerListenerArgs{
    					InstancePort:     pulumi.Int(443),
    					InstanceProtocol: pulumi.String("http"),
    					LbPort:           pulumi.Int(443),
    					LbProtocol:       pulumi.String("https"),
    					SslCertificateId: pulumi.String("arn:aws:iam::000000000000:server-certificate/wu-tang.net"),
    				},
    			},
    			Tags: pulumi.StringMap{
    				"Name": pulumi.String("wu-tang"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = elb.NewLoadBalancerPolicy(ctx, "wu-tang-ssl-tls-1-1", &elb.LoadBalancerPolicyArgs{
    			LoadBalancerName: wu_tang.Name,
    			PolicyName:       pulumi.String("wu-tang-ssl"),
    			PolicyTypeName:   pulumi.String("SSLNegotiationPolicyType"),
    			PolicyAttributes: elb.LoadBalancerPolicyPolicyAttributeArray{
    				&elb.LoadBalancerPolicyPolicyAttributeArgs{
    					Name:  pulumi.String("Reference-Security-Policy"),
    					Value: pulumi.String("ELBSecurityPolicy-TLS-1-1-2017-01"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = elb.NewListenerPolicy(ctx, "wu-tang-listener-policies-443", &elb.ListenerPolicyArgs{
    			LoadBalancerName: wu_tang.Name,
    			LoadBalancerPort: pulumi.Int(443),
    			PolicyNames: pulumi.StringArray{
    				wu_tang_ssl_tls_1_1.PolicyName,
    			},
    		})
    		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 wu_tang = new Aws.Elb.LoadBalancer("wu-tang", new()
        {
            Name = "wu-tang",
            AvailabilityZones = new[]
            {
                "us-east-1a",
            },
            Listeners = new[]
            {
                new Aws.Elb.Inputs.LoadBalancerListenerArgs
                {
                    InstancePort = 443,
                    InstanceProtocol = "http",
                    LbPort = 443,
                    LbProtocol = "https",
                    SslCertificateId = "arn:aws:iam::000000000000:server-certificate/wu-tang.net",
                },
            },
            Tags = 
            {
                { "Name", "wu-tang" },
            },
        });
    
        var wu_tang_ssl_tls_1_1 = new Aws.Elb.LoadBalancerPolicy("wu-tang-ssl-tls-1-1", new()
        {
            LoadBalancerName = wu_tang.Name,
            PolicyName = "wu-tang-ssl",
            PolicyTypeName = "SSLNegotiationPolicyType",
            PolicyAttributes = new[]
            {
                new Aws.Elb.Inputs.LoadBalancerPolicyPolicyAttributeArgs
                {
                    Name = "Reference-Security-Policy",
                    Value = "ELBSecurityPolicy-TLS-1-1-2017-01",
                },
            },
        });
    
        var wu_tang_listener_policies_443 = new Aws.Elb.ListenerPolicy("wu-tang-listener-policies-443", new()
        {
            LoadBalancerName = wu_tang.Name,
            LoadBalancerPort = 443,
            PolicyNames = new[]
            {
                wu_tang_ssl_tls_1_1.PolicyName,
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.elb.LoadBalancer;
    import com.pulumi.aws.elb.LoadBalancerArgs;
    import com.pulumi.aws.elb.inputs.LoadBalancerListenerArgs;
    import com.pulumi.aws.elb.LoadBalancerPolicy;
    import com.pulumi.aws.elb.LoadBalancerPolicyArgs;
    import com.pulumi.aws.elb.inputs.LoadBalancerPolicyPolicyAttributeArgs;
    import com.pulumi.aws.elb.ListenerPolicy;
    import com.pulumi.aws.elb.ListenerPolicyArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var wu_tang = new LoadBalancer("wu-tang", LoadBalancerArgs.builder()
                .name("wu-tang")
                .availabilityZones("us-east-1a")
                .listeners(LoadBalancerListenerArgs.builder()
                    .instancePort(443)
                    .instanceProtocol("http")
                    .lbPort(443)
                    .lbProtocol("https")
                    .sslCertificateId("arn:aws:iam::000000000000:server-certificate/wu-tang.net")
                    .build())
                .tags(Map.of("Name", "wu-tang"))
                .build());
    
            var wu_tang_ssl_tls_1_1 = new LoadBalancerPolicy("wu-tang-ssl-tls-1-1", LoadBalancerPolicyArgs.builder()
                .loadBalancerName(wu_tang.name())
                .policyName("wu-tang-ssl")
                .policyTypeName("SSLNegotiationPolicyType")
                .policyAttributes(LoadBalancerPolicyPolicyAttributeArgs.builder()
                    .name("Reference-Security-Policy")
                    .value("ELBSecurityPolicy-TLS-1-1-2017-01")
                    .build())
                .build());
    
            var wu_tang_listener_policies_443 = new ListenerPolicy("wu-tang-listener-policies-443", ListenerPolicyArgs.builder()
                .loadBalancerName(wu_tang.name())
                .loadBalancerPort(443)
                .policyNames(wu_tang_ssl_tls_1_1.policyName())
                .build());
    
        }
    }
    
    resources:
      wu-tang:
        type: aws:elb:LoadBalancer
        properties:
          name: wu-tang
          availabilityZones:
            - us-east-1a
          listeners:
            - instancePort: 443
              instanceProtocol: http
              lbPort: 443
              lbProtocol: https
              sslCertificateId: arn:aws:iam::000000000000:server-certificate/wu-tang.net
          tags:
            Name: wu-tang
      wu-tang-ssl-tls-1-1:
        type: aws:elb:LoadBalancerPolicy
        properties:
          loadBalancerName: ${["wu-tang"].name}
          policyName: wu-tang-ssl
          policyTypeName: SSLNegotiationPolicyType
          policyAttributes:
            - name: Reference-Security-Policy
              value: ELBSecurityPolicy-TLS-1-1-2017-01
      wu-tang-listener-policies-443:
        type: aws:elb:ListenerPolicy
        properties:
          loadBalancerName: ${["wu-tang"].name}
          loadBalancerPort: 443
          policyNames:
            - ${["wu-tang-ssl-tls-1-1"].policyName}
    

    This example shows how to add a Predefined Security Policy for ELBs

    Create ListenerPolicy Resource

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

    Constructor syntax

    new ListenerPolicy(name: string, args: ListenerPolicyArgs, opts?: CustomResourceOptions);
    @overload
    def ListenerPolicy(resource_name: str,
                       args: ListenerPolicyArgs,
                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def ListenerPolicy(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       load_balancer_name: Optional[str] = None,
                       load_balancer_port: Optional[int] = None,
                       policy_names: Optional[Sequence[str]] = None,
                       triggers: Optional[Mapping[str, str]] = None)
    func NewListenerPolicy(ctx *Context, name string, args ListenerPolicyArgs, opts ...ResourceOption) (*ListenerPolicy, error)
    public ListenerPolicy(string name, ListenerPolicyArgs args, CustomResourceOptions? opts = null)
    public ListenerPolicy(String name, ListenerPolicyArgs args)
    public ListenerPolicy(String name, ListenerPolicyArgs args, CustomResourceOptions options)
    
    type: aws:elb:ListenerPolicy
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args ListenerPolicyArgs
    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 ListenerPolicyArgs
    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 ListenerPolicyArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ListenerPolicyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ListenerPolicyArgs
    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 listenerPolicyResource = new Aws.Elb.ListenerPolicy("listenerPolicyResource", new()
    {
        LoadBalancerName = "string",
        LoadBalancerPort = 0,
        PolicyNames = new[]
        {
            "string",
        },
        Triggers = 
        {
            { "string", "string" },
        },
    });
    
    example, err := elb.NewListenerPolicy(ctx, "listenerPolicyResource", &elb.ListenerPolicyArgs{
    	LoadBalancerName: pulumi.String("string"),
    	LoadBalancerPort: pulumi.Int(0),
    	PolicyNames: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Triggers: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    })
    
    var listenerPolicyResource = new ListenerPolicy("listenerPolicyResource", ListenerPolicyArgs.builder()
        .loadBalancerName("string")
        .loadBalancerPort(0)
        .policyNames("string")
        .triggers(Map.of("string", "string"))
        .build());
    
    listener_policy_resource = aws.elb.ListenerPolicy("listenerPolicyResource",
        load_balancer_name="string",
        load_balancer_port=0,
        policy_names=["string"],
        triggers={
            "string": "string",
        })
    
    const listenerPolicyResource = new aws.elb.ListenerPolicy("listenerPolicyResource", {
        loadBalancerName: "string",
        loadBalancerPort: 0,
        policyNames: ["string"],
        triggers: {
            string: "string",
        },
    });
    
    type: aws:elb:ListenerPolicy
    properties:
        loadBalancerName: string
        loadBalancerPort: 0
        policyNames:
            - string
        triggers:
            string: string
    

    ListenerPolicy Resource Properties

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

    Inputs

    The ListenerPolicy resource accepts the following input properties:

    LoadBalancerName string
    The load balancer to attach the policy to.
    LoadBalancerPort int
    The load balancer listener port to apply the policy to.
    PolicyNames List<string>
    List of Policy Names to apply to the backend server.
    Triggers Dictionary<string, string>
    Map of arbitrary keys and values that, when changed, will trigger an update.
    LoadBalancerName string
    The load balancer to attach the policy to.
    LoadBalancerPort int
    The load balancer listener port to apply the policy to.
    PolicyNames []string
    List of Policy Names to apply to the backend server.
    Triggers map[string]string
    Map of arbitrary keys and values that, when changed, will trigger an update.
    loadBalancerName String
    The load balancer to attach the policy to.
    loadBalancerPort Integer
    The load balancer listener port to apply the policy to.
    policyNames List<String>
    List of Policy Names to apply to the backend server.
    triggers Map<String,String>
    Map of arbitrary keys and values that, when changed, will trigger an update.
    loadBalancerName string
    The load balancer to attach the policy to.
    loadBalancerPort number
    The load balancer listener port to apply the policy to.
    policyNames string[]
    List of Policy Names to apply to the backend server.
    triggers {[key: string]: string}
    Map of arbitrary keys and values that, when changed, will trigger an update.
    load_balancer_name str
    The load balancer to attach the policy to.
    load_balancer_port int
    The load balancer listener port to apply the policy to.
    policy_names Sequence[str]
    List of Policy Names to apply to the backend server.
    triggers Mapping[str, str]
    Map of arbitrary keys and values that, when changed, will trigger an update.
    loadBalancerName String
    The load balancer to attach the policy to.
    loadBalancerPort Number
    The load balancer listener port to apply the policy to.
    policyNames List<String>
    List of Policy Names to apply to the backend server.
    triggers Map<String>
    Map of arbitrary keys and values that, when changed, will trigger an update.

    Outputs

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

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

    Look up Existing ListenerPolicy Resource

    Get an existing ListenerPolicy 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?: ListenerPolicyState, opts?: CustomResourceOptions): ListenerPolicy
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            load_balancer_name: Optional[str] = None,
            load_balancer_port: Optional[int] = None,
            policy_names: Optional[Sequence[str]] = None,
            triggers: Optional[Mapping[str, str]] = None) -> ListenerPolicy
    func GetListenerPolicy(ctx *Context, name string, id IDInput, state *ListenerPolicyState, opts ...ResourceOption) (*ListenerPolicy, error)
    public static ListenerPolicy Get(string name, Input<string> id, ListenerPolicyState? state, CustomResourceOptions? opts = null)
    public static ListenerPolicy get(String name, Output<String> id, ListenerPolicyState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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:
    LoadBalancerName string
    The load balancer to attach the policy to.
    LoadBalancerPort int
    The load balancer listener port to apply the policy to.
    PolicyNames List<string>
    List of Policy Names to apply to the backend server.
    Triggers Dictionary<string, string>
    Map of arbitrary keys and values that, when changed, will trigger an update.
    LoadBalancerName string
    The load balancer to attach the policy to.
    LoadBalancerPort int
    The load balancer listener port to apply the policy to.
    PolicyNames []string
    List of Policy Names to apply to the backend server.
    Triggers map[string]string
    Map of arbitrary keys and values that, when changed, will trigger an update.
    loadBalancerName String
    The load balancer to attach the policy to.
    loadBalancerPort Integer
    The load balancer listener port to apply the policy to.
    policyNames List<String>
    List of Policy Names to apply to the backend server.
    triggers Map<String,String>
    Map of arbitrary keys and values that, when changed, will trigger an update.
    loadBalancerName string
    The load balancer to attach the policy to.
    loadBalancerPort number
    The load balancer listener port to apply the policy to.
    policyNames string[]
    List of Policy Names to apply to the backend server.
    triggers {[key: string]: string}
    Map of arbitrary keys and values that, when changed, will trigger an update.
    load_balancer_name str
    The load balancer to attach the policy to.
    load_balancer_port int
    The load balancer listener port to apply the policy to.
    policy_names Sequence[str]
    List of Policy Names to apply to the backend server.
    triggers Mapping[str, str]
    Map of arbitrary keys and values that, when changed, will trigger an update.
    loadBalancerName String
    The load balancer to attach the policy to.
    loadBalancerPort Number
    The load balancer listener port to apply the policy to.
    policyNames List<String>
    List of Policy Names to apply to the backend server.
    triggers Map<String>
    Map of arbitrary keys and values that, when changed, will trigger an update.

    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

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.44.0 published on Monday, Jul 8, 2024 by Pulumi