1. Packages
  2. Alicloud Provider
  3. API Docs
  4. nlb
  5. Listener
Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi

alicloud.nlb.Listener

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi

    Provides a NLB Listener resource.

    For information about NLB Listener and how to use it, see What is Listener.

    NOTE: Available since v1.191.0.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const config = new pulumi.Config();
    const name = config.get("name") || "tf-example";
    const default = alicloud.resourcemanager.getResourceGroups({});
    const defaultGetZones = alicloud.nlb.getZones({});
    const defaultNetwork = new alicloud.vpc.Network("default", {
        vpcName: name,
        cidrBlock: "10.4.0.0/16",
    });
    const defaultSwitch = new alicloud.vpc.Switch("default", {
        vswitchName: name,
        cidrBlock: "10.4.0.0/24",
        vpcId: defaultNetwork.id,
        zoneId: defaultGetZones.then(defaultGetZones => defaultGetZones.zones?.[0]?.id),
    });
    const default1 = new alicloud.vpc.Switch("default1", {
        vswitchName: name,
        cidrBlock: "10.4.1.0/24",
        vpcId: defaultNetwork.id,
        zoneId: defaultGetZones.then(defaultGetZones => defaultGetZones.zones?.[1]?.id),
    });
    const defaultSecurityGroup = new alicloud.ecs.SecurityGroup("default", {
        name: name,
        vpcId: defaultNetwork.id,
    });
    const defaultLoadBalancer = new alicloud.nlb.LoadBalancer("default", {
        loadBalancerName: name,
        resourceGroupId: _default.then(_default => _default.ids?.[0]),
        loadBalancerType: "Network",
        addressType: "Internet",
        addressIpVersion: "Ipv4",
        vpcId: defaultNetwork.id,
        tags: {
            Created: "TF",
            For: "example",
        },
        zoneMappings: [
            {
                vswitchId: defaultSwitch.id,
                zoneId: defaultGetZones.then(defaultGetZones => defaultGetZones.zones?.[0]?.id),
            },
            {
                vswitchId: default1.id,
                zoneId: defaultGetZones.then(defaultGetZones => defaultGetZones.zones?.[1]?.id),
            },
        ],
    });
    const defaultServerGroup = new alicloud.nlb.ServerGroup("default", {
        resourceGroupId: _default.then(_default => _default.ids?.[0]),
        serverGroupName: name,
        serverGroupType: "Instance",
        vpcId: defaultNetwork.id,
        scheduler: "Wrr",
        protocol: "TCP",
        connectionDrainEnabled: true,
        connectionDrainTimeout: 60,
        addressIpVersion: "Ipv4",
        healthCheck: {
            healthCheckEnabled: true,
            healthCheckType: "TCP",
            healthCheckConnectPort: 0,
            healthyThreshold: 2,
            unhealthyThreshold: 2,
            healthCheckConnectTimeout: 5,
            healthCheckInterval: 10,
            httpCheckMethod: "GET",
            healthCheckHttpCodes: [
                "http_2xx",
                "http_3xx",
                "http_4xx",
            ],
        },
        tags: {
            Created: "TF",
            For: "example",
        },
    });
    const defaultListener = new alicloud.nlb.Listener("default", {
        listenerProtocol: "TCP",
        listenerPort: 80,
        listenerDescription: name,
        loadBalancerId: defaultLoadBalancer.id,
        serverGroupId: defaultServerGroup.id,
        idleTimeout: 900,
        proxyProtocolEnabled: true,
        cps: 10000,
        mss: 0,
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    config = pulumi.Config()
    name = config.get("name")
    if name is None:
        name = "tf-example"
    default = alicloud.resourcemanager.get_resource_groups()
    default_get_zones = alicloud.nlb.get_zones()
    default_network = alicloud.vpc.Network("default",
        vpc_name=name,
        cidr_block="10.4.0.0/16")
    default_switch = alicloud.vpc.Switch("default",
        vswitch_name=name,
        cidr_block="10.4.0.0/24",
        vpc_id=default_network.id,
        zone_id=default_get_zones.zones[0].id)
    default1 = alicloud.vpc.Switch("default1",
        vswitch_name=name,
        cidr_block="10.4.1.0/24",
        vpc_id=default_network.id,
        zone_id=default_get_zones.zones[1].id)
    default_security_group = alicloud.ecs.SecurityGroup("default",
        name=name,
        vpc_id=default_network.id)
    default_load_balancer = alicloud.nlb.LoadBalancer("default",
        load_balancer_name=name,
        resource_group_id=default.ids[0],
        load_balancer_type="Network",
        address_type="Internet",
        address_ip_version="Ipv4",
        vpc_id=default_network.id,
        tags={
            "Created": "TF",
            "For": "example",
        },
        zone_mappings=[
            {
                "vswitch_id": default_switch.id,
                "zone_id": default_get_zones.zones[0].id,
            },
            {
                "vswitch_id": default1.id,
                "zone_id": default_get_zones.zones[1].id,
            },
        ])
    default_server_group = alicloud.nlb.ServerGroup("default",
        resource_group_id=default.ids[0],
        server_group_name=name,
        server_group_type="Instance",
        vpc_id=default_network.id,
        scheduler="Wrr",
        protocol="TCP",
        connection_drain_enabled=True,
        connection_drain_timeout=60,
        address_ip_version="Ipv4",
        health_check={
            "health_check_enabled": True,
            "health_check_type": "TCP",
            "health_check_connect_port": 0,
            "healthy_threshold": 2,
            "unhealthy_threshold": 2,
            "health_check_connect_timeout": 5,
            "health_check_interval": 10,
            "http_check_method": "GET",
            "health_check_http_codes": [
                "http_2xx",
                "http_3xx",
                "http_4xx",
            ],
        },
        tags={
            "Created": "TF",
            "For": "example",
        })
    default_listener = alicloud.nlb.Listener("default",
        listener_protocol="TCP",
        listener_port=80,
        listener_description=name,
        load_balancer_id=default_load_balancer.id,
        server_group_id=default_server_group.id,
        idle_timeout=900,
        proxy_protocol_enabled=True,
        cps=10000,
        mss=0)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ecs"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/nlb"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/resourcemanager"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		name := "tf-example"
    		if param := cfg.Get("name"); param != "" {
    			name = param
    		}
    		_default, err := resourcemanager.GetResourceGroups(ctx, nil, nil)
    		if err != nil {
    			return err
    		}
    		defaultGetZones, err := nlb.GetZones(ctx, nil, nil)
    		if err != nil {
    			return err
    		}
    		defaultNetwork, err := vpc.NewNetwork(ctx, "default", &vpc.NetworkArgs{
    			VpcName:   pulumi.String(name),
    			CidrBlock: pulumi.String("10.4.0.0/16"),
    		})
    		if err != nil {
    			return err
    		}
    		defaultSwitch, err := vpc.NewSwitch(ctx, "default", &vpc.SwitchArgs{
    			VswitchName: pulumi.String(name),
    			CidrBlock:   pulumi.String("10.4.0.0/24"),
    			VpcId:       defaultNetwork.ID(),
    			ZoneId:      pulumi.String(defaultGetZones.Zones[0].Id),
    		})
    		if err != nil {
    			return err
    		}
    		default1, err := vpc.NewSwitch(ctx, "default1", &vpc.SwitchArgs{
    			VswitchName: pulumi.String(name),
    			CidrBlock:   pulumi.String("10.4.1.0/24"),
    			VpcId:       defaultNetwork.ID(),
    			ZoneId:      pulumi.String(defaultGetZones.Zones[1].Id),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = ecs.NewSecurityGroup(ctx, "default", &ecs.SecurityGroupArgs{
    			Name:  pulumi.String(name),
    			VpcId: defaultNetwork.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		defaultLoadBalancer, err := nlb.NewLoadBalancer(ctx, "default", &nlb.LoadBalancerArgs{
    			LoadBalancerName: pulumi.String(name),
    			ResourceGroupId:  pulumi.String(_default.Ids[0]),
    			LoadBalancerType: pulumi.String("Network"),
    			AddressType:      pulumi.String("Internet"),
    			AddressIpVersion: pulumi.String("Ipv4"),
    			VpcId:            defaultNetwork.ID(),
    			Tags: pulumi.StringMap{
    				"Created": pulumi.String("TF"),
    				"For":     pulumi.String("example"),
    			},
    			ZoneMappings: nlb.LoadBalancerZoneMappingArray{
    				&nlb.LoadBalancerZoneMappingArgs{
    					VswitchId: defaultSwitch.ID(),
    					ZoneId:    pulumi.String(defaultGetZones.Zones[0].Id),
    				},
    				&nlb.LoadBalancerZoneMappingArgs{
    					VswitchId: default1.ID(),
    					ZoneId:    pulumi.String(defaultGetZones.Zones[1].Id),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		defaultServerGroup, err := nlb.NewServerGroup(ctx, "default", &nlb.ServerGroupArgs{
    			ResourceGroupId:        pulumi.String(_default.Ids[0]),
    			ServerGroupName:        pulumi.String(name),
    			ServerGroupType:        pulumi.String("Instance"),
    			VpcId:                  defaultNetwork.ID(),
    			Scheduler:              pulumi.String("Wrr"),
    			Protocol:               pulumi.String("TCP"),
    			ConnectionDrainEnabled: pulumi.Bool(true),
    			ConnectionDrainTimeout: pulumi.Int(60),
    			AddressIpVersion:       pulumi.String("Ipv4"),
    			HealthCheck: &nlb.ServerGroupHealthCheckArgs{
    				HealthCheckEnabled:        pulumi.Bool(true),
    				HealthCheckType:           pulumi.String("TCP"),
    				HealthCheckConnectPort:    pulumi.Int(0),
    				HealthyThreshold:          pulumi.Int(2),
    				UnhealthyThreshold:        pulumi.Int(2),
    				HealthCheckConnectTimeout: pulumi.Int(5),
    				HealthCheckInterval:       pulumi.Int(10),
    				HttpCheckMethod:           pulumi.String("GET"),
    				HealthCheckHttpCodes: pulumi.StringArray{
    					pulumi.String("http_2xx"),
    					pulumi.String("http_3xx"),
    					pulumi.String("http_4xx"),
    				},
    			},
    			Tags: pulumi.StringMap{
    				"Created": pulumi.String("TF"),
    				"For":     pulumi.String("example"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = nlb.NewListener(ctx, "default", &nlb.ListenerArgs{
    			ListenerProtocol:     pulumi.String("TCP"),
    			ListenerPort:         pulumi.Int(80),
    			ListenerDescription:  pulumi.String(name),
    			LoadBalancerId:       defaultLoadBalancer.ID(),
    			ServerGroupId:        defaultServerGroup.ID(),
    			IdleTimeout:          pulumi.Int(900),
    			ProxyProtocolEnabled: pulumi.Bool(true),
    			Cps:                  pulumi.Int(10000),
    			Mss:                  pulumi.Int(0),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var name = config.Get("name") ?? "tf-example";
        var @default = AliCloud.ResourceManager.GetResourceGroups.Invoke();
    
        var defaultGetZones = AliCloud.Nlb.GetZones.Invoke();
    
        var defaultNetwork = new AliCloud.Vpc.Network("default", new()
        {
            VpcName = name,
            CidrBlock = "10.4.0.0/16",
        });
    
        var defaultSwitch = new AliCloud.Vpc.Switch("default", new()
        {
            VswitchName = name,
            CidrBlock = "10.4.0.0/24",
            VpcId = defaultNetwork.Id,
            ZoneId = defaultGetZones.Apply(getZonesResult => getZonesResult.Zones[0]?.Id),
        });
    
        var default1 = new AliCloud.Vpc.Switch("default1", new()
        {
            VswitchName = name,
            CidrBlock = "10.4.1.0/24",
            VpcId = defaultNetwork.Id,
            ZoneId = defaultGetZones.Apply(getZonesResult => getZonesResult.Zones[1]?.Id),
        });
    
        var defaultSecurityGroup = new AliCloud.Ecs.SecurityGroup("default", new()
        {
            Name = name,
            VpcId = defaultNetwork.Id,
        });
    
        var defaultLoadBalancer = new AliCloud.Nlb.LoadBalancer("default", new()
        {
            LoadBalancerName = name,
            ResourceGroupId = @default.Apply(@default => @default.Apply(getResourceGroupsResult => getResourceGroupsResult.Ids[0])),
            LoadBalancerType = "Network",
            AddressType = "Internet",
            AddressIpVersion = "Ipv4",
            VpcId = defaultNetwork.Id,
            Tags = 
            {
                { "Created", "TF" },
                { "For", "example" },
            },
            ZoneMappings = new[]
            {
                new AliCloud.Nlb.Inputs.LoadBalancerZoneMappingArgs
                {
                    VswitchId = defaultSwitch.Id,
                    ZoneId = defaultGetZones.Apply(getZonesResult => getZonesResult.Zones[0]?.Id),
                },
                new AliCloud.Nlb.Inputs.LoadBalancerZoneMappingArgs
                {
                    VswitchId = default1.Id,
                    ZoneId = defaultGetZones.Apply(getZonesResult => getZonesResult.Zones[1]?.Id),
                },
            },
        });
    
        var defaultServerGroup = new AliCloud.Nlb.ServerGroup("default", new()
        {
            ResourceGroupId = @default.Apply(@default => @default.Apply(getResourceGroupsResult => getResourceGroupsResult.Ids[0])),
            ServerGroupName = name,
            ServerGroupType = "Instance",
            VpcId = defaultNetwork.Id,
            Scheduler = "Wrr",
            Protocol = "TCP",
            ConnectionDrainEnabled = true,
            ConnectionDrainTimeout = 60,
            AddressIpVersion = "Ipv4",
            HealthCheck = new AliCloud.Nlb.Inputs.ServerGroupHealthCheckArgs
            {
                HealthCheckEnabled = true,
                HealthCheckType = "TCP",
                HealthCheckConnectPort = 0,
                HealthyThreshold = 2,
                UnhealthyThreshold = 2,
                HealthCheckConnectTimeout = 5,
                HealthCheckInterval = 10,
                HttpCheckMethod = "GET",
                HealthCheckHttpCodes = new[]
                {
                    "http_2xx",
                    "http_3xx",
                    "http_4xx",
                },
            },
            Tags = 
            {
                { "Created", "TF" },
                { "For", "example" },
            },
        });
    
        var defaultListener = new AliCloud.Nlb.Listener("default", new()
        {
            ListenerProtocol = "TCP",
            ListenerPort = 80,
            ListenerDescription = name,
            LoadBalancerId = defaultLoadBalancer.Id,
            ServerGroupId = defaultServerGroup.Id,
            IdleTimeout = 900,
            ProxyProtocolEnabled = true,
            Cps = 10000,
            Mss = 0,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.resourcemanager.ResourcemanagerFunctions;
    import com.pulumi.alicloud.resourcemanager.inputs.GetResourceGroupsArgs;
    import com.pulumi.alicloud.nlb.NlbFunctions;
    import com.pulumi.alicloud.nlb.inputs.GetZonesArgs;
    import com.pulumi.alicloud.vpc.Network;
    import com.pulumi.alicloud.vpc.NetworkArgs;
    import com.pulumi.alicloud.vpc.Switch;
    import com.pulumi.alicloud.vpc.SwitchArgs;
    import com.pulumi.alicloud.ecs.SecurityGroup;
    import com.pulumi.alicloud.ecs.SecurityGroupArgs;
    import com.pulumi.alicloud.nlb.LoadBalancer;
    import com.pulumi.alicloud.nlb.LoadBalancerArgs;
    import com.pulumi.alicloud.nlb.inputs.LoadBalancerZoneMappingArgs;
    import com.pulumi.alicloud.nlb.ServerGroup;
    import com.pulumi.alicloud.nlb.ServerGroupArgs;
    import com.pulumi.alicloud.nlb.inputs.ServerGroupHealthCheckArgs;
    import com.pulumi.alicloud.nlb.Listener;
    import com.pulumi.alicloud.nlb.ListenerArgs;
    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) {
            final var config = ctx.config();
            final var name = config.get("name").orElse("tf-example");
            final var default = ResourcemanagerFunctions.getResourceGroups();
    
            final var defaultGetZones = NlbFunctions.getZones();
    
            var defaultNetwork = new Network("defaultNetwork", NetworkArgs.builder()
                .vpcName(name)
                .cidrBlock("10.4.0.0/16")
                .build());
    
            var defaultSwitch = new Switch("defaultSwitch", SwitchArgs.builder()
                .vswitchName(name)
                .cidrBlock("10.4.0.0/24")
                .vpcId(defaultNetwork.id())
                .zoneId(defaultGetZones.applyValue(getZonesResult -> getZonesResult.zones()[0].id()))
                .build());
    
            var default1 = new Switch("default1", SwitchArgs.builder()
                .vswitchName(name)
                .cidrBlock("10.4.1.0/24")
                .vpcId(defaultNetwork.id())
                .zoneId(defaultGetZones.applyValue(getZonesResult -> getZonesResult.zones()[1].id()))
                .build());
    
            var defaultSecurityGroup = new SecurityGroup("defaultSecurityGroup", SecurityGroupArgs.builder()
                .name(name)
                .vpcId(defaultNetwork.id())
                .build());
    
            var defaultLoadBalancer = new LoadBalancer("defaultLoadBalancer", LoadBalancerArgs.builder()
                .loadBalancerName(name)
                .resourceGroupId(default_.ids()[0])
                .loadBalancerType("Network")
                .addressType("Internet")
                .addressIpVersion("Ipv4")
                .vpcId(defaultNetwork.id())
                .tags(Map.ofEntries(
                    Map.entry("Created", "TF"),
                    Map.entry("For", "example")
                ))
                .zoneMappings(            
                    LoadBalancerZoneMappingArgs.builder()
                        .vswitchId(defaultSwitch.id())
                        .zoneId(defaultGetZones.applyValue(getZonesResult -> getZonesResult.zones()[0].id()))
                        .build(),
                    LoadBalancerZoneMappingArgs.builder()
                        .vswitchId(default1.id())
                        .zoneId(defaultGetZones.applyValue(getZonesResult -> getZonesResult.zones()[1].id()))
                        .build())
                .build());
    
            var defaultServerGroup = new ServerGroup("defaultServerGroup", ServerGroupArgs.builder()
                .resourceGroupId(default_.ids()[0])
                .serverGroupName(name)
                .serverGroupType("Instance")
                .vpcId(defaultNetwork.id())
                .scheduler("Wrr")
                .protocol("TCP")
                .connectionDrainEnabled(true)
                .connectionDrainTimeout(60)
                .addressIpVersion("Ipv4")
                .healthCheck(ServerGroupHealthCheckArgs.builder()
                    .healthCheckEnabled(true)
                    .healthCheckType("TCP")
                    .healthCheckConnectPort(0)
                    .healthyThreshold(2)
                    .unhealthyThreshold(2)
                    .healthCheckConnectTimeout(5)
                    .healthCheckInterval(10)
                    .httpCheckMethod("GET")
                    .healthCheckHttpCodes(                
                        "http_2xx",
                        "http_3xx",
                        "http_4xx")
                    .build())
                .tags(Map.ofEntries(
                    Map.entry("Created", "TF"),
                    Map.entry("For", "example")
                ))
                .build());
    
            var defaultListener = new Listener("defaultListener", ListenerArgs.builder()
                .listenerProtocol("TCP")
                .listenerPort("80")
                .listenerDescription(name)
                .loadBalancerId(defaultLoadBalancer.id())
                .serverGroupId(defaultServerGroup.id())
                .idleTimeout("900")
                .proxyProtocolEnabled("true")
                .cps("10000")
                .mss("0")
                .build());
    
        }
    }
    
    configuration:
      name:
        type: string
        default: tf-example
    resources:
      defaultNetwork:
        type: alicloud:vpc:Network
        name: default
        properties:
          vpcName: ${name}
          cidrBlock: 10.4.0.0/16
      defaultSwitch:
        type: alicloud:vpc:Switch
        name: default
        properties:
          vswitchName: ${name}
          cidrBlock: 10.4.0.0/24
          vpcId: ${defaultNetwork.id}
          zoneId: ${defaultGetZones.zones[0].id}
      default1:
        type: alicloud:vpc:Switch
        properties:
          vswitchName: ${name}
          cidrBlock: 10.4.1.0/24
          vpcId: ${defaultNetwork.id}
          zoneId: ${defaultGetZones.zones[1].id}
      defaultSecurityGroup:
        type: alicloud:ecs:SecurityGroup
        name: default
        properties:
          name: ${name}
          vpcId: ${defaultNetwork.id}
      defaultLoadBalancer:
        type: alicloud:nlb:LoadBalancer
        name: default
        properties:
          loadBalancerName: ${name}
          resourceGroupId: ${default.ids[0]}
          loadBalancerType: Network
          addressType: Internet
          addressIpVersion: Ipv4
          vpcId: ${defaultNetwork.id}
          tags:
            Created: TF
            For: example
          zoneMappings:
            - vswitchId: ${defaultSwitch.id}
              zoneId: ${defaultGetZones.zones[0].id}
            - vswitchId: ${default1.id}
              zoneId: ${defaultGetZones.zones[1].id}
      defaultServerGroup:
        type: alicloud:nlb:ServerGroup
        name: default
        properties:
          resourceGroupId: ${default.ids[0]}
          serverGroupName: ${name}
          serverGroupType: Instance
          vpcId: ${defaultNetwork.id}
          scheduler: Wrr
          protocol: TCP
          connectionDrainEnabled: true
          connectionDrainTimeout: 60
          addressIpVersion: Ipv4
          healthCheck:
            healthCheckEnabled: true
            healthCheckType: TCP
            healthCheckConnectPort: 0
            healthyThreshold: 2
            unhealthyThreshold: 2
            healthCheckConnectTimeout: 5
            healthCheckInterval: 10
            httpCheckMethod: GET
            healthCheckHttpCodes:
              - http_2xx
              - http_3xx
              - http_4xx
          tags:
            Created: TF
            For: example
      defaultListener:
        type: alicloud:nlb:Listener
        name: default
        properties:
          listenerProtocol: TCP
          listenerPort: '80'
          listenerDescription: ${name}
          loadBalancerId: ${defaultLoadBalancer.id}
          serverGroupId: ${defaultServerGroup.id}
          idleTimeout: '900'
          proxyProtocolEnabled: 'true'
          cps: '10000'
          mss: '0'
    variables:
      default:
        fn::invoke:
          Function: alicloud:resourcemanager:getResourceGroups
          Arguments: {}
      defaultGetZones:
        fn::invoke:
          Function: alicloud:nlb:getZones
          Arguments: {}
    

    Create Listener Resource

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

    Constructor syntax

    new Listener(name: string, args: ListenerArgs, opts?: CustomResourceOptions);
    @overload
    def Listener(resource_name: str,
                 args: ListenerArgs,
                 opts: Optional[ResourceOptions] = None)
    
    @overload
    def Listener(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 listener_port: Optional[int] = None,
                 server_group_id: Optional[str] = None,
                 load_balancer_id: Optional[str] = None,
                 listener_protocol: Optional[str] = None,
                 cps: Optional[int] = None,
                 ca_certificate_ids: Optional[Sequence[str]] = None,
                 end_port: Optional[int] = None,
                 idle_timeout: Optional[int] = None,
                 listener_description: Optional[str] = None,
                 certificate_ids: Optional[Sequence[str]] = None,
                 ca_enabled: Optional[bool] = None,
                 alpn_enabled: Optional[bool] = None,
                 mss: Optional[int] = None,
                 proxy_protocol_enabled: Optional[bool] = None,
                 sec_sensor_enabled: Optional[bool] = None,
                 security_policy_id: Optional[str] = None,
                 alpn_policy: Optional[str] = None,
                 start_port: Optional[int] = None,
                 status: Optional[str] = None,
                 tags: Optional[Mapping[str, str]] = None)
    func NewListener(ctx *Context, name string, args ListenerArgs, opts ...ResourceOption) (*Listener, error)
    public Listener(string name, ListenerArgs args, CustomResourceOptions? opts = null)
    public Listener(String name, ListenerArgs args)
    public Listener(String name, ListenerArgs args, CustomResourceOptions options)
    
    type: alicloud:nlb:Listener
    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 ListenerArgs
    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 ListenerArgs
    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 ListenerArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ListenerArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ListenerArgs
    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 examplelistenerResourceResourceFromNlblistener = new AliCloud.Nlb.Listener("examplelistenerResourceResourceFromNlblistener", new()
    {
        ListenerPort = 0,
        ServerGroupId = "string",
        LoadBalancerId = "string",
        ListenerProtocol = "string",
        Cps = 0,
        CaCertificateIds = new[]
        {
            "string",
        },
        EndPort = 0,
        IdleTimeout = 0,
        ListenerDescription = "string",
        CertificateIds = new[]
        {
            "string",
        },
        CaEnabled = false,
        AlpnEnabled = false,
        Mss = 0,
        ProxyProtocolEnabled = false,
        SecSensorEnabled = false,
        SecurityPolicyId = "string",
        AlpnPolicy = "string",
        StartPort = 0,
        Status = "string",
        Tags = 
        {
            { "string", "string" },
        },
    });
    
    example, err := nlb.NewListener(ctx, "examplelistenerResourceResourceFromNlblistener", &nlb.ListenerArgs{
    	ListenerPort:     pulumi.Int(0),
    	ServerGroupId:    pulumi.String("string"),
    	LoadBalancerId:   pulumi.String("string"),
    	ListenerProtocol: pulumi.String("string"),
    	Cps:              pulumi.Int(0),
    	CaCertificateIds: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	EndPort:             pulumi.Int(0),
    	IdleTimeout:         pulumi.Int(0),
    	ListenerDescription: pulumi.String("string"),
    	CertificateIds: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	CaEnabled:            pulumi.Bool(false),
    	AlpnEnabled:          pulumi.Bool(false),
    	Mss:                  pulumi.Int(0),
    	ProxyProtocolEnabled: pulumi.Bool(false),
    	SecSensorEnabled:     pulumi.Bool(false),
    	SecurityPolicyId:     pulumi.String("string"),
    	AlpnPolicy:           pulumi.String("string"),
    	StartPort:            pulumi.Int(0),
    	Status:               pulumi.String("string"),
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    })
    
    var examplelistenerResourceResourceFromNlblistener = new Listener("examplelistenerResourceResourceFromNlblistener", ListenerArgs.builder()
        .listenerPort(0)
        .serverGroupId("string")
        .loadBalancerId("string")
        .listenerProtocol("string")
        .cps(0)
        .caCertificateIds("string")
        .endPort(0)
        .idleTimeout(0)
        .listenerDescription("string")
        .certificateIds("string")
        .caEnabled(false)
        .alpnEnabled(false)
        .mss(0)
        .proxyProtocolEnabled(false)
        .secSensorEnabled(false)
        .securityPolicyId("string")
        .alpnPolicy("string")
        .startPort(0)
        .status("string")
        .tags(Map.of("string", "string"))
        .build());
    
    examplelistener_resource_resource_from_nlblistener = alicloud.nlb.Listener("examplelistenerResourceResourceFromNlblistener",
        listener_port=0,
        server_group_id="string",
        load_balancer_id="string",
        listener_protocol="string",
        cps=0,
        ca_certificate_ids=["string"],
        end_port=0,
        idle_timeout=0,
        listener_description="string",
        certificate_ids=["string"],
        ca_enabled=False,
        alpn_enabled=False,
        mss=0,
        proxy_protocol_enabled=False,
        sec_sensor_enabled=False,
        security_policy_id="string",
        alpn_policy="string",
        start_port=0,
        status="string",
        tags={
            "string": "string",
        })
    
    const examplelistenerResourceResourceFromNlblistener = new alicloud.nlb.Listener("examplelistenerResourceResourceFromNlblistener", {
        listenerPort: 0,
        serverGroupId: "string",
        loadBalancerId: "string",
        listenerProtocol: "string",
        cps: 0,
        caCertificateIds: ["string"],
        endPort: 0,
        idleTimeout: 0,
        listenerDescription: "string",
        certificateIds: ["string"],
        caEnabled: false,
        alpnEnabled: false,
        mss: 0,
        proxyProtocolEnabled: false,
        secSensorEnabled: false,
        securityPolicyId: "string",
        alpnPolicy: "string",
        startPort: 0,
        status: "string",
        tags: {
            string: "string",
        },
    });
    
    type: alicloud:nlb:Listener
    properties:
        alpnEnabled: false
        alpnPolicy: string
        caCertificateIds:
            - string
        caEnabled: false
        certificateIds:
            - string
        cps: 0
        endPort: 0
        idleTimeout: 0
        listenerDescription: string
        listenerPort: 0
        listenerProtocol: string
        loadBalancerId: string
        mss: 0
        proxyProtocolEnabled: false
        secSensorEnabled: false
        securityPolicyId: string
        serverGroupId: string
        startPort: 0
        status: string
        tags:
            string: string
    

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

    ListenerPort int

    The listener port. Valid values: 0 to 65535.

    If you set the value to 0, the listener listens by port range. If you set the value to 0, you must specify StartPort and EndPort.

    ListenerProtocol string
    The listening protocol. Valid values: TCP, UDP, and TCPSSL.
    LoadBalancerId string
    The ID of the Network Load Balancer (NLB) instance.
    ServerGroupId string
    The ID of the server group.
    AlpnEnabled bool
    Specifies whether to enable Application-Layer Protocol Negotiation (ALPN). Valid values:
    AlpnPolicy string

    The ALPN policy. Valid values:

    • HTTP1Only: uses only HTTP 1.x. The priority of HTTP 1.1 is higher than the priority of HTTP 1.0.
    • HTTP2Only: uses only HTTP 2.0.
    • HTTP2Optional: preferentially uses HTTP 1.x over HTTP 2.0. The priority of HTTP 1.1 is higher than the priority of HTTP 1.0, and the priority of HTTP 1.0 is higher than the priority of HTTP 2.0.
    • HTTP2Preferred: preferentially uses HTTP 2.0 over HTTP 1.x. The priority of HTTP 2.0 is higher than the priority of HTTP 1.1, and the priority of HTTP 1.1 is higher than the priority of HTTP 1.0.

    NOTE: This parameter is required if AlpnEnabled is set to true.

    NOTE: Effective only for TCPSSL listener.

    CaCertificateIds List<string>

    The list of certificate authority (CA) certificates. This parameter takes effect only for listeners that use SSL over TCP.

    NOTE: Only one CA certificate is supported.

    CaEnabled bool
    Specifies whether to enable mutual authentication. Valid values:
    CertificateIds List<string>

    The list of server certificates. This parameter takes effect only for listeners that use SSL over TCP.

    NOTE: This parameter takes effect only for TCPSSL listeners.

    Cps int
    The maximum number of connections that can be created per second on the NLB instance. Valid values: 0 to 1000000. 0 specifies that the number of connections is unlimited.
    EndPort int

    The last port in the listener port range. Valid values: 0 to 65535. The number of the last port must be greater than the number of the first port.

    NOTE: This parameter is required when ListenerPort is set to 0.

    IdleTimeout int
    The timeout period of idle connections. Unit: seconds. Valid values: 1 to 900. Default value: 900.
    ListenerDescription string

    Enter a name for the listener.

    The description must be 2 to 256 characters in length, and can contain letters, digits, commas (,), periods (.), semicolons (;), forward slashes (/), at signs (@), underscores (_), and hyphens (-).

    Mss int

    The maximum size of a TCP segment. Unit: bytes. Valid values: 0 to 1500. 0 specifies that the maximum segment size remains unchanged.

    NOTE: This parameter is supported only by TCP listeners and listeners that use SSL over TCP.

    ProxyProtocolEnabled bool
    Specifies whether to use the Proxy protocol to pass client IP addresses to backend servers. Valid values:
    SecSensorEnabled bool
    Specifies whether to enable fine-grained monitoring. Valid values:
    SecurityPolicyId string

    The security policy ID. System security policies and custom security policies are supported.

    Valid values: tls_cipher_policy\_1\_0 (default), tls_cipher_policy\_1\_1, tls_cipher_policy\_1\_2, tls_cipher_policy\_1\_2\_strict, and tls_cipher_policy\_1\_2\_strict_with\_1\_3.

    NOTE: This parameter takes effect only for listeners that use SSL over TCP.

    StartPort int

    The first port in the listener port range. Valid values: 0 to 65535.

    NOTE: This parameter is required when ListenerPort is set to 0.

    Status string
    The status of the resource. Valid values: Running, Stopped. When you want to enable this instance, you can set the property value to Running;
    Tags Dictionary<string, string>
    The tag of the resource
    ListenerPort int

    The listener port. Valid values: 0 to 65535.

    If you set the value to 0, the listener listens by port range. If you set the value to 0, you must specify StartPort and EndPort.

    ListenerProtocol string
    The listening protocol. Valid values: TCP, UDP, and TCPSSL.
    LoadBalancerId string
    The ID of the Network Load Balancer (NLB) instance.
    ServerGroupId string
    The ID of the server group.
    AlpnEnabled bool
    Specifies whether to enable Application-Layer Protocol Negotiation (ALPN). Valid values:
    AlpnPolicy string

    The ALPN policy. Valid values:

    • HTTP1Only: uses only HTTP 1.x. The priority of HTTP 1.1 is higher than the priority of HTTP 1.0.
    • HTTP2Only: uses only HTTP 2.0.
    • HTTP2Optional: preferentially uses HTTP 1.x over HTTP 2.0. The priority of HTTP 1.1 is higher than the priority of HTTP 1.0, and the priority of HTTP 1.0 is higher than the priority of HTTP 2.0.
    • HTTP2Preferred: preferentially uses HTTP 2.0 over HTTP 1.x. The priority of HTTP 2.0 is higher than the priority of HTTP 1.1, and the priority of HTTP 1.1 is higher than the priority of HTTP 1.0.

    NOTE: This parameter is required if AlpnEnabled is set to true.

    NOTE: Effective only for TCPSSL listener.

    CaCertificateIds []string

    The list of certificate authority (CA) certificates. This parameter takes effect only for listeners that use SSL over TCP.

    NOTE: Only one CA certificate is supported.

    CaEnabled bool
    Specifies whether to enable mutual authentication. Valid values:
    CertificateIds []string

    The list of server certificates. This parameter takes effect only for listeners that use SSL over TCP.

    NOTE: This parameter takes effect only for TCPSSL listeners.

    Cps int
    The maximum number of connections that can be created per second on the NLB instance. Valid values: 0 to 1000000. 0 specifies that the number of connections is unlimited.
    EndPort int

    The last port in the listener port range. Valid values: 0 to 65535. The number of the last port must be greater than the number of the first port.

    NOTE: This parameter is required when ListenerPort is set to 0.

    IdleTimeout int
    The timeout period of idle connections. Unit: seconds. Valid values: 1 to 900. Default value: 900.
    ListenerDescription string

    Enter a name for the listener.

    The description must be 2 to 256 characters in length, and can contain letters, digits, commas (,), periods (.), semicolons (;), forward slashes (/), at signs (@), underscores (_), and hyphens (-).

    Mss int

    The maximum size of a TCP segment. Unit: bytes. Valid values: 0 to 1500. 0 specifies that the maximum segment size remains unchanged.

    NOTE: This parameter is supported only by TCP listeners and listeners that use SSL over TCP.

    ProxyProtocolEnabled bool
    Specifies whether to use the Proxy protocol to pass client IP addresses to backend servers. Valid values:
    SecSensorEnabled bool
    Specifies whether to enable fine-grained monitoring. Valid values:
    SecurityPolicyId string

    The security policy ID. System security policies and custom security policies are supported.

    Valid values: tls_cipher_policy\_1\_0 (default), tls_cipher_policy\_1\_1, tls_cipher_policy\_1\_2, tls_cipher_policy\_1\_2\_strict, and tls_cipher_policy\_1\_2\_strict_with\_1\_3.

    NOTE: This parameter takes effect only for listeners that use SSL over TCP.

    StartPort int

    The first port in the listener port range. Valid values: 0 to 65535.

    NOTE: This parameter is required when ListenerPort is set to 0.

    Status string
    The status of the resource. Valid values: Running, Stopped. When you want to enable this instance, you can set the property value to Running;
    Tags map[string]string
    The tag of the resource
    listenerPort Integer

    The listener port. Valid values: 0 to 65535.

    If you set the value to 0, the listener listens by port range. If you set the value to 0, you must specify StartPort and EndPort.

    listenerProtocol String
    The listening protocol. Valid values: TCP, UDP, and TCPSSL.
    loadBalancerId String
    The ID of the Network Load Balancer (NLB) instance.
    serverGroupId String
    The ID of the server group.
    alpnEnabled Boolean
    Specifies whether to enable Application-Layer Protocol Negotiation (ALPN). Valid values:
    alpnPolicy String

    The ALPN policy. Valid values:

    • HTTP1Only: uses only HTTP 1.x. The priority of HTTP 1.1 is higher than the priority of HTTP 1.0.
    • HTTP2Only: uses only HTTP 2.0.
    • HTTP2Optional: preferentially uses HTTP 1.x over HTTP 2.0. The priority of HTTP 1.1 is higher than the priority of HTTP 1.0, and the priority of HTTP 1.0 is higher than the priority of HTTP 2.0.
    • HTTP2Preferred: preferentially uses HTTP 2.0 over HTTP 1.x. The priority of HTTP 2.0 is higher than the priority of HTTP 1.1, and the priority of HTTP 1.1 is higher than the priority of HTTP 1.0.

    NOTE: This parameter is required if AlpnEnabled is set to true.

    NOTE: Effective only for TCPSSL listener.

    caCertificateIds List<String>

    The list of certificate authority (CA) certificates. This parameter takes effect only for listeners that use SSL over TCP.

    NOTE: Only one CA certificate is supported.

    caEnabled Boolean
    Specifies whether to enable mutual authentication. Valid values:
    certificateIds List<String>

    The list of server certificates. This parameter takes effect only for listeners that use SSL over TCP.

    NOTE: This parameter takes effect only for TCPSSL listeners.

    cps Integer
    The maximum number of connections that can be created per second on the NLB instance. Valid values: 0 to 1000000. 0 specifies that the number of connections is unlimited.
    endPort Integer

    The last port in the listener port range. Valid values: 0 to 65535. The number of the last port must be greater than the number of the first port.

    NOTE: This parameter is required when ListenerPort is set to 0.

    idleTimeout Integer
    The timeout period of idle connections. Unit: seconds. Valid values: 1 to 900. Default value: 900.
    listenerDescription String

    Enter a name for the listener.

    The description must be 2 to 256 characters in length, and can contain letters, digits, commas (,), periods (.), semicolons (;), forward slashes (/), at signs (@), underscores (_), and hyphens (-).

    mss Integer

    The maximum size of a TCP segment. Unit: bytes. Valid values: 0 to 1500. 0 specifies that the maximum segment size remains unchanged.

    NOTE: This parameter is supported only by TCP listeners and listeners that use SSL over TCP.

    proxyProtocolEnabled Boolean
    Specifies whether to use the Proxy protocol to pass client IP addresses to backend servers. Valid values:
    secSensorEnabled Boolean
    Specifies whether to enable fine-grained monitoring. Valid values:
    securityPolicyId String

    The security policy ID. System security policies and custom security policies are supported.

    Valid values: tls_cipher_policy\_1\_0 (default), tls_cipher_policy\_1\_1, tls_cipher_policy\_1\_2, tls_cipher_policy\_1\_2\_strict, and tls_cipher_policy\_1\_2\_strict_with\_1\_3.

    NOTE: This parameter takes effect only for listeners that use SSL over TCP.

    startPort Integer

    The first port in the listener port range. Valid values: 0 to 65535.

    NOTE: This parameter is required when ListenerPort is set to 0.

    status String
    The status of the resource. Valid values: Running, Stopped. When you want to enable this instance, you can set the property value to Running;
    tags Map<String,String>
    The tag of the resource
    listenerPort number

    The listener port. Valid values: 0 to 65535.

    If you set the value to 0, the listener listens by port range. If you set the value to 0, you must specify StartPort and EndPort.

    listenerProtocol string
    The listening protocol. Valid values: TCP, UDP, and TCPSSL.
    loadBalancerId string
    The ID of the Network Load Balancer (NLB) instance.
    serverGroupId string
    The ID of the server group.
    alpnEnabled boolean
    Specifies whether to enable Application-Layer Protocol Negotiation (ALPN). Valid values:
    alpnPolicy string

    The ALPN policy. Valid values:

    • HTTP1Only: uses only HTTP 1.x. The priority of HTTP 1.1 is higher than the priority of HTTP 1.0.
    • HTTP2Only: uses only HTTP 2.0.
    • HTTP2Optional: preferentially uses HTTP 1.x over HTTP 2.0. The priority of HTTP 1.1 is higher than the priority of HTTP 1.0, and the priority of HTTP 1.0 is higher than the priority of HTTP 2.0.
    • HTTP2Preferred: preferentially uses HTTP 2.0 over HTTP 1.x. The priority of HTTP 2.0 is higher than the priority of HTTP 1.1, and the priority of HTTP 1.1 is higher than the priority of HTTP 1.0.

    NOTE: This parameter is required if AlpnEnabled is set to true.

    NOTE: Effective only for TCPSSL listener.

    caCertificateIds string[]

    The list of certificate authority (CA) certificates. This parameter takes effect only for listeners that use SSL over TCP.

    NOTE: Only one CA certificate is supported.

    caEnabled boolean
    Specifies whether to enable mutual authentication. Valid values:
    certificateIds string[]

    The list of server certificates. This parameter takes effect only for listeners that use SSL over TCP.

    NOTE: This parameter takes effect only for TCPSSL listeners.

    cps number
    The maximum number of connections that can be created per second on the NLB instance. Valid values: 0 to 1000000. 0 specifies that the number of connections is unlimited.
    endPort number

    The last port in the listener port range. Valid values: 0 to 65535. The number of the last port must be greater than the number of the first port.

    NOTE: This parameter is required when ListenerPort is set to 0.

    idleTimeout number
    The timeout period of idle connections. Unit: seconds. Valid values: 1 to 900. Default value: 900.
    listenerDescription string

    Enter a name for the listener.

    The description must be 2 to 256 characters in length, and can contain letters, digits, commas (,), periods (.), semicolons (;), forward slashes (/), at signs (@), underscores (_), and hyphens (-).

    mss number

    The maximum size of a TCP segment. Unit: bytes. Valid values: 0 to 1500. 0 specifies that the maximum segment size remains unchanged.

    NOTE: This parameter is supported only by TCP listeners and listeners that use SSL over TCP.

    proxyProtocolEnabled boolean
    Specifies whether to use the Proxy protocol to pass client IP addresses to backend servers. Valid values:
    secSensorEnabled boolean
    Specifies whether to enable fine-grained monitoring. Valid values:
    securityPolicyId string

    The security policy ID. System security policies and custom security policies are supported.

    Valid values: tls_cipher_policy\_1\_0 (default), tls_cipher_policy\_1\_1, tls_cipher_policy\_1\_2, tls_cipher_policy\_1\_2\_strict, and tls_cipher_policy\_1\_2\_strict_with\_1\_3.

    NOTE: This parameter takes effect only for listeners that use SSL over TCP.

    startPort number

    The first port in the listener port range. Valid values: 0 to 65535.

    NOTE: This parameter is required when ListenerPort is set to 0.

    status string
    The status of the resource. Valid values: Running, Stopped. When you want to enable this instance, you can set the property value to Running;
    tags {[key: string]: string}
    The tag of the resource
    listener_port int

    The listener port. Valid values: 0 to 65535.

    If you set the value to 0, the listener listens by port range. If you set the value to 0, you must specify StartPort and EndPort.

    listener_protocol str
    The listening protocol. Valid values: TCP, UDP, and TCPSSL.
    load_balancer_id str
    The ID of the Network Load Balancer (NLB) instance.
    server_group_id str
    The ID of the server group.
    alpn_enabled bool
    Specifies whether to enable Application-Layer Protocol Negotiation (ALPN). Valid values:
    alpn_policy str

    The ALPN policy. Valid values:

    • HTTP1Only: uses only HTTP 1.x. The priority of HTTP 1.1 is higher than the priority of HTTP 1.0.
    • HTTP2Only: uses only HTTP 2.0.
    • HTTP2Optional: preferentially uses HTTP 1.x over HTTP 2.0. The priority of HTTP 1.1 is higher than the priority of HTTP 1.0, and the priority of HTTP 1.0 is higher than the priority of HTTP 2.0.
    • HTTP2Preferred: preferentially uses HTTP 2.0 over HTTP 1.x. The priority of HTTP 2.0 is higher than the priority of HTTP 1.1, and the priority of HTTP 1.1 is higher than the priority of HTTP 1.0.

    NOTE: This parameter is required if AlpnEnabled is set to true.

    NOTE: Effective only for TCPSSL listener.

    ca_certificate_ids Sequence[str]

    The list of certificate authority (CA) certificates. This parameter takes effect only for listeners that use SSL over TCP.

    NOTE: Only one CA certificate is supported.

    ca_enabled bool
    Specifies whether to enable mutual authentication. Valid values:
    certificate_ids Sequence[str]

    The list of server certificates. This parameter takes effect only for listeners that use SSL over TCP.

    NOTE: This parameter takes effect only for TCPSSL listeners.

    cps int
    The maximum number of connections that can be created per second on the NLB instance. Valid values: 0 to 1000000. 0 specifies that the number of connections is unlimited.
    end_port int

    The last port in the listener port range. Valid values: 0 to 65535. The number of the last port must be greater than the number of the first port.

    NOTE: This parameter is required when ListenerPort is set to 0.

    idle_timeout int
    The timeout period of idle connections. Unit: seconds. Valid values: 1 to 900. Default value: 900.
    listener_description str

    Enter a name for the listener.

    The description must be 2 to 256 characters in length, and can contain letters, digits, commas (,), periods (.), semicolons (;), forward slashes (/), at signs (@), underscores (_), and hyphens (-).

    mss int

    The maximum size of a TCP segment. Unit: bytes. Valid values: 0 to 1500. 0 specifies that the maximum segment size remains unchanged.

    NOTE: This parameter is supported only by TCP listeners and listeners that use SSL over TCP.

    proxy_protocol_enabled bool
    Specifies whether to use the Proxy protocol to pass client IP addresses to backend servers. Valid values:
    sec_sensor_enabled bool
    Specifies whether to enable fine-grained monitoring. Valid values:
    security_policy_id str

    The security policy ID. System security policies and custom security policies are supported.

    Valid values: tls_cipher_policy\_1\_0 (default), tls_cipher_policy\_1\_1, tls_cipher_policy\_1\_2, tls_cipher_policy\_1\_2\_strict, and tls_cipher_policy\_1\_2\_strict_with\_1\_3.

    NOTE: This parameter takes effect only for listeners that use SSL over TCP.

    start_port int

    The first port in the listener port range. Valid values: 0 to 65535.

    NOTE: This parameter is required when ListenerPort is set to 0.

    status str
    The status of the resource. Valid values: Running, Stopped. When you want to enable this instance, you can set the property value to Running;
    tags Mapping[str, str]
    The tag of the resource
    listenerPort Number

    The listener port. Valid values: 0 to 65535.

    If you set the value to 0, the listener listens by port range. If you set the value to 0, you must specify StartPort and EndPort.

    listenerProtocol String
    The listening protocol. Valid values: TCP, UDP, and TCPSSL.
    loadBalancerId String
    The ID of the Network Load Balancer (NLB) instance.
    serverGroupId String
    The ID of the server group.
    alpnEnabled Boolean
    Specifies whether to enable Application-Layer Protocol Negotiation (ALPN). Valid values:
    alpnPolicy String

    The ALPN policy. Valid values:

    • HTTP1Only: uses only HTTP 1.x. The priority of HTTP 1.1 is higher than the priority of HTTP 1.0.
    • HTTP2Only: uses only HTTP 2.0.
    • HTTP2Optional: preferentially uses HTTP 1.x over HTTP 2.0. The priority of HTTP 1.1 is higher than the priority of HTTP 1.0, and the priority of HTTP 1.0 is higher than the priority of HTTP 2.0.
    • HTTP2Preferred: preferentially uses HTTP 2.0 over HTTP 1.x. The priority of HTTP 2.0 is higher than the priority of HTTP 1.1, and the priority of HTTP 1.1 is higher than the priority of HTTP 1.0.

    NOTE: This parameter is required if AlpnEnabled is set to true.

    NOTE: Effective only for TCPSSL listener.

    caCertificateIds List<String>

    The list of certificate authority (CA) certificates. This parameter takes effect only for listeners that use SSL over TCP.

    NOTE: Only one CA certificate is supported.

    caEnabled Boolean
    Specifies whether to enable mutual authentication. Valid values:
    certificateIds List<String>

    The list of server certificates. This parameter takes effect only for listeners that use SSL over TCP.

    NOTE: This parameter takes effect only for TCPSSL listeners.

    cps Number
    The maximum number of connections that can be created per second on the NLB instance. Valid values: 0 to 1000000. 0 specifies that the number of connections is unlimited.
    endPort Number

    The last port in the listener port range. Valid values: 0 to 65535. The number of the last port must be greater than the number of the first port.

    NOTE: This parameter is required when ListenerPort is set to 0.

    idleTimeout Number
    The timeout period of idle connections. Unit: seconds. Valid values: 1 to 900. Default value: 900.
    listenerDescription String

    Enter a name for the listener.

    The description must be 2 to 256 characters in length, and can contain letters, digits, commas (,), periods (.), semicolons (;), forward slashes (/), at signs (@), underscores (_), and hyphens (-).

    mss Number

    The maximum size of a TCP segment. Unit: bytes. Valid values: 0 to 1500. 0 specifies that the maximum segment size remains unchanged.

    NOTE: This parameter is supported only by TCP listeners and listeners that use SSL over TCP.

    proxyProtocolEnabled Boolean
    Specifies whether to use the Proxy protocol to pass client IP addresses to backend servers. Valid values:
    secSensorEnabled Boolean
    Specifies whether to enable fine-grained monitoring. Valid values:
    securityPolicyId String

    The security policy ID. System security policies and custom security policies are supported.

    Valid values: tls_cipher_policy\_1\_0 (default), tls_cipher_policy\_1\_1, tls_cipher_policy\_1\_2, tls_cipher_policy\_1\_2\_strict, and tls_cipher_policy\_1\_2\_strict_with\_1\_3.

    NOTE: This parameter takes effect only for listeners that use SSL over TCP.

    startPort Number

    The first port in the listener port range. Valid values: 0 to 65535.

    NOTE: This parameter is required when ListenerPort is set to 0.

    status String
    The status of the resource. Valid values: Running, Stopped. When you want to enable this instance, you can set the property value to Running;
    tags Map<String>
    The tag of the resource

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Listener 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 Listener Resource

    Get an existing Listener 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?: ListenerState, opts?: CustomResourceOptions): Listener
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            alpn_enabled: Optional[bool] = None,
            alpn_policy: Optional[str] = None,
            ca_certificate_ids: Optional[Sequence[str]] = None,
            ca_enabled: Optional[bool] = None,
            certificate_ids: Optional[Sequence[str]] = None,
            cps: Optional[int] = None,
            end_port: Optional[int] = None,
            idle_timeout: Optional[int] = None,
            listener_description: Optional[str] = None,
            listener_port: Optional[int] = None,
            listener_protocol: Optional[str] = None,
            load_balancer_id: Optional[str] = None,
            mss: Optional[int] = None,
            proxy_protocol_enabled: Optional[bool] = None,
            sec_sensor_enabled: Optional[bool] = None,
            security_policy_id: Optional[str] = None,
            server_group_id: Optional[str] = None,
            start_port: Optional[int] = None,
            status: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None) -> Listener
    func GetListener(ctx *Context, name string, id IDInput, state *ListenerState, opts ...ResourceOption) (*Listener, error)
    public static Listener Get(string name, Input<string> id, ListenerState? state, CustomResourceOptions? opts = null)
    public static Listener get(String name, Output<String> id, ListenerState 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:
    AlpnEnabled bool
    Specifies whether to enable Application-Layer Protocol Negotiation (ALPN). Valid values:
    AlpnPolicy string

    The ALPN policy. Valid values:

    • HTTP1Only: uses only HTTP 1.x. The priority of HTTP 1.1 is higher than the priority of HTTP 1.0.
    • HTTP2Only: uses only HTTP 2.0.
    • HTTP2Optional: preferentially uses HTTP 1.x over HTTP 2.0. The priority of HTTP 1.1 is higher than the priority of HTTP 1.0, and the priority of HTTP 1.0 is higher than the priority of HTTP 2.0.
    • HTTP2Preferred: preferentially uses HTTP 2.0 over HTTP 1.x. The priority of HTTP 2.0 is higher than the priority of HTTP 1.1, and the priority of HTTP 1.1 is higher than the priority of HTTP 1.0.

    NOTE: This parameter is required if AlpnEnabled is set to true.

    NOTE: Effective only for TCPSSL listener.

    CaCertificateIds List<string>

    The list of certificate authority (CA) certificates. This parameter takes effect only for listeners that use SSL over TCP.

    NOTE: Only one CA certificate is supported.

    CaEnabled bool
    Specifies whether to enable mutual authentication. Valid values:
    CertificateIds List<string>

    The list of server certificates. This parameter takes effect only for listeners that use SSL over TCP.

    NOTE: This parameter takes effect only for TCPSSL listeners.

    Cps int
    The maximum number of connections that can be created per second on the NLB instance. Valid values: 0 to 1000000. 0 specifies that the number of connections is unlimited.
    EndPort int

    The last port in the listener port range. Valid values: 0 to 65535. The number of the last port must be greater than the number of the first port.

    NOTE: This parameter is required when ListenerPort is set to 0.

    IdleTimeout int
    The timeout period of idle connections. Unit: seconds. Valid values: 1 to 900. Default value: 900.
    ListenerDescription string

    Enter a name for the listener.

    The description must be 2 to 256 characters in length, and can contain letters, digits, commas (,), periods (.), semicolons (;), forward slashes (/), at signs (@), underscores (_), and hyphens (-).

    ListenerPort int

    The listener port. Valid values: 0 to 65535.

    If you set the value to 0, the listener listens by port range. If you set the value to 0, you must specify StartPort and EndPort.

    ListenerProtocol string
    The listening protocol. Valid values: TCP, UDP, and TCPSSL.
    LoadBalancerId string
    The ID of the Network Load Balancer (NLB) instance.
    Mss int

    The maximum size of a TCP segment. Unit: bytes. Valid values: 0 to 1500. 0 specifies that the maximum segment size remains unchanged.

    NOTE: This parameter is supported only by TCP listeners and listeners that use SSL over TCP.

    ProxyProtocolEnabled bool
    Specifies whether to use the Proxy protocol to pass client IP addresses to backend servers. Valid values:
    SecSensorEnabled bool
    Specifies whether to enable fine-grained monitoring. Valid values:
    SecurityPolicyId string

    The security policy ID. System security policies and custom security policies are supported.

    Valid values: tls_cipher_policy\_1\_0 (default), tls_cipher_policy\_1\_1, tls_cipher_policy\_1\_2, tls_cipher_policy\_1\_2\_strict, and tls_cipher_policy\_1\_2\_strict_with\_1\_3.

    NOTE: This parameter takes effect only for listeners that use SSL over TCP.

    ServerGroupId string
    The ID of the server group.
    StartPort int

    The first port in the listener port range. Valid values: 0 to 65535.

    NOTE: This parameter is required when ListenerPort is set to 0.

    Status string
    The status of the resource. Valid values: Running, Stopped. When you want to enable this instance, you can set the property value to Running;
    Tags Dictionary<string, string>
    The tag of the resource
    AlpnEnabled bool
    Specifies whether to enable Application-Layer Protocol Negotiation (ALPN). Valid values:
    AlpnPolicy string

    The ALPN policy. Valid values:

    • HTTP1Only: uses only HTTP 1.x. The priority of HTTP 1.1 is higher than the priority of HTTP 1.0.
    • HTTP2Only: uses only HTTP 2.0.
    • HTTP2Optional: preferentially uses HTTP 1.x over HTTP 2.0. The priority of HTTP 1.1 is higher than the priority of HTTP 1.0, and the priority of HTTP 1.0 is higher than the priority of HTTP 2.0.
    • HTTP2Preferred: preferentially uses HTTP 2.0 over HTTP 1.x. The priority of HTTP 2.0 is higher than the priority of HTTP 1.1, and the priority of HTTP 1.1 is higher than the priority of HTTP 1.0.

    NOTE: This parameter is required if AlpnEnabled is set to true.

    NOTE: Effective only for TCPSSL listener.

    CaCertificateIds []string

    The list of certificate authority (CA) certificates. This parameter takes effect only for listeners that use SSL over TCP.

    NOTE: Only one CA certificate is supported.

    CaEnabled bool
    Specifies whether to enable mutual authentication. Valid values:
    CertificateIds []string

    The list of server certificates. This parameter takes effect only for listeners that use SSL over TCP.

    NOTE: This parameter takes effect only for TCPSSL listeners.

    Cps int
    The maximum number of connections that can be created per second on the NLB instance. Valid values: 0 to 1000000. 0 specifies that the number of connections is unlimited.
    EndPort int

    The last port in the listener port range. Valid values: 0 to 65535. The number of the last port must be greater than the number of the first port.

    NOTE: This parameter is required when ListenerPort is set to 0.

    IdleTimeout int
    The timeout period of idle connections. Unit: seconds. Valid values: 1 to 900. Default value: 900.
    ListenerDescription string

    Enter a name for the listener.

    The description must be 2 to 256 characters in length, and can contain letters, digits, commas (,), periods (.), semicolons (;), forward slashes (/), at signs (@), underscores (_), and hyphens (-).

    ListenerPort int

    The listener port. Valid values: 0 to 65535.

    If you set the value to 0, the listener listens by port range. If you set the value to 0, you must specify StartPort and EndPort.

    ListenerProtocol string
    The listening protocol. Valid values: TCP, UDP, and TCPSSL.
    LoadBalancerId string
    The ID of the Network Load Balancer (NLB) instance.
    Mss int

    The maximum size of a TCP segment. Unit: bytes. Valid values: 0 to 1500. 0 specifies that the maximum segment size remains unchanged.

    NOTE: This parameter is supported only by TCP listeners and listeners that use SSL over TCP.

    ProxyProtocolEnabled bool
    Specifies whether to use the Proxy protocol to pass client IP addresses to backend servers. Valid values:
    SecSensorEnabled bool
    Specifies whether to enable fine-grained monitoring. Valid values:
    SecurityPolicyId string

    The security policy ID. System security policies and custom security policies are supported.

    Valid values: tls_cipher_policy\_1\_0 (default), tls_cipher_policy\_1\_1, tls_cipher_policy\_1\_2, tls_cipher_policy\_1\_2\_strict, and tls_cipher_policy\_1\_2\_strict_with\_1\_3.

    NOTE: This parameter takes effect only for listeners that use SSL over TCP.

    ServerGroupId string
    The ID of the server group.
    StartPort int

    The first port in the listener port range. Valid values: 0 to 65535.

    NOTE: This parameter is required when ListenerPort is set to 0.

    Status string
    The status of the resource. Valid values: Running, Stopped. When you want to enable this instance, you can set the property value to Running;
    Tags map[string]string
    The tag of the resource
    alpnEnabled Boolean
    Specifies whether to enable Application-Layer Protocol Negotiation (ALPN). Valid values:
    alpnPolicy String

    The ALPN policy. Valid values:

    • HTTP1Only: uses only HTTP 1.x. The priority of HTTP 1.1 is higher than the priority of HTTP 1.0.
    • HTTP2Only: uses only HTTP 2.0.
    • HTTP2Optional: preferentially uses HTTP 1.x over HTTP 2.0. The priority of HTTP 1.1 is higher than the priority of HTTP 1.0, and the priority of HTTP 1.0 is higher than the priority of HTTP 2.0.
    • HTTP2Preferred: preferentially uses HTTP 2.0 over HTTP 1.x. The priority of HTTP 2.0 is higher than the priority of HTTP 1.1, and the priority of HTTP 1.1 is higher than the priority of HTTP 1.0.

    NOTE: This parameter is required if AlpnEnabled is set to true.

    NOTE: Effective only for TCPSSL listener.

    caCertificateIds List<String>

    The list of certificate authority (CA) certificates. This parameter takes effect only for listeners that use SSL over TCP.

    NOTE: Only one CA certificate is supported.

    caEnabled Boolean
    Specifies whether to enable mutual authentication. Valid values:
    certificateIds List<String>

    The list of server certificates. This parameter takes effect only for listeners that use SSL over TCP.

    NOTE: This parameter takes effect only for TCPSSL listeners.

    cps Integer
    The maximum number of connections that can be created per second on the NLB instance. Valid values: 0 to 1000000. 0 specifies that the number of connections is unlimited.
    endPort Integer

    The last port in the listener port range. Valid values: 0 to 65535. The number of the last port must be greater than the number of the first port.

    NOTE: This parameter is required when ListenerPort is set to 0.

    idleTimeout Integer
    The timeout period of idle connections. Unit: seconds. Valid values: 1 to 900. Default value: 900.
    listenerDescription String

    Enter a name for the listener.

    The description must be 2 to 256 characters in length, and can contain letters, digits, commas (,), periods (.), semicolons (;), forward slashes (/), at signs (@), underscores (_), and hyphens (-).

    listenerPort Integer

    The listener port. Valid values: 0 to 65535.

    If you set the value to 0, the listener listens by port range. If you set the value to 0, you must specify StartPort and EndPort.

    listenerProtocol String
    The listening protocol. Valid values: TCP, UDP, and TCPSSL.
    loadBalancerId String
    The ID of the Network Load Balancer (NLB) instance.
    mss Integer

    The maximum size of a TCP segment. Unit: bytes. Valid values: 0 to 1500. 0 specifies that the maximum segment size remains unchanged.

    NOTE: This parameter is supported only by TCP listeners and listeners that use SSL over TCP.

    proxyProtocolEnabled Boolean
    Specifies whether to use the Proxy protocol to pass client IP addresses to backend servers. Valid values:
    secSensorEnabled Boolean
    Specifies whether to enable fine-grained monitoring. Valid values:
    securityPolicyId String

    The security policy ID. System security policies and custom security policies are supported.

    Valid values: tls_cipher_policy\_1\_0 (default), tls_cipher_policy\_1\_1, tls_cipher_policy\_1\_2, tls_cipher_policy\_1\_2\_strict, and tls_cipher_policy\_1\_2\_strict_with\_1\_3.

    NOTE: This parameter takes effect only for listeners that use SSL over TCP.

    serverGroupId String
    The ID of the server group.
    startPort Integer

    The first port in the listener port range. Valid values: 0 to 65535.

    NOTE: This parameter is required when ListenerPort is set to 0.

    status String
    The status of the resource. Valid values: Running, Stopped. When you want to enable this instance, you can set the property value to Running;
    tags Map<String,String>
    The tag of the resource
    alpnEnabled boolean
    Specifies whether to enable Application-Layer Protocol Negotiation (ALPN). Valid values:
    alpnPolicy string

    The ALPN policy. Valid values:

    • HTTP1Only: uses only HTTP 1.x. The priority of HTTP 1.1 is higher than the priority of HTTP 1.0.
    • HTTP2Only: uses only HTTP 2.0.
    • HTTP2Optional: preferentially uses HTTP 1.x over HTTP 2.0. The priority of HTTP 1.1 is higher than the priority of HTTP 1.0, and the priority of HTTP 1.0 is higher than the priority of HTTP 2.0.
    • HTTP2Preferred: preferentially uses HTTP 2.0 over HTTP 1.x. The priority of HTTP 2.0 is higher than the priority of HTTP 1.1, and the priority of HTTP 1.1 is higher than the priority of HTTP 1.0.

    NOTE: This parameter is required if AlpnEnabled is set to true.

    NOTE: Effective only for TCPSSL listener.

    caCertificateIds string[]

    The list of certificate authority (CA) certificates. This parameter takes effect only for listeners that use SSL over TCP.

    NOTE: Only one CA certificate is supported.

    caEnabled boolean
    Specifies whether to enable mutual authentication. Valid values:
    certificateIds string[]

    The list of server certificates. This parameter takes effect only for listeners that use SSL over TCP.

    NOTE: This parameter takes effect only for TCPSSL listeners.

    cps number
    The maximum number of connections that can be created per second on the NLB instance. Valid values: 0 to 1000000. 0 specifies that the number of connections is unlimited.
    endPort number

    The last port in the listener port range. Valid values: 0 to 65535. The number of the last port must be greater than the number of the first port.

    NOTE: This parameter is required when ListenerPort is set to 0.

    idleTimeout number
    The timeout period of idle connections. Unit: seconds. Valid values: 1 to 900. Default value: 900.
    listenerDescription string

    Enter a name for the listener.

    The description must be 2 to 256 characters in length, and can contain letters, digits, commas (,), periods (.), semicolons (;), forward slashes (/), at signs (@), underscores (_), and hyphens (-).

    listenerPort number

    The listener port. Valid values: 0 to 65535.

    If you set the value to 0, the listener listens by port range. If you set the value to 0, you must specify StartPort and EndPort.

    listenerProtocol string
    The listening protocol. Valid values: TCP, UDP, and TCPSSL.
    loadBalancerId string
    The ID of the Network Load Balancer (NLB) instance.
    mss number

    The maximum size of a TCP segment. Unit: bytes. Valid values: 0 to 1500. 0 specifies that the maximum segment size remains unchanged.

    NOTE: This parameter is supported only by TCP listeners and listeners that use SSL over TCP.

    proxyProtocolEnabled boolean
    Specifies whether to use the Proxy protocol to pass client IP addresses to backend servers. Valid values:
    secSensorEnabled boolean
    Specifies whether to enable fine-grained monitoring. Valid values:
    securityPolicyId string

    The security policy ID. System security policies and custom security policies are supported.

    Valid values: tls_cipher_policy\_1\_0 (default), tls_cipher_policy\_1\_1, tls_cipher_policy\_1\_2, tls_cipher_policy\_1\_2\_strict, and tls_cipher_policy\_1\_2\_strict_with\_1\_3.

    NOTE: This parameter takes effect only for listeners that use SSL over TCP.

    serverGroupId string
    The ID of the server group.
    startPort number

    The first port in the listener port range. Valid values: 0 to 65535.

    NOTE: This parameter is required when ListenerPort is set to 0.

    status string
    The status of the resource. Valid values: Running, Stopped. When you want to enable this instance, you can set the property value to Running;
    tags {[key: string]: string}
    The tag of the resource
    alpn_enabled bool
    Specifies whether to enable Application-Layer Protocol Negotiation (ALPN). Valid values:
    alpn_policy str

    The ALPN policy. Valid values:

    • HTTP1Only: uses only HTTP 1.x. The priority of HTTP 1.1 is higher than the priority of HTTP 1.0.
    • HTTP2Only: uses only HTTP 2.0.
    • HTTP2Optional: preferentially uses HTTP 1.x over HTTP 2.0. The priority of HTTP 1.1 is higher than the priority of HTTP 1.0, and the priority of HTTP 1.0 is higher than the priority of HTTP 2.0.
    • HTTP2Preferred: preferentially uses HTTP 2.0 over HTTP 1.x. The priority of HTTP 2.0 is higher than the priority of HTTP 1.1, and the priority of HTTP 1.1 is higher than the priority of HTTP 1.0.

    NOTE: This parameter is required if AlpnEnabled is set to true.

    NOTE: Effective only for TCPSSL listener.

    ca_certificate_ids Sequence[str]

    The list of certificate authority (CA) certificates. This parameter takes effect only for listeners that use SSL over TCP.

    NOTE: Only one CA certificate is supported.

    ca_enabled bool
    Specifies whether to enable mutual authentication. Valid values:
    certificate_ids Sequence[str]

    The list of server certificates. This parameter takes effect only for listeners that use SSL over TCP.

    NOTE: This parameter takes effect only for TCPSSL listeners.

    cps int
    The maximum number of connections that can be created per second on the NLB instance. Valid values: 0 to 1000000. 0 specifies that the number of connections is unlimited.
    end_port int

    The last port in the listener port range. Valid values: 0 to 65535. The number of the last port must be greater than the number of the first port.

    NOTE: This parameter is required when ListenerPort is set to 0.

    idle_timeout int
    The timeout period of idle connections. Unit: seconds. Valid values: 1 to 900. Default value: 900.
    listener_description str

    Enter a name for the listener.

    The description must be 2 to 256 characters in length, and can contain letters, digits, commas (,), periods (.), semicolons (;), forward slashes (/), at signs (@), underscores (_), and hyphens (-).

    listener_port int

    The listener port. Valid values: 0 to 65535.

    If you set the value to 0, the listener listens by port range. If you set the value to 0, you must specify StartPort and EndPort.

    listener_protocol str
    The listening protocol. Valid values: TCP, UDP, and TCPSSL.
    load_balancer_id str
    The ID of the Network Load Balancer (NLB) instance.
    mss int

    The maximum size of a TCP segment. Unit: bytes. Valid values: 0 to 1500. 0 specifies that the maximum segment size remains unchanged.

    NOTE: This parameter is supported only by TCP listeners and listeners that use SSL over TCP.

    proxy_protocol_enabled bool
    Specifies whether to use the Proxy protocol to pass client IP addresses to backend servers. Valid values:
    sec_sensor_enabled bool
    Specifies whether to enable fine-grained monitoring. Valid values:
    security_policy_id str

    The security policy ID. System security policies and custom security policies are supported.

    Valid values: tls_cipher_policy\_1\_0 (default), tls_cipher_policy\_1\_1, tls_cipher_policy\_1\_2, tls_cipher_policy\_1\_2\_strict, and tls_cipher_policy\_1\_2\_strict_with\_1\_3.

    NOTE: This parameter takes effect only for listeners that use SSL over TCP.

    server_group_id str
    The ID of the server group.
    start_port int

    The first port in the listener port range. Valid values: 0 to 65535.

    NOTE: This parameter is required when ListenerPort is set to 0.

    status str
    The status of the resource. Valid values: Running, Stopped. When you want to enable this instance, you can set the property value to Running;
    tags Mapping[str, str]
    The tag of the resource
    alpnEnabled Boolean
    Specifies whether to enable Application-Layer Protocol Negotiation (ALPN). Valid values:
    alpnPolicy String

    The ALPN policy. Valid values:

    • HTTP1Only: uses only HTTP 1.x. The priority of HTTP 1.1 is higher than the priority of HTTP 1.0.
    • HTTP2Only: uses only HTTP 2.0.
    • HTTP2Optional: preferentially uses HTTP 1.x over HTTP 2.0. The priority of HTTP 1.1 is higher than the priority of HTTP 1.0, and the priority of HTTP 1.0 is higher than the priority of HTTP 2.0.
    • HTTP2Preferred: preferentially uses HTTP 2.0 over HTTP 1.x. The priority of HTTP 2.0 is higher than the priority of HTTP 1.1, and the priority of HTTP 1.1 is higher than the priority of HTTP 1.0.

    NOTE: This parameter is required if AlpnEnabled is set to true.

    NOTE: Effective only for TCPSSL listener.

    caCertificateIds List<String>

    The list of certificate authority (CA) certificates. This parameter takes effect only for listeners that use SSL over TCP.

    NOTE: Only one CA certificate is supported.

    caEnabled Boolean
    Specifies whether to enable mutual authentication. Valid values:
    certificateIds List<String>

    The list of server certificates. This parameter takes effect only for listeners that use SSL over TCP.

    NOTE: This parameter takes effect only for TCPSSL listeners.

    cps Number
    The maximum number of connections that can be created per second on the NLB instance. Valid values: 0 to 1000000. 0 specifies that the number of connections is unlimited.
    endPort Number

    The last port in the listener port range. Valid values: 0 to 65535. The number of the last port must be greater than the number of the first port.

    NOTE: This parameter is required when ListenerPort is set to 0.

    idleTimeout Number
    The timeout period of idle connections. Unit: seconds. Valid values: 1 to 900. Default value: 900.
    listenerDescription String

    Enter a name for the listener.

    The description must be 2 to 256 characters in length, and can contain letters, digits, commas (,), periods (.), semicolons (;), forward slashes (/), at signs (@), underscores (_), and hyphens (-).

    listenerPort Number

    The listener port. Valid values: 0 to 65535.

    If you set the value to 0, the listener listens by port range. If you set the value to 0, you must specify StartPort and EndPort.

    listenerProtocol String
    The listening protocol. Valid values: TCP, UDP, and TCPSSL.
    loadBalancerId String
    The ID of the Network Load Balancer (NLB) instance.
    mss Number

    The maximum size of a TCP segment. Unit: bytes. Valid values: 0 to 1500. 0 specifies that the maximum segment size remains unchanged.

    NOTE: This parameter is supported only by TCP listeners and listeners that use SSL over TCP.

    proxyProtocolEnabled Boolean
    Specifies whether to use the Proxy protocol to pass client IP addresses to backend servers. Valid values:
    secSensorEnabled Boolean
    Specifies whether to enable fine-grained monitoring. Valid values:
    securityPolicyId String

    The security policy ID. System security policies and custom security policies are supported.

    Valid values: tls_cipher_policy\_1\_0 (default), tls_cipher_policy\_1\_1, tls_cipher_policy\_1\_2, tls_cipher_policy\_1\_2\_strict, and tls_cipher_policy\_1\_2\_strict_with\_1\_3.

    NOTE: This parameter takes effect only for listeners that use SSL over TCP.

    serverGroupId String
    The ID of the server group.
    startPort Number

    The first port in the listener port range. Valid values: 0 to 65535.

    NOTE: This parameter is required when ListenerPort is set to 0.

    status String
    The status of the resource. Valid values: Running, Stopped. When you want to enable this instance, you can set the property value to Running;
    tags Map<String>
    The tag of the resource

    Import

    NLB Listener can be imported using the id, e.g.

    $ pulumi import alicloud:nlb/listener:Listener example <id>
    

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

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi