1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. slb
  5. Listener
Alibaba Cloud v3.53.0 published on Wednesday, Apr 17, 2024 by Pulumi

alicloud.slb.Listener

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.53.0 published on Wednesday, Apr 17, 2024 by Pulumi

    Provides a Classic Load Balancer (SLB) Load Balancer Listener resource.

    For information about Classic Load Balancer (SLB) and how to use it, see What is Classic Load Balancer.

    For information about listener and how to use it, please see the following:

    NOTE: Available since v1.0.0.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    import * as random from "@pulumi/random";
    
    const config = new pulumi.Config();
    const name = config.get("name") || "tf-example";
    const _default = new random.RandomInteger("default", {
        min: 10000,
        max: 99999,
    });
    const listenerApplicationLoadBalancer = new alicloud.slb.ApplicationLoadBalancer("listenerApplicationLoadBalancer", {
        loadBalancerName: pulumi.interpolate`${name}-${_default.result}`,
        internetChargeType: "PayByTraffic",
        addressType: "internet",
        instanceChargeType: "PayByCLCU",
    });
    const listenerAcl = new alicloud.slb.Acl("listenerAcl", {ipVersion: "ipv4"});
    const listenerListener = new alicloud.slb.Listener("listenerListener", {
        loadBalancerId: listenerApplicationLoadBalancer.id,
        backendPort: 80,
        frontendPort: 80,
        protocol: "http",
        bandwidth: 10,
        stickySession: "on",
        stickySessionType: "insert",
        cookieTimeout: 86400,
        cookie: "tfslblistenercookie",
        healthCheck: "on",
        healthCheckDomain: "ali.com",
        healthCheckUri: "/cons",
        healthCheckConnectPort: 20,
        healthyThreshold: 8,
        unhealthyThreshold: 8,
        healthCheckTimeout: 8,
        healthCheckInterval: 5,
        healthCheckHttpCode: "http_2xx,http_3xx",
        xForwardedFor: {
            retriveSlbIp: true,
            retriveSlbId: true,
        },
        aclStatus: "on",
        aclType: "white",
        aclId: listenerAcl.id,
        requestTimeout: 80,
        idleTimeout: 30,
    });
    const first = new alicloud.slb.AclEntryAttachment("first", {
        aclId: listenerAcl.id,
        entry: "10.10.10.0/24",
        comment: "first",
    });
    const second = new alicloud.slb.AclEntryAttachment("second", {
        aclId: listenerAcl.id,
        entry: "168.10.10.0/24",
        comment: "second",
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    import pulumi_random as random
    
    config = pulumi.Config()
    name = config.get("name")
    if name is None:
        name = "tf-example"
    default = random.RandomInteger("default",
        min=10000,
        max=99999)
    listener_application_load_balancer = alicloud.slb.ApplicationLoadBalancer("listenerApplicationLoadBalancer",
        load_balancer_name=default.result.apply(lambda result: f"{name}-{result}"),
        internet_charge_type="PayByTraffic",
        address_type="internet",
        instance_charge_type="PayByCLCU")
    listener_acl = alicloud.slb.Acl("listenerAcl", ip_version="ipv4")
    listener_listener = alicloud.slb.Listener("listenerListener",
        load_balancer_id=listener_application_load_balancer.id,
        backend_port=80,
        frontend_port=80,
        protocol="http",
        bandwidth=10,
        sticky_session="on",
        sticky_session_type="insert",
        cookie_timeout=86400,
        cookie="tfslblistenercookie",
        health_check="on",
        health_check_domain="ali.com",
        health_check_uri="/cons",
        health_check_connect_port=20,
        healthy_threshold=8,
        unhealthy_threshold=8,
        health_check_timeout=8,
        health_check_interval=5,
        health_check_http_code="http_2xx,http_3xx",
        x_forwarded_for=alicloud.slb.ListenerXForwardedForArgs(
            retrive_slb_ip=True,
            retrive_slb_id=True,
        ),
        acl_status="on",
        acl_type="white",
        acl_id=listener_acl.id,
        request_timeout=80,
        idle_timeout=30)
    first = alicloud.slb.AclEntryAttachment("first",
        acl_id=listener_acl.id,
        entry="10.10.10.0/24",
        comment="first")
    second = alicloud.slb.AclEntryAttachment("second",
        acl_id=listener_acl.id,
        entry="168.10.10.0/24",
        comment="second")
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/slb"
    	"github.com/pulumi/pulumi-random/sdk/v4/go/random"
    	"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
    		}
    		_, err := random.NewRandomInteger(ctx, "default", &random.RandomIntegerArgs{
    			Min: pulumi.Int(10000),
    			Max: pulumi.Int(99999),
    		})
    		if err != nil {
    			return err
    		}
    		listenerApplicationLoadBalancer, err := slb.NewApplicationLoadBalancer(ctx, "listenerApplicationLoadBalancer", &slb.ApplicationLoadBalancerArgs{
    			LoadBalancerName: _default.Result.ApplyT(func(result int) (string, error) {
    				return fmt.Sprintf("%v-%v", name, result), nil
    			}).(pulumi.StringOutput),
    			InternetChargeType: pulumi.String("PayByTraffic"),
    			AddressType:        pulumi.String("internet"),
    			InstanceChargeType: pulumi.String("PayByCLCU"),
    		})
    		if err != nil {
    			return err
    		}
    		listenerAcl, err := slb.NewAcl(ctx, "listenerAcl", &slb.AclArgs{
    			IpVersion: pulumi.String("ipv4"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = slb.NewListener(ctx, "listenerListener", &slb.ListenerArgs{
    			LoadBalancerId:         listenerApplicationLoadBalancer.ID(),
    			BackendPort:            pulumi.Int(80),
    			FrontendPort:           pulumi.Int(80),
    			Protocol:               pulumi.String("http"),
    			Bandwidth:              pulumi.Int(10),
    			StickySession:          pulumi.String("on"),
    			StickySessionType:      pulumi.String("insert"),
    			CookieTimeout:          pulumi.Int(86400),
    			Cookie:                 pulumi.String("tfslblistenercookie"),
    			HealthCheck:            pulumi.String("on"),
    			HealthCheckDomain:      pulumi.String("ali.com"),
    			HealthCheckUri:         pulumi.String("/cons"),
    			HealthCheckConnectPort: pulumi.Int(20),
    			HealthyThreshold:       pulumi.Int(8),
    			UnhealthyThreshold:     pulumi.Int(8),
    			HealthCheckTimeout:     pulumi.Int(8),
    			HealthCheckInterval:    pulumi.Int(5),
    			HealthCheckHttpCode:    pulumi.String("http_2xx,http_3xx"),
    			XForwardedFor: &slb.ListenerXForwardedForArgs{
    				RetriveSlbIp: pulumi.Bool(true),
    				RetriveSlbId: pulumi.Bool(true),
    			},
    			AclStatus:      pulumi.String("on"),
    			AclType:        pulumi.String("white"),
    			AclId:          listenerAcl.ID(),
    			RequestTimeout: pulumi.Int(80),
    			IdleTimeout:    pulumi.Int(30),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = slb.NewAclEntryAttachment(ctx, "first", &slb.AclEntryAttachmentArgs{
    			AclId:   listenerAcl.ID(),
    			Entry:   pulumi.String("10.10.10.0/24"),
    			Comment: pulumi.String("first"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = slb.NewAclEntryAttachment(ctx, "second", &slb.AclEntryAttachmentArgs{
    			AclId:   listenerAcl.ID(),
    			Entry:   pulumi.String("168.10.10.0/24"),
    			Comment: pulumi.String("second"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    using Random = Pulumi.Random;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var name = config.Get("name") ?? "tf-example";
        var @default = new Random.RandomInteger("default", new()
        {
            Min = 10000,
            Max = 99999,
        });
    
        var listenerApplicationLoadBalancer = new AliCloud.Slb.ApplicationLoadBalancer("listenerApplicationLoadBalancer", new()
        {
            LoadBalancerName = @default.Result.Apply(result => $"{name}-{result}"),
            InternetChargeType = "PayByTraffic",
            AddressType = "internet",
            InstanceChargeType = "PayByCLCU",
        });
    
        var listenerAcl = new AliCloud.Slb.Acl("listenerAcl", new()
        {
            IpVersion = "ipv4",
        });
    
        var listenerListener = new AliCloud.Slb.Listener("listenerListener", new()
        {
            LoadBalancerId = listenerApplicationLoadBalancer.Id,
            BackendPort = 80,
            FrontendPort = 80,
            Protocol = "http",
            Bandwidth = 10,
            StickySession = "on",
            StickySessionType = "insert",
            CookieTimeout = 86400,
            Cookie = "tfslblistenercookie",
            HealthCheck = "on",
            HealthCheckDomain = "ali.com",
            HealthCheckUri = "/cons",
            HealthCheckConnectPort = 20,
            HealthyThreshold = 8,
            UnhealthyThreshold = 8,
            HealthCheckTimeout = 8,
            HealthCheckInterval = 5,
            HealthCheckHttpCode = "http_2xx,http_3xx",
            XForwardedFor = new AliCloud.Slb.Inputs.ListenerXForwardedForArgs
            {
                RetriveSlbIp = true,
                RetriveSlbId = true,
            },
            AclStatus = "on",
            AclType = "white",
            AclId = listenerAcl.Id,
            RequestTimeout = 80,
            IdleTimeout = 30,
        });
    
        var first = new AliCloud.Slb.AclEntryAttachment("first", new()
        {
            AclId = listenerAcl.Id,
            Entry = "10.10.10.0/24",
            Comment = "first",
        });
    
        var second = new AliCloud.Slb.AclEntryAttachment("second", new()
        {
            AclId = listenerAcl.Id,
            Entry = "168.10.10.0/24",
            Comment = "second",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.random.RandomInteger;
    import com.pulumi.random.RandomIntegerArgs;
    import com.pulumi.alicloud.slb.ApplicationLoadBalancer;
    import com.pulumi.alicloud.slb.ApplicationLoadBalancerArgs;
    import com.pulumi.alicloud.slb.Acl;
    import com.pulumi.alicloud.slb.AclArgs;
    import com.pulumi.alicloud.slb.Listener;
    import com.pulumi.alicloud.slb.ListenerArgs;
    import com.pulumi.alicloud.slb.inputs.ListenerXForwardedForArgs;
    import com.pulumi.alicloud.slb.AclEntryAttachment;
    import com.pulumi.alicloud.slb.AclEntryAttachmentArgs;
    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");
            var default_ = new RandomInteger("default", RandomIntegerArgs.builder()        
                .min(10000)
                .max(99999)
                .build());
    
            var listenerApplicationLoadBalancer = new ApplicationLoadBalancer("listenerApplicationLoadBalancer", ApplicationLoadBalancerArgs.builder()        
                .loadBalancerName(default_.result().applyValue(result -> String.format("%s-%s", name,result)))
                .internetChargeType("PayByTraffic")
                .addressType("internet")
                .instanceChargeType("PayByCLCU")
                .build());
    
            var listenerAcl = new Acl("listenerAcl", AclArgs.builder()        
                .ipVersion("ipv4")
                .build());
    
            var listenerListener = new Listener("listenerListener", ListenerArgs.builder()        
                .loadBalancerId(listenerApplicationLoadBalancer.id())
                .backendPort(80)
                .frontendPort(80)
                .protocol("http")
                .bandwidth(10)
                .stickySession("on")
                .stickySessionType("insert")
                .cookieTimeout(86400)
                .cookie("tfslblistenercookie")
                .healthCheck("on")
                .healthCheckDomain("ali.com")
                .healthCheckUri("/cons")
                .healthCheckConnectPort(20)
                .healthyThreshold(8)
                .unhealthyThreshold(8)
                .healthCheckTimeout(8)
                .healthCheckInterval(5)
                .healthCheckHttpCode("http_2xx,http_3xx")
                .xForwardedFor(ListenerXForwardedForArgs.builder()
                    .retriveSlbIp(true)
                    .retriveSlbId(true)
                    .build())
                .aclStatus("on")
                .aclType("white")
                .aclId(listenerAcl.id())
                .requestTimeout(80)
                .idleTimeout(30)
                .build());
    
            var first = new AclEntryAttachment("first", AclEntryAttachmentArgs.builder()        
                .aclId(listenerAcl.id())
                .entry("10.10.10.0/24")
                .comment("first")
                .build());
    
            var second = new AclEntryAttachment("second", AclEntryAttachmentArgs.builder()        
                .aclId(listenerAcl.id())
                .entry("168.10.10.0/24")
                .comment("second")
                .build());
    
        }
    }
    
    configuration:
      name:
        type: string
        default: tf-example
    resources:
      default:
        type: random:RandomInteger
        properties:
          min: 10000
          max: 99999
      listenerApplicationLoadBalancer:
        type: alicloud:slb:ApplicationLoadBalancer
        properties:
          loadBalancerName: ${name}-${default.result}
          internetChargeType: PayByTraffic
          addressType: internet
          instanceChargeType: PayByCLCU
      listenerListener:
        type: alicloud:slb:Listener
        properties:
          loadBalancerId: ${listenerApplicationLoadBalancer.id}
          backendPort: 80
          frontendPort: 80
          protocol: http
          bandwidth: 10
          stickySession: on
          stickySessionType: insert
          cookieTimeout: 86400
          cookie: tfslblistenercookie
          healthCheck: on
          healthCheckDomain: ali.com
          healthCheckUri: /cons
          healthCheckConnectPort: 20
          healthyThreshold: 8
          unhealthyThreshold: 8
          healthCheckTimeout: 8
          healthCheckInterval: 5
          healthCheckHttpCode: http_2xx,http_3xx
          xForwardedFor:
            retriveSlbIp: true
            retriveSlbId: true
          aclStatus: on
          aclType: white
          aclId: ${listenerAcl.id}
          requestTimeout: 80
          idleTimeout: 30
      listenerAcl:
        type: alicloud:slb:Acl
        properties:
          ipVersion: ipv4
      first:
        type: alicloud:slb:AclEntryAttachment
        properties:
          aclId: ${listenerAcl.id}
          entry: 10.10.10.0/24
          comment: first
      second:
        type: alicloud:slb:AclEntryAttachment
        properties:
          aclId: ${listenerAcl.id}
          entry: 168.10.10.0/24
          comment: second
    

    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,
                 frontend_port: Optional[int] = None,
                 protocol: Optional[str] = None,
                 load_balancer_id: Optional[str] = None,
                 health_check_type: Optional[str] = None,
                 enable_http2: Optional[str] = None,
                 ca_certificate_id: Optional[str] = None,
                 health_check_uri: Optional[str] = None,
                 cookie_timeout: Optional[int] = None,
                 idle_timeout: Optional[int] = None,
                 description: Optional[str] = None,
                 healthy_threshold: Optional[int] = None,
                 established_timeout: Optional[int] = None,
                 forward_port: Optional[int] = None,
                 backend_port: Optional[int] = None,
                 gzip: Optional[bool] = None,
                 health_check: Optional[str] = None,
                 health_check_connect_port: Optional[int] = None,
                 health_check_domain: Optional[str] = None,
                 health_check_http_code: Optional[str] = None,
                 health_check_interval: Optional[int] = None,
                 health_check_method: Optional[str] = None,
                 health_check_timeout: Optional[int] = None,
                 acl_id: Optional[str] = None,
                 cookie: Optional[str] = None,
                 bandwidth: Optional[int] = None,
                 delete_protection_validation: Optional[bool] = None,
                 lb_port: Optional[int] = None,
                 lb_protocol: Optional[str] = None,
                 listener_forward: Optional[str] = None,
                 acl_type: Optional[str] = None,
                 master_slave_server_group_id: Optional[str] = None,
                 persistence_timeout: Optional[int] = None,
                 acl_status: Optional[str] = None,
                 proxy_protocol_v2_enabled: Optional[bool] = None,
                 request_timeout: Optional[int] = None,
                 scheduler: Optional[str] = None,
                 server_certificate_id: Optional[str] = None,
                 server_group_id: Optional[str] = None,
                 ssl_certificate_id: Optional[str] = None,
                 sticky_session: Optional[str] = None,
                 sticky_session_type: Optional[str] = None,
                 tls_cipher_policy: Optional[str] = None,
                 unhealthy_threshold: Optional[int] = None,
                 x_forwarded_for: Optional[ListenerXForwardedForArgs] = 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:slb: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.

    Example

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

    var examplelistenerResourceResourceFromSlblistener = new AliCloud.Slb.Listener("examplelistenerResourceResourceFromSlblistener", new()
    {
        FrontendPort = 0,
        Protocol = "string",
        LoadBalancerId = "string",
        HealthCheckType = "string",
        EnableHttp2 = "string",
        CaCertificateId = "string",
        HealthCheckUri = "string",
        CookieTimeout = 0,
        IdleTimeout = 0,
        Description = "string",
        HealthyThreshold = 0,
        EstablishedTimeout = 0,
        ForwardPort = 0,
        BackendPort = 0,
        Gzip = false,
        HealthCheck = "string",
        HealthCheckConnectPort = 0,
        HealthCheckDomain = "string",
        HealthCheckHttpCode = "string",
        HealthCheckInterval = 0,
        HealthCheckMethod = "string",
        HealthCheckTimeout = 0,
        AclId = "string",
        Cookie = "string",
        Bandwidth = 0,
        DeleteProtectionValidation = false,
        ListenerForward = "string",
        AclType = "string",
        MasterSlaveServerGroupId = "string",
        PersistenceTimeout = 0,
        AclStatus = "string",
        ProxyProtocolV2Enabled = false,
        RequestTimeout = 0,
        Scheduler = "string",
        ServerCertificateId = "string",
        ServerGroupId = "string",
        StickySession = "string",
        StickySessionType = "string",
        TlsCipherPolicy = "string",
        UnhealthyThreshold = 0,
        XForwardedFor = new AliCloud.Slb.Inputs.ListenerXForwardedForArgs
        {
            RetriveClientIp = false,
            RetriveSlbId = false,
            RetriveSlbIp = false,
            RetriveSlbProto = false,
        },
    });
    
    example, err := slb.NewListener(ctx, "examplelistenerResourceResourceFromSlblistener", &slb.ListenerArgs{
    	FrontendPort:               pulumi.Int(0),
    	Protocol:                   pulumi.String("string"),
    	LoadBalancerId:             pulumi.String("string"),
    	HealthCheckType:            pulumi.String("string"),
    	EnableHttp2:                pulumi.String("string"),
    	CaCertificateId:            pulumi.String("string"),
    	HealthCheckUri:             pulumi.String("string"),
    	CookieTimeout:              pulumi.Int(0),
    	IdleTimeout:                pulumi.Int(0),
    	Description:                pulumi.String("string"),
    	HealthyThreshold:           pulumi.Int(0),
    	EstablishedTimeout:         pulumi.Int(0),
    	ForwardPort:                pulumi.Int(0),
    	BackendPort:                pulumi.Int(0),
    	Gzip:                       pulumi.Bool(false),
    	HealthCheck:                pulumi.String("string"),
    	HealthCheckConnectPort:     pulumi.Int(0),
    	HealthCheckDomain:          pulumi.String("string"),
    	HealthCheckHttpCode:        pulumi.String("string"),
    	HealthCheckInterval:        pulumi.Int(0),
    	HealthCheckMethod:          pulumi.String("string"),
    	HealthCheckTimeout:         pulumi.Int(0),
    	AclId:                      pulumi.String("string"),
    	Cookie:                     pulumi.String("string"),
    	Bandwidth:                  pulumi.Int(0),
    	DeleteProtectionValidation: pulumi.Bool(false),
    	ListenerForward:            pulumi.String("string"),
    	AclType:                    pulumi.String("string"),
    	MasterSlaveServerGroupId:   pulumi.String("string"),
    	PersistenceTimeout:         pulumi.Int(0),
    	AclStatus:                  pulumi.String("string"),
    	ProxyProtocolV2Enabled:     pulumi.Bool(false),
    	RequestTimeout:             pulumi.Int(0),
    	Scheduler:                  pulumi.String("string"),
    	ServerCertificateId:        pulumi.String("string"),
    	ServerGroupId:              pulumi.String("string"),
    	StickySession:              pulumi.String("string"),
    	StickySessionType:          pulumi.String("string"),
    	TlsCipherPolicy:            pulumi.String("string"),
    	UnhealthyThreshold:         pulumi.Int(0),
    	XForwardedFor: &slb.ListenerXForwardedForArgs{
    		RetriveClientIp: pulumi.Bool(false),
    		RetriveSlbId:    pulumi.Bool(false),
    		RetriveSlbIp:    pulumi.Bool(false),
    		RetriveSlbProto: pulumi.Bool(false),
    	},
    })
    
    var examplelistenerResourceResourceFromSlblistener = new Listener("examplelistenerResourceResourceFromSlblistener", ListenerArgs.builder()        
        .frontendPort(0)
        .protocol("string")
        .loadBalancerId("string")
        .healthCheckType("string")
        .enableHttp2("string")
        .caCertificateId("string")
        .healthCheckUri("string")
        .cookieTimeout(0)
        .idleTimeout(0)
        .description("string")
        .healthyThreshold(0)
        .establishedTimeout(0)
        .forwardPort(0)
        .backendPort(0)
        .gzip(false)
        .healthCheck("string")
        .healthCheckConnectPort(0)
        .healthCheckDomain("string")
        .healthCheckHttpCode("string")
        .healthCheckInterval(0)
        .healthCheckMethod("string")
        .healthCheckTimeout(0)
        .aclId("string")
        .cookie("string")
        .bandwidth(0)
        .deleteProtectionValidation(false)
        .listenerForward("string")
        .aclType("string")
        .masterSlaveServerGroupId("string")
        .persistenceTimeout(0)
        .aclStatus("string")
        .proxyProtocolV2Enabled(false)
        .requestTimeout(0)
        .scheduler("string")
        .serverCertificateId("string")
        .serverGroupId("string")
        .stickySession("string")
        .stickySessionType("string")
        .tlsCipherPolicy("string")
        .unhealthyThreshold(0)
        .xForwardedFor(ListenerXForwardedForArgs.builder()
            .retriveClientIp(false)
            .retriveSlbId(false)
            .retriveSlbIp(false)
            .retriveSlbProto(false)
            .build())
        .build());
    
    examplelistener_resource_resource_from_slblistener = alicloud.slb.Listener("examplelistenerResourceResourceFromSlblistener",
        frontend_port=0,
        protocol="string",
        load_balancer_id="string",
        health_check_type="string",
        enable_http2="string",
        ca_certificate_id="string",
        health_check_uri="string",
        cookie_timeout=0,
        idle_timeout=0,
        description="string",
        healthy_threshold=0,
        established_timeout=0,
        forward_port=0,
        backend_port=0,
        gzip=False,
        health_check="string",
        health_check_connect_port=0,
        health_check_domain="string",
        health_check_http_code="string",
        health_check_interval=0,
        health_check_method="string",
        health_check_timeout=0,
        acl_id="string",
        cookie="string",
        bandwidth=0,
        delete_protection_validation=False,
        listener_forward="string",
        acl_type="string",
        master_slave_server_group_id="string",
        persistence_timeout=0,
        acl_status="string",
        proxy_protocol_v2_enabled=False,
        request_timeout=0,
        scheduler="string",
        server_certificate_id="string",
        server_group_id="string",
        sticky_session="string",
        sticky_session_type="string",
        tls_cipher_policy="string",
        unhealthy_threshold=0,
        x_forwarded_for=alicloud.slb.ListenerXForwardedForArgs(
            retrive_client_ip=False,
            retrive_slb_id=False,
            retrive_slb_ip=False,
            retrive_slb_proto=False,
        ))
    
    const examplelistenerResourceResourceFromSlblistener = new alicloud.slb.Listener("examplelistenerResourceResourceFromSlblistener", {
        frontendPort: 0,
        protocol: "string",
        loadBalancerId: "string",
        healthCheckType: "string",
        enableHttp2: "string",
        caCertificateId: "string",
        healthCheckUri: "string",
        cookieTimeout: 0,
        idleTimeout: 0,
        description: "string",
        healthyThreshold: 0,
        establishedTimeout: 0,
        forwardPort: 0,
        backendPort: 0,
        gzip: false,
        healthCheck: "string",
        healthCheckConnectPort: 0,
        healthCheckDomain: "string",
        healthCheckHttpCode: "string",
        healthCheckInterval: 0,
        healthCheckMethod: "string",
        healthCheckTimeout: 0,
        aclId: "string",
        cookie: "string",
        bandwidth: 0,
        deleteProtectionValidation: false,
        listenerForward: "string",
        aclType: "string",
        masterSlaveServerGroupId: "string",
        persistenceTimeout: 0,
        aclStatus: "string",
        proxyProtocolV2Enabled: false,
        requestTimeout: 0,
        scheduler: "string",
        serverCertificateId: "string",
        serverGroupId: "string",
        stickySession: "string",
        stickySessionType: "string",
        tlsCipherPolicy: "string",
        unhealthyThreshold: 0,
        xForwardedFor: {
            retriveClientIp: false,
            retriveSlbId: false,
            retriveSlbIp: false,
            retriveSlbProto: false,
        },
    });
    
    type: alicloud:slb:Listener
    properties:
        aclId: string
        aclStatus: string
        aclType: string
        backendPort: 0
        bandwidth: 0
        caCertificateId: string
        cookie: string
        cookieTimeout: 0
        deleteProtectionValidation: false
        description: string
        enableHttp2: string
        establishedTimeout: 0
        forwardPort: 0
        frontendPort: 0
        gzip: false
        healthCheck: string
        healthCheckConnectPort: 0
        healthCheckDomain: string
        healthCheckHttpCode: string
        healthCheckInterval: 0
        healthCheckMethod: string
        healthCheckTimeout: 0
        healthCheckType: string
        healthCheckUri: string
        healthyThreshold: 0
        idleTimeout: 0
        listenerForward: string
        loadBalancerId: string
        masterSlaveServerGroupId: string
        persistenceTimeout: 0
        protocol: string
        proxyProtocolV2Enabled: false
        requestTimeout: 0
        scheduler: string
        serverCertificateId: string
        serverGroupId: string
        stickySession: string
        stickySessionType: string
        tlsCipherPolicy: string
        unhealthyThreshold: 0
        xForwardedFor:
            retriveClientIp: false
            retriveSlbId: false
            retriveSlbIp: false
            retriveSlbProto: false
    

    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:

    FrontendPort int
    The frontend port that is used by the CLB instance. Valid values: 1 to 65535.
    LoadBalancerId string
    The Load Balancer ID which is used to launch a new listener.
    Protocol string
    The protocol to listen on. Valid values: http.
    AclId string
    The ID of the network ACL that is associated with the listener. NOTE: If acl_status is set to on, acl_id is required. Otherwise, it will be ignored.
    AclStatus string
    Specifies whether to enable access control. Default value: off. Valid values: on, off.
    AclType string
    The type of the network ACL. Valid values: black, white. NOTE: If acl_status is set to on, acl_type is required. Otherwise, it will be ignored.
    BackendPort int
    The backend port that is used by the CLB instance. Valid values: 1 to 65535. NOTE: If server_group_id is not set, backend_port is required.
    Bandwidth int
    The maximum bandwidth of the listener. Unit: Mbit/s. Valid values:

    • -1: If you set bandwidth to -1, the bandwidth of the listener is unlimited.
    CaCertificateId string
    The ID of the certification authority (CA) certificate.
    Cookie string
    The cookie that is configured on the server. The cookie must be 1 to 200 characters in length and can contain only ASCII characters and digits. It cannot contain commas (,), semicolons (;), or space characters. It cannot start with a dollar sign ($). NOTE: If sticky_session is set to on, and sticky_session_type is set to server, cookie is required. Otherwise, it will be ignored.
    CookieTimeout int
    The timeout period of a cookie. Unit: seconds. Valid values: 1 to 86400. NOTE: If sticky_session is set to on, and sticky_session_type is set to insert, cookie_timeout is required. Otherwise, it will be ignored.
    DeleteProtectionValidation bool
    Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default value: false.
    Description string
    The name of the listener. The name must be 1 to 256 characters in length, and can contain letters, digits, hyphens (-), forward slashes (/), periods (.), and underscores (_).
    EnableHttp2 string
    Specifies whether to enable HTTP/2. Default value: on. Valid values: on, off.
    EstablishedTimeout int
    The timeout period of a connection. Unit: seconds. Default value: 900. Valid values: 10 to 900.
    ForwardPort int
    The listening port that is used to redirect HTTP requests to HTTPS.
    Gzip bool
    Specifies whether to enable GZIP compression to compress specific types of files. Default value: true. Valid values: true, false.
    HealthCheck string
    Specifies whether to enable the health check feature. Default value: on. Valid values: on, off. NOTE: TCP and UDP listener's HealthCheck is always on, so it will be ignored when launching TCP or UDP listener.
    HealthCheckConnectPort int
    The backend port that is used for health checks. Valid values: 0 to 65535. NOTE: health_check_connect_port takes effect only if health_check is set to on.
    HealthCheckDomain string
    The domain name that is used for health checks. NOTE: health_check_domain takes effect only if health_check is set to on.
    HealthCheckHttpCode string
    The HTTP status code for a successful health check. Separate multiple HTTP status codes with commas (,). Default value: http_2xx. Valid values: http_2xx, http_3xx, http_4xx and http_5xx. NOTE: health_check_http_code takes effect only if health_check is set to on.
    HealthCheckInterval int
    The interval between two consecutive health checks. Unit: seconds. Default value: 2. Valid values: 1 to 50. NOTE: health_check_interval takes effect only if health_check is set to on.
    HealthCheckMethod string
    The health check method used in HTTP health checks. Valid values: head, get. NOTE: health_check_method takes effect only if health_check is set to on.
    HealthCheckTimeout int
    The timeout period of a health check response. Unit: seconds. Default value: 5. Valid values: 1 to 300. NOTE: If health_check_timeout < health_check_interval, health_check_timeout will be replaced by health_check_interval. health_check_timeout takes effect only if health_check is set to on.
    HealthCheckType string
    The type of health checks. Default value: tcp. Valid values: tcp, http.
    HealthCheckUri string
    The URI that is used for health checks. The health_check_uri must be 1 to 80 characters in length, and can contain letters, digits, hyphens (-), forward slashes (/), periods (.), percent signs (%), question marks (?), number signs (#), and ampersands (&). The URI must start with a forward slash (/) but cannot be a single forward slash (/). NOTE: health_check_uri takes effect only if health_check is set to on.
    HealthyThreshold int
    The number of times that an unhealthy backend server must consecutively pass health checks before it is declared healthy. Default value: 3. Valid values: 2 to 10. NOTE: healthy_threshold takes effect only if health_check is set to on.
    IdleTimeout int
    The timeout period of an idle connection. Unit: seconds. Default value: 15. Valid values: 1 to 60.
    LbPort int

    Deprecated: Field 'lb_port' has been removed since 1.211.0.

    LbProtocol string

    Deprecated: Field 'lb_protocol' has been removed since 1.211.0.

    ListenerForward string
    Specifies whether to enable HTTP-to-HTTPS redirection. Default value: off. Valid values: on, off.
    MasterSlaveServerGroupId string
    The ID of the primary/secondary server group. NOTE: You cannot set both server_group_id and master_slave_server_group_id.
    PersistenceTimeout int
    The timeout period of session persistence. Unit: seconds. Default value: 0. Valid values: 0 to 3600.
    ProxyProtocolV2Enabled bool
    Specifies whether to use the Proxy protocol to pass client IP addresses to backend servers. Default value: false. Valid values: true, false.
    RequestTimeout int
    The timeout period of a request. Unit: seconds. Default value: 60. Valid values: 1 to 180.
    Scheduler string
    The scheduling algorithm. Default value: wrr. Valid values:
    ServerCertificateId string
    The ID of the server certificate. NOTE: server_certificate_id is also required when the value of the ssl_certificate_id is Empty.
    ServerGroupId string
    The ID of the vServer group. It's the ID of resource alicloud.slb.ServerGroup.
    SslCertificateId string
    The ID of the server certificate. NOTE: Field ssl_certificate_id has been deprecated from provider version 1.59.0. New field server_certificate_id instead.

    Deprecated: Field 'ssl_certificate_id' has been deprecated from 1.59.0 and using 'server_certificate_id' instead.

    StickySession string
    Specifies whether to enable session persistence. Default value: off. Valid values: on, off.
    StickySessionType string
    The method that is used to handle a cookie. Valid values: insert, server. NOTE: If sticky_session is set to on, sticky_session_type is required. Otherwise, it will be ignored.
    TlsCipherPolicy string
    The Transport Layer Security (TLS) security policy. Default value: tls_cipher_policy_1_0. Valid values: tls_cipher_policy_1_0, tls_cipher_policy_1_1, tls_cipher_policy_1_2, tls_cipher_policy_1_2_strict.
    UnhealthyThreshold int
    The number of times that a healthy backend server must consecutively fail health checks before it is declared unhealthy. Default value: 3. Valid values: 2 to 10. NOTE: unhealthy_threshold takes effect only if health_check is set to on.
    XForwardedFor Pulumi.AliCloud.Slb.Inputs.ListenerXForwardedFor
    Whether to set additional HTTP Header field "X-Forwarded-For". See x_forwarded_for below.
    FrontendPort int
    The frontend port that is used by the CLB instance. Valid values: 1 to 65535.
    LoadBalancerId string
    The Load Balancer ID which is used to launch a new listener.
    Protocol string
    The protocol to listen on. Valid values: http.
    AclId string
    The ID of the network ACL that is associated with the listener. NOTE: If acl_status is set to on, acl_id is required. Otherwise, it will be ignored.
    AclStatus string
    Specifies whether to enable access control. Default value: off. Valid values: on, off.
    AclType string
    The type of the network ACL. Valid values: black, white. NOTE: If acl_status is set to on, acl_type is required. Otherwise, it will be ignored.
    BackendPort int
    The backend port that is used by the CLB instance. Valid values: 1 to 65535. NOTE: If server_group_id is not set, backend_port is required.
    Bandwidth int
    The maximum bandwidth of the listener. Unit: Mbit/s. Valid values:

    • -1: If you set bandwidth to -1, the bandwidth of the listener is unlimited.
    CaCertificateId string
    The ID of the certification authority (CA) certificate.
    Cookie string
    The cookie that is configured on the server. The cookie must be 1 to 200 characters in length and can contain only ASCII characters and digits. It cannot contain commas (,), semicolons (;), or space characters. It cannot start with a dollar sign ($). NOTE: If sticky_session is set to on, and sticky_session_type is set to server, cookie is required. Otherwise, it will be ignored.
    CookieTimeout int
    The timeout period of a cookie. Unit: seconds. Valid values: 1 to 86400. NOTE: If sticky_session is set to on, and sticky_session_type is set to insert, cookie_timeout is required. Otherwise, it will be ignored.
    DeleteProtectionValidation bool
    Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default value: false.
    Description string
    The name of the listener. The name must be 1 to 256 characters in length, and can contain letters, digits, hyphens (-), forward slashes (/), periods (.), and underscores (_).
    EnableHttp2 string
    Specifies whether to enable HTTP/2. Default value: on. Valid values: on, off.
    EstablishedTimeout int
    The timeout period of a connection. Unit: seconds. Default value: 900. Valid values: 10 to 900.
    ForwardPort int
    The listening port that is used to redirect HTTP requests to HTTPS.
    Gzip bool
    Specifies whether to enable GZIP compression to compress specific types of files. Default value: true. Valid values: true, false.
    HealthCheck string
    Specifies whether to enable the health check feature. Default value: on. Valid values: on, off. NOTE: TCP and UDP listener's HealthCheck is always on, so it will be ignored when launching TCP or UDP listener.
    HealthCheckConnectPort int
    The backend port that is used for health checks. Valid values: 0 to 65535. NOTE: health_check_connect_port takes effect only if health_check is set to on.
    HealthCheckDomain string
    The domain name that is used for health checks. NOTE: health_check_domain takes effect only if health_check is set to on.
    HealthCheckHttpCode string
    The HTTP status code for a successful health check. Separate multiple HTTP status codes with commas (,). Default value: http_2xx. Valid values: http_2xx, http_3xx, http_4xx and http_5xx. NOTE: health_check_http_code takes effect only if health_check is set to on.
    HealthCheckInterval int
    The interval between two consecutive health checks. Unit: seconds. Default value: 2. Valid values: 1 to 50. NOTE: health_check_interval takes effect only if health_check is set to on.
    HealthCheckMethod string
    The health check method used in HTTP health checks. Valid values: head, get. NOTE: health_check_method takes effect only if health_check is set to on.
    HealthCheckTimeout int
    The timeout period of a health check response. Unit: seconds. Default value: 5. Valid values: 1 to 300. NOTE: If health_check_timeout < health_check_interval, health_check_timeout will be replaced by health_check_interval. health_check_timeout takes effect only if health_check is set to on.
    HealthCheckType string
    The type of health checks. Default value: tcp. Valid values: tcp, http.
    HealthCheckUri string
    The URI that is used for health checks. The health_check_uri must be 1 to 80 characters in length, and can contain letters, digits, hyphens (-), forward slashes (/), periods (.), percent signs (%), question marks (?), number signs (#), and ampersands (&). The URI must start with a forward slash (/) but cannot be a single forward slash (/). NOTE: health_check_uri takes effect only if health_check is set to on.
    HealthyThreshold int
    The number of times that an unhealthy backend server must consecutively pass health checks before it is declared healthy. Default value: 3. Valid values: 2 to 10. NOTE: healthy_threshold takes effect only if health_check is set to on.
    IdleTimeout int
    The timeout period of an idle connection. Unit: seconds. Default value: 15. Valid values: 1 to 60.
    LbPort int

    Deprecated: Field 'lb_port' has been removed since 1.211.0.

    LbProtocol string

    Deprecated: Field 'lb_protocol' has been removed since 1.211.0.

    ListenerForward string
    Specifies whether to enable HTTP-to-HTTPS redirection. Default value: off. Valid values: on, off.
    MasterSlaveServerGroupId string
    The ID of the primary/secondary server group. NOTE: You cannot set both server_group_id and master_slave_server_group_id.
    PersistenceTimeout int
    The timeout period of session persistence. Unit: seconds. Default value: 0. Valid values: 0 to 3600.
    ProxyProtocolV2Enabled bool
    Specifies whether to use the Proxy protocol to pass client IP addresses to backend servers. Default value: false. Valid values: true, false.
    RequestTimeout int
    The timeout period of a request. Unit: seconds. Default value: 60. Valid values: 1 to 180.
    Scheduler string
    The scheduling algorithm. Default value: wrr. Valid values:
    ServerCertificateId string
    The ID of the server certificate. NOTE: server_certificate_id is also required when the value of the ssl_certificate_id is Empty.
    ServerGroupId string
    The ID of the vServer group. It's the ID of resource alicloud.slb.ServerGroup.
    SslCertificateId string
    The ID of the server certificate. NOTE: Field ssl_certificate_id has been deprecated from provider version 1.59.0. New field server_certificate_id instead.

    Deprecated: Field 'ssl_certificate_id' has been deprecated from 1.59.0 and using 'server_certificate_id' instead.

    StickySession string
    Specifies whether to enable session persistence. Default value: off. Valid values: on, off.
    StickySessionType string
    The method that is used to handle a cookie. Valid values: insert, server. NOTE: If sticky_session is set to on, sticky_session_type is required. Otherwise, it will be ignored.
    TlsCipherPolicy string
    The Transport Layer Security (TLS) security policy. Default value: tls_cipher_policy_1_0. Valid values: tls_cipher_policy_1_0, tls_cipher_policy_1_1, tls_cipher_policy_1_2, tls_cipher_policy_1_2_strict.
    UnhealthyThreshold int
    The number of times that a healthy backend server must consecutively fail health checks before it is declared unhealthy. Default value: 3. Valid values: 2 to 10. NOTE: unhealthy_threshold takes effect only if health_check is set to on.
    XForwardedFor ListenerXForwardedForArgs
    Whether to set additional HTTP Header field "X-Forwarded-For". See x_forwarded_for below.
    frontendPort Integer
    The frontend port that is used by the CLB instance. Valid values: 1 to 65535.
    loadBalancerId String
    The Load Balancer ID which is used to launch a new listener.
    protocol String
    The protocol to listen on. Valid values: http.
    aclId String
    The ID of the network ACL that is associated with the listener. NOTE: If acl_status is set to on, acl_id is required. Otherwise, it will be ignored.
    aclStatus String
    Specifies whether to enable access control. Default value: off. Valid values: on, off.
    aclType String
    The type of the network ACL. Valid values: black, white. NOTE: If acl_status is set to on, acl_type is required. Otherwise, it will be ignored.
    backendPort Integer
    The backend port that is used by the CLB instance. Valid values: 1 to 65535. NOTE: If server_group_id is not set, backend_port is required.
    bandwidth Integer
    The maximum bandwidth of the listener. Unit: Mbit/s. Valid values:

    • -1: If you set bandwidth to -1, the bandwidth of the listener is unlimited.
    caCertificateId String
    The ID of the certification authority (CA) certificate.
    cookie String
    The cookie that is configured on the server. The cookie must be 1 to 200 characters in length and can contain only ASCII characters and digits. It cannot contain commas (,), semicolons (;), or space characters. It cannot start with a dollar sign ($). NOTE: If sticky_session is set to on, and sticky_session_type is set to server, cookie is required. Otherwise, it will be ignored.
    cookieTimeout Integer
    The timeout period of a cookie. Unit: seconds. Valid values: 1 to 86400. NOTE: If sticky_session is set to on, and sticky_session_type is set to insert, cookie_timeout is required. Otherwise, it will be ignored.
    deleteProtectionValidation Boolean
    Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default value: false.
    description String
    The name of the listener. The name must be 1 to 256 characters in length, and can contain letters, digits, hyphens (-), forward slashes (/), periods (.), and underscores (_).
    enableHttp2 String
    Specifies whether to enable HTTP/2. Default value: on. Valid values: on, off.
    establishedTimeout Integer
    The timeout period of a connection. Unit: seconds. Default value: 900. Valid values: 10 to 900.
    forwardPort Integer
    The listening port that is used to redirect HTTP requests to HTTPS.
    gzip Boolean
    Specifies whether to enable GZIP compression to compress specific types of files. Default value: true. Valid values: true, false.
    healthCheck String
    Specifies whether to enable the health check feature. Default value: on. Valid values: on, off. NOTE: TCP and UDP listener's HealthCheck is always on, so it will be ignored when launching TCP or UDP listener.
    healthCheckConnectPort Integer
    The backend port that is used for health checks. Valid values: 0 to 65535. NOTE: health_check_connect_port takes effect only if health_check is set to on.
    healthCheckDomain String
    The domain name that is used for health checks. NOTE: health_check_domain takes effect only if health_check is set to on.
    healthCheckHttpCode String
    The HTTP status code for a successful health check. Separate multiple HTTP status codes with commas (,). Default value: http_2xx. Valid values: http_2xx, http_3xx, http_4xx and http_5xx. NOTE: health_check_http_code takes effect only if health_check is set to on.
    healthCheckInterval Integer
    The interval between two consecutive health checks. Unit: seconds. Default value: 2. Valid values: 1 to 50. NOTE: health_check_interval takes effect only if health_check is set to on.
    healthCheckMethod String
    The health check method used in HTTP health checks. Valid values: head, get. NOTE: health_check_method takes effect only if health_check is set to on.
    healthCheckTimeout Integer
    The timeout period of a health check response. Unit: seconds. Default value: 5. Valid values: 1 to 300. NOTE: If health_check_timeout < health_check_interval, health_check_timeout will be replaced by health_check_interval. health_check_timeout takes effect only if health_check is set to on.
    healthCheckType String
    The type of health checks. Default value: tcp. Valid values: tcp, http.
    healthCheckUri String
    The URI that is used for health checks. The health_check_uri must be 1 to 80 characters in length, and can contain letters, digits, hyphens (-), forward slashes (/), periods (.), percent signs (%), question marks (?), number signs (#), and ampersands (&). The URI must start with a forward slash (/) but cannot be a single forward slash (/). NOTE: health_check_uri takes effect only if health_check is set to on.
    healthyThreshold Integer
    The number of times that an unhealthy backend server must consecutively pass health checks before it is declared healthy. Default value: 3. Valid values: 2 to 10. NOTE: healthy_threshold takes effect only if health_check is set to on.
    idleTimeout Integer
    The timeout period of an idle connection. Unit: seconds. Default value: 15. Valid values: 1 to 60.
    lbPort Integer

    Deprecated: Field 'lb_port' has been removed since 1.211.0.

    lbProtocol String

    Deprecated: Field 'lb_protocol' has been removed since 1.211.0.

    listenerForward String
    Specifies whether to enable HTTP-to-HTTPS redirection. Default value: off. Valid values: on, off.
    masterSlaveServerGroupId String
    The ID of the primary/secondary server group. NOTE: You cannot set both server_group_id and master_slave_server_group_id.
    persistenceTimeout Integer
    The timeout period of session persistence. Unit: seconds. Default value: 0. Valid values: 0 to 3600.
    proxyProtocolV2Enabled Boolean
    Specifies whether to use the Proxy protocol to pass client IP addresses to backend servers. Default value: false. Valid values: true, false.
    requestTimeout Integer
    The timeout period of a request. Unit: seconds. Default value: 60. Valid values: 1 to 180.
    scheduler String
    The scheduling algorithm. Default value: wrr. Valid values:
    serverCertificateId String
    The ID of the server certificate. NOTE: server_certificate_id is also required when the value of the ssl_certificate_id is Empty.
    serverGroupId String
    The ID of the vServer group. It's the ID of resource alicloud.slb.ServerGroup.
    sslCertificateId String
    The ID of the server certificate. NOTE: Field ssl_certificate_id has been deprecated from provider version 1.59.0. New field server_certificate_id instead.

    Deprecated: Field 'ssl_certificate_id' has been deprecated from 1.59.0 and using 'server_certificate_id' instead.

    stickySession String
    Specifies whether to enable session persistence. Default value: off. Valid values: on, off.
    stickySessionType String
    The method that is used to handle a cookie. Valid values: insert, server. NOTE: If sticky_session is set to on, sticky_session_type is required. Otherwise, it will be ignored.
    tlsCipherPolicy String
    The Transport Layer Security (TLS) security policy. Default value: tls_cipher_policy_1_0. Valid values: tls_cipher_policy_1_0, tls_cipher_policy_1_1, tls_cipher_policy_1_2, tls_cipher_policy_1_2_strict.
    unhealthyThreshold Integer
    The number of times that a healthy backend server must consecutively fail health checks before it is declared unhealthy. Default value: 3. Valid values: 2 to 10. NOTE: unhealthy_threshold takes effect only if health_check is set to on.
    xForwardedFor ListenerXForwardedFor
    Whether to set additional HTTP Header field "X-Forwarded-For". See x_forwarded_for below.
    frontendPort number
    The frontend port that is used by the CLB instance. Valid values: 1 to 65535.
    loadBalancerId string
    The Load Balancer ID which is used to launch a new listener.
    protocol string
    The protocol to listen on. Valid values: http.
    aclId string
    The ID of the network ACL that is associated with the listener. NOTE: If acl_status is set to on, acl_id is required. Otherwise, it will be ignored.
    aclStatus string
    Specifies whether to enable access control. Default value: off. Valid values: on, off.
    aclType string
    The type of the network ACL. Valid values: black, white. NOTE: If acl_status is set to on, acl_type is required. Otherwise, it will be ignored.
    backendPort number
    The backend port that is used by the CLB instance. Valid values: 1 to 65535. NOTE: If server_group_id is not set, backend_port is required.
    bandwidth number
    The maximum bandwidth of the listener. Unit: Mbit/s. Valid values:

    • -1: If you set bandwidth to -1, the bandwidth of the listener is unlimited.
    caCertificateId string
    The ID of the certification authority (CA) certificate.
    cookie string
    The cookie that is configured on the server. The cookie must be 1 to 200 characters in length and can contain only ASCII characters and digits. It cannot contain commas (,), semicolons (;), or space characters. It cannot start with a dollar sign ($). NOTE: If sticky_session is set to on, and sticky_session_type is set to server, cookie is required. Otherwise, it will be ignored.
    cookieTimeout number
    The timeout period of a cookie. Unit: seconds. Valid values: 1 to 86400. NOTE: If sticky_session is set to on, and sticky_session_type is set to insert, cookie_timeout is required. Otherwise, it will be ignored.
    deleteProtectionValidation boolean
    Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default value: false.
    description string
    The name of the listener. The name must be 1 to 256 characters in length, and can contain letters, digits, hyphens (-), forward slashes (/), periods (.), and underscores (_).
    enableHttp2 string
    Specifies whether to enable HTTP/2. Default value: on. Valid values: on, off.
    establishedTimeout number
    The timeout period of a connection. Unit: seconds. Default value: 900. Valid values: 10 to 900.
    forwardPort number
    The listening port that is used to redirect HTTP requests to HTTPS.
    gzip boolean
    Specifies whether to enable GZIP compression to compress specific types of files. Default value: true. Valid values: true, false.
    healthCheck string
    Specifies whether to enable the health check feature. Default value: on. Valid values: on, off. NOTE: TCP and UDP listener's HealthCheck is always on, so it will be ignored when launching TCP or UDP listener.
    healthCheckConnectPort number
    The backend port that is used for health checks. Valid values: 0 to 65535. NOTE: health_check_connect_port takes effect only if health_check is set to on.
    healthCheckDomain string
    The domain name that is used for health checks. NOTE: health_check_domain takes effect only if health_check is set to on.
    healthCheckHttpCode string
    The HTTP status code for a successful health check. Separate multiple HTTP status codes with commas (,). Default value: http_2xx. Valid values: http_2xx, http_3xx, http_4xx and http_5xx. NOTE: health_check_http_code takes effect only if health_check is set to on.
    healthCheckInterval number
    The interval between two consecutive health checks. Unit: seconds. Default value: 2. Valid values: 1 to 50. NOTE: health_check_interval takes effect only if health_check is set to on.
    healthCheckMethod string
    The health check method used in HTTP health checks. Valid values: head, get. NOTE: health_check_method takes effect only if health_check is set to on.
    healthCheckTimeout number
    The timeout period of a health check response. Unit: seconds. Default value: 5. Valid values: 1 to 300. NOTE: If health_check_timeout < health_check_interval, health_check_timeout will be replaced by health_check_interval. health_check_timeout takes effect only if health_check is set to on.
    healthCheckType string
    The type of health checks. Default value: tcp. Valid values: tcp, http.
    healthCheckUri string
    The URI that is used for health checks. The health_check_uri must be 1 to 80 characters in length, and can contain letters, digits, hyphens (-), forward slashes (/), periods (.), percent signs (%), question marks (?), number signs (#), and ampersands (&). The URI must start with a forward slash (/) but cannot be a single forward slash (/). NOTE: health_check_uri takes effect only if health_check is set to on.
    healthyThreshold number
    The number of times that an unhealthy backend server must consecutively pass health checks before it is declared healthy. Default value: 3. Valid values: 2 to 10. NOTE: healthy_threshold takes effect only if health_check is set to on.
    idleTimeout number
    The timeout period of an idle connection. Unit: seconds. Default value: 15. Valid values: 1 to 60.
    lbPort number

    Deprecated: Field 'lb_port' has been removed since 1.211.0.

    lbProtocol string

    Deprecated: Field 'lb_protocol' has been removed since 1.211.0.

    listenerForward string
    Specifies whether to enable HTTP-to-HTTPS redirection. Default value: off. Valid values: on, off.
    masterSlaveServerGroupId string
    The ID of the primary/secondary server group. NOTE: You cannot set both server_group_id and master_slave_server_group_id.
    persistenceTimeout number
    The timeout period of session persistence. Unit: seconds. Default value: 0. Valid values: 0 to 3600.
    proxyProtocolV2Enabled boolean
    Specifies whether to use the Proxy protocol to pass client IP addresses to backend servers. Default value: false. Valid values: true, false.
    requestTimeout number
    The timeout period of a request. Unit: seconds. Default value: 60. Valid values: 1 to 180.
    scheduler string
    The scheduling algorithm. Default value: wrr. Valid values:
    serverCertificateId string
    The ID of the server certificate. NOTE: server_certificate_id is also required when the value of the ssl_certificate_id is Empty.
    serverGroupId string
    The ID of the vServer group. It's the ID of resource alicloud.slb.ServerGroup.
    sslCertificateId string
    The ID of the server certificate. NOTE: Field ssl_certificate_id has been deprecated from provider version 1.59.0. New field server_certificate_id instead.

    Deprecated: Field 'ssl_certificate_id' has been deprecated from 1.59.0 and using 'server_certificate_id' instead.

    stickySession string
    Specifies whether to enable session persistence. Default value: off. Valid values: on, off.
    stickySessionType string
    The method that is used to handle a cookie. Valid values: insert, server. NOTE: If sticky_session is set to on, sticky_session_type is required. Otherwise, it will be ignored.
    tlsCipherPolicy string
    The Transport Layer Security (TLS) security policy. Default value: tls_cipher_policy_1_0. Valid values: tls_cipher_policy_1_0, tls_cipher_policy_1_1, tls_cipher_policy_1_2, tls_cipher_policy_1_2_strict.
    unhealthyThreshold number
    The number of times that a healthy backend server must consecutively fail health checks before it is declared unhealthy. Default value: 3. Valid values: 2 to 10. NOTE: unhealthy_threshold takes effect only if health_check is set to on.
    xForwardedFor ListenerXForwardedFor
    Whether to set additional HTTP Header field "X-Forwarded-For". See x_forwarded_for below.
    frontend_port int
    The frontend port that is used by the CLB instance. Valid values: 1 to 65535.
    load_balancer_id str
    The Load Balancer ID which is used to launch a new listener.
    protocol str
    The protocol to listen on. Valid values: http.
    acl_id str
    The ID of the network ACL that is associated with the listener. NOTE: If acl_status is set to on, acl_id is required. Otherwise, it will be ignored.
    acl_status str
    Specifies whether to enable access control. Default value: off. Valid values: on, off.
    acl_type str
    The type of the network ACL. Valid values: black, white. NOTE: If acl_status is set to on, acl_type is required. Otherwise, it will be ignored.
    backend_port int
    The backend port that is used by the CLB instance. Valid values: 1 to 65535. NOTE: If server_group_id is not set, backend_port is required.
    bandwidth int
    The maximum bandwidth of the listener. Unit: Mbit/s. Valid values:

    • -1: If you set bandwidth to -1, the bandwidth of the listener is unlimited.
    ca_certificate_id str
    The ID of the certification authority (CA) certificate.
    cookie str
    The cookie that is configured on the server. The cookie must be 1 to 200 characters in length and can contain only ASCII characters and digits. It cannot contain commas (,), semicolons (;), or space characters. It cannot start with a dollar sign ($). NOTE: If sticky_session is set to on, and sticky_session_type is set to server, cookie is required. Otherwise, it will be ignored.
    cookie_timeout int
    The timeout period of a cookie. Unit: seconds. Valid values: 1 to 86400. NOTE: If sticky_session is set to on, and sticky_session_type is set to insert, cookie_timeout is required. Otherwise, it will be ignored.
    delete_protection_validation bool
    Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default value: false.
    description str
    The name of the listener. The name must be 1 to 256 characters in length, and can contain letters, digits, hyphens (-), forward slashes (/), periods (.), and underscores (_).
    enable_http2 str
    Specifies whether to enable HTTP/2. Default value: on. Valid values: on, off.
    established_timeout int
    The timeout period of a connection. Unit: seconds. Default value: 900. Valid values: 10 to 900.
    forward_port int
    The listening port that is used to redirect HTTP requests to HTTPS.
    gzip bool
    Specifies whether to enable GZIP compression to compress specific types of files. Default value: true. Valid values: true, false.
    health_check str
    Specifies whether to enable the health check feature. Default value: on. Valid values: on, off. NOTE: TCP and UDP listener's HealthCheck is always on, so it will be ignored when launching TCP or UDP listener.
    health_check_connect_port int
    The backend port that is used for health checks. Valid values: 0 to 65535. NOTE: health_check_connect_port takes effect only if health_check is set to on.
    health_check_domain str
    The domain name that is used for health checks. NOTE: health_check_domain takes effect only if health_check is set to on.
    health_check_http_code str
    The HTTP status code for a successful health check. Separate multiple HTTP status codes with commas (,). Default value: http_2xx. Valid values: http_2xx, http_3xx, http_4xx and http_5xx. NOTE: health_check_http_code takes effect only if health_check is set to on.
    health_check_interval int
    The interval between two consecutive health checks. Unit: seconds. Default value: 2. Valid values: 1 to 50. NOTE: health_check_interval takes effect only if health_check is set to on.
    health_check_method str
    The health check method used in HTTP health checks. Valid values: head, get. NOTE: health_check_method takes effect only if health_check is set to on.
    health_check_timeout int
    The timeout period of a health check response. Unit: seconds. Default value: 5. Valid values: 1 to 300. NOTE: If health_check_timeout < health_check_interval, health_check_timeout will be replaced by health_check_interval. health_check_timeout takes effect only if health_check is set to on.
    health_check_type str
    The type of health checks. Default value: tcp. Valid values: tcp, http.
    health_check_uri str
    The URI that is used for health checks. The health_check_uri must be 1 to 80 characters in length, and can contain letters, digits, hyphens (-), forward slashes (/), periods (.), percent signs (%), question marks (?), number signs (#), and ampersands (&). The URI must start with a forward slash (/) but cannot be a single forward slash (/). NOTE: health_check_uri takes effect only if health_check is set to on.
    healthy_threshold int
    The number of times that an unhealthy backend server must consecutively pass health checks before it is declared healthy. Default value: 3. Valid values: 2 to 10. NOTE: healthy_threshold takes effect only if health_check is set to on.
    idle_timeout int
    The timeout period of an idle connection. Unit: seconds. Default value: 15. Valid values: 1 to 60.
    lb_port int

    Deprecated: Field 'lb_port' has been removed since 1.211.0.

    lb_protocol str

    Deprecated: Field 'lb_protocol' has been removed since 1.211.0.

    listener_forward str
    Specifies whether to enable HTTP-to-HTTPS redirection. Default value: off. Valid values: on, off.
    master_slave_server_group_id str
    The ID of the primary/secondary server group. NOTE: You cannot set both server_group_id and master_slave_server_group_id.
    persistence_timeout int
    The timeout period of session persistence. Unit: seconds. Default value: 0. Valid values: 0 to 3600.
    proxy_protocol_v2_enabled bool
    Specifies whether to use the Proxy protocol to pass client IP addresses to backend servers. Default value: false. Valid values: true, false.
    request_timeout int
    The timeout period of a request. Unit: seconds. Default value: 60. Valid values: 1 to 180.
    scheduler str
    The scheduling algorithm. Default value: wrr. Valid values:
    server_certificate_id str
    The ID of the server certificate. NOTE: server_certificate_id is also required when the value of the ssl_certificate_id is Empty.
    server_group_id str
    The ID of the vServer group. It's the ID of resource alicloud.slb.ServerGroup.
    ssl_certificate_id str
    The ID of the server certificate. NOTE: Field ssl_certificate_id has been deprecated from provider version 1.59.0. New field server_certificate_id instead.

    Deprecated: Field 'ssl_certificate_id' has been deprecated from 1.59.0 and using 'server_certificate_id' instead.

    sticky_session str
    Specifies whether to enable session persistence. Default value: off. Valid values: on, off.
    sticky_session_type str
    The method that is used to handle a cookie. Valid values: insert, server. NOTE: If sticky_session is set to on, sticky_session_type is required. Otherwise, it will be ignored.
    tls_cipher_policy str
    The Transport Layer Security (TLS) security policy. Default value: tls_cipher_policy_1_0. Valid values: tls_cipher_policy_1_0, tls_cipher_policy_1_1, tls_cipher_policy_1_2, tls_cipher_policy_1_2_strict.
    unhealthy_threshold int
    The number of times that a healthy backend server must consecutively fail health checks before it is declared unhealthy. Default value: 3. Valid values: 2 to 10. NOTE: unhealthy_threshold takes effect only if health_check is set to on.
    x_forwarded_for ListenerXForwardedForArgs
    Whether to set additional HTTP Header field "X-Forwarded-For". See x_forwarded_for below.
    frontendPort Number
    The frontend port that is used by the CLB instance. Valid values: 1 to 65535.
    loadBalancerId String
    The Load Balancer ID which is used to launch a new listener.
    protocol String
    The protocol to listen on. Valid values: http.
    aclId String
    The ID of the network ACL that is associated with the listener. NOTE: If acl_status is set to on, acl_id is required. Otherwise, it will be ignored.
    aclStatus String
    Specifies whether to enable access control. Default value: off. Valid values: on, off.
    aclType String
    The type of the network ACL. Valid values: black, white. NOTE: If acl_status is set to on, acl_type is required. Otherwise, it will be ignored.
    backendPort Number
    The backend port that is used by the CLB instance. Valid values: 1 to 65535. NOTE: If server_group_id is not set, backend_port is required.
    bandwidth Number
    The maximum bandwidth of the listener. Unit: Mbit/s. Valid values:

    • -1: If you set bandwidth to -1, the bandwidth of the listener is unlimited.
    caCertificateId String
    The ID of the certification authority (CA) certificate.
    cookie String
    The cookie that is configured on the server. The cookie must be 1 to 200 characters in length and can contain only ASCII characters and digits. It cannot contain commas (,), semicolons (;), or space characters. It cannot start with a dollar sign ($). NOTE: If sticky_session is set to on, and sticky_session_type is set to server, cookie is required. Otherwise, it will be ignored.
    cookieTimeout Number
    The timeout period of a cookie. Unit: seconds. Valid values: 1 to 86400. NOTE: If sticky_session is set to on, and sticky_session_type is set to insert, cookie_timeout is required. Otherwise, it will be ignored.
    deleteProtectionValidation Boolean
    Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default value: false.
    description String
    The name of the listener. The name must be 1 to 256 characters in length, and can contain letters, digits, hyphens (-), forward slashes (/), periods (.), and underscores (_).
    enableHttp2 String
    Specifies whether to enable HTTP/2. Default value: on. Valid values: on, off.
    establishedTimeout Number
    The timeout period of a connection. Unit: seconds. Default value: 900. Valid values: 10 to 900.
    forwardPort Number
    The listening port that is used to redirect HTTP requests to HTTPS.
    gzip Boolean
    Specifies whether to enable GZIP compression to compress specific types of files. Default value: true. Valid values: true, false.
    healthCheck String
    Specifies whether to enable the health check feature. Default value: on. Valid values: on, off. NOTE: TCP and UDP listener's HealthCheck is always on, so it will be ignored when launching TCP or UDP listener.
    healthCheckConnectPort Number
    The backend port that is used for health checks. Valid values: 0 to 65535. NOTE: health_check_connect_port takes effect only if health_check is set to on.
    healthCheckDomain String
    The domain name that is used for health checks. NOTE: health_check_domain takes effect only if health_check is set to on.
    healthCheckHttpCode String
    The HTTP status code for a successful health check. Separate multiple HTTP status codes with commas (,). Default value: http_2xx. Valid values: http_2xx, http_3xx, http_4xx and http_5xx. NOTE: health_check_http_code takes effect only if health_check is set to on.
    healthCheckInterval Number
    The interval between two consecutive health checks. Unit: seconds. Default value: 2. Valid values: 1 to 50. NOTE: health_check_interval takes effect only if health_check is set to on.
    healthCheckMethod String
    The health check method used in HTTP health checks. Valid values: head, get. NOTE: health_check_method takes effect only if health_check is set to on.
    healthCheckTimeout Number
    The timeout period of a health check response. Unit: seconds. Default value: 5. Valid values: 1 to 300. NOTE: If health_check_timeout < health_check_interval, health_check_timeout will be replaced by health_check_interval. health_check_timeout takes effect only if health_check is set to on.
    healthCheckType String
    The type of health checks. Default value: tcp. Valid values: tcp, http.
    healthCheckUri String
    The URI that is used for health checks. The health_check_uri must be 1 to 80 characters in length, and can contain letters, digits, hyphens (-), forward slashes (/), periods (.), percent signs (%), question marks (?), number signs (#), and ampersands (&). The URI must start with a forward slash (/) but cannot be a single forward slash (/). NOTE: health_check_uri takes effect only if health_check is set to on.
    healthyThreshold Number
    The number of times that an unhealthy backend server must consecutively pass health checks before it is declared healthy. Default value: 3. Valid values: 2 to 10. NOTE: healthy_threshold takes effect only if health_check is set to on.
    idleTimeout Number
    The timeout period of an idle connection. Unit: seconds. Default value: 15. Valid values: 1 to 60.
    lbPort Number

    Deprecated: Field 'lb_port' has been removed since 1.211.0.

    lbProtocol String

    Deprecated: Field 'lb_protocol' has been removed since 1.211.0.

    listenerForward String
    Specifies whether to enable HTTP-to-HTTPS redirection. Default value: off. Valid values: on, off.
    masterSlaveServerGroupId String
    The ID of the primary/secondary server group. NOTE: You cannot set both server_group_id and master_slave_server_group_id.
    persistenceTimeout Number
    The timeout period of session persistence. Unit: seconds. Default value: 0. Valid values: 0 to 3600.
    proxyProtocolV2Enabled Boolean
    Specifies whether to use the Proxy protocol to pass client IP addresses to backend servers. Default value: false. Valid values: true, false.
    requestTimeout Number
    The timeout period of a request. Unit: seconds. Default value: 60. Valid values: 1 to 180.
    scheduler String
    The scheduling algorithm. Default value: wrr. Valid values:
    serverCertificateId String
    The ID of the server certificate. NOTE: server_certificate_id is also required when the value of the ssl_certificate_id is Empty.
    serverGroupId String
    The ID of the vServer group. It's the ID of resource alicloud.slb.ServerGroup.
    sslCertificateId String
    The ID of the server certificate. NOTE: Field ssl_certificate_id has been deprecated from provider version 1.59.0. New field server_certificate_id instead.

    Deprecated: Field 'ssl_certificate_id' has been deprecated from 1.59.0 and using 'server_certificate_id' instead.

    stickySession String
    Specifies whether to enable session persistence. Default value: off. Valid values: on, off.
    stickySessionType String
    The method that is used to handle a cookie. Valid values: insert, server. NOTE: If sticky_session is set to on, sticky_session_type is required. Otherwise, it will be ignored.
    tlsCipherPolicy String
    The Transport Layer Security (TLS) security policy. Default value: tls_cipher_policy_1_0. Valid values: tls_cipher_policy_1_0, tls_cipher_policy_1_1, tls_cipher_policy_1_2, tls_cipher_policy_1_2_strict.
    unhealthyThreshold Number
    The number of times that a healthy backend server must consecutively fail health checks before it is declared unhealthy. Default value: 3. Valid values: 2 to 10. NOTE: unhealthy_threshold takes effect only if health_check is set to on.
    xForwardedFor Property Map
    Whether to set additional HTTP Header field "X-Forwarded-For". See x_forwarded_for below.

    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,
            acl_id: Optional[str] = None,
            acl_status: Optional[str] = None,
            acl_type: Optional[str] = None,
            backend_port: Optional[int] = None,
            bandwidth: Optional[int] = None,
            ca_certificate_id: Optional[str] = None,
            cookie: Optional[str] = None,
            cookie_timeout: Optional[int] = None,
            delete_protection_validation: Optional[bool] = None,
            description: Optional[str] = None,
            enable_http2: Optional[str] = None,
            established_timeout: Optional[int] = None,
            forward_port: Optional[int] = None,
            frontend_port: Optional[int] = None,
            gzip: Optional[bool] = None,
            health_check: Optional[str] = None,
            health_check_connect_port: Optional[int] = None,
            health_check_domain: Optional[str] = None,
            health_check_http_code: Optional[str] = None,
            health_check_interval: Optional[int] = None,
            health_check_method: Optional[str] = None,
            health_check_timeout: Optional[int] = None,
            health_check_type: Optional[str] = None,
            health_check_uri: Optional[str] = None,
            healthy_threshold: Optional[int] = None,
            idle_timeout: Optional[int] = None,
            lb_port: Optional[int] = None,
            lb_protocol: Optional[str] = None,
            listener_forward: Optional[str] = None,
            load_balancer_id: Optional[str] = None,
            master_slave_server_group_id: Optional[str] = None,
            persistence_timeout: Optional[int] = None,
            protocol: Optional[str] = None,
            proxy_protocol_v2_enabled: Optional[bool] = None,
            request_timeout: Optional[int] = None,
            scheduler: Optional[str] = None,
            server_certificate_id: Optional[str] = None,
            server_group_id: Optional[str] = None,
            ssl_certificate_id: Optional[str] = None,
            sticky_session: Optional[str] = None,
            sticky_session_type: Optional[str] = None,
            tls_cipher_policy: Optional[str] = None,
            unhealthy_threshold: Optional[int] = None,
            x_forwarded_for: Optional[ListenerXForwardedForArgs] = 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:
    AclId string
    The ID of the network ACL that is associated with the listener. NOTE: If acl_status is set to on, acl_id is required. Otherwise, it will be ignored.
    AclStatus string
    Specifies whether to enable access control. Default value: off. Valid values: on, off.
    AclType string
    The type of the network ACL. Valid values: black, white. NOTE: If acl_status is set to on, acl_type is required. Otherwise, it will be ignored.
    BackendPort int
    The backend port that is used by the CLB instance. Valid values: 1 to 65535. NOTE: If server_group_id is not set, backend_port is required.
    Bandwidth int
    The maximum bandwidth of the listener. Unit: Mbit/s. Valid values:

    • -1: If you set bandwidth to -1, the bandwidth of the listener is unlimited.
    CaCertificateId string
    The ID of the certification authority (CA) certificate.
    Cookie string
    The cookie that is configured on the server. The cookie must be 1 to 200 characters in length and can contain only ASCII characters and digits. It cannot contain commas (,), semicolons (;), or space characters. It cannot start with a dollar sign ($). NOTE: If sticky_session is set to on, and sticky_session_type is set to server, cookie is required. Otherwise, it will be ignored.
    CookieTimeout int
    The timeout period of a cookie. Unit: seconds. Valid values: 1 to 86400. NOTE: If sticky_session is set to on, and sticky_session_type is set to insert, cookie_timeout is required. Otherwise, it will be ignored.
    DeleteProtectionValidation bool
    Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default value: false.
    Description string
    The name of the listener. The name must be 1 to 256 characters in length, and can contain letters, digits, hyphens (-), forward slashes (/), periods (.), and underscores (_).
    EnableHttp2 string
    Specifies whether to enable HTTP/2. Default value: on. Valid values: on, off.
    EstablishedTimeout int
    The timeout period of a connection. Unit: seconds. Default value: 900. Valid values: 10 to 900.
    ForwardPort int
    The listening port that is used to redirect HTTP requests to HTTPS.
    FrontendPort int
    The frontend port that is used by the CLB instance. Valid values: 1 to 65535.
    Gzip bool
    Specifies whether to enable GZIP compression to compress specific types of files. Default value: true. Valid values: true, false.
    HealthCheck string
    Specifies whether to enable the health check feature. Default value: on. Valid values: on, off. NOTE: TCP and UDP listener's HealthCheck is always on, so it will be ignored when launching TCP or UDP listener.
    HealthCheckConnectPort int
    The backend port that is used for health checks. Valid values: 0 to 65535. NOTE: health_check_connect_port takes effect only if health_check is set to on.
    HealthCheckDomain string
    The domain name that is used for health checks. NOTE: health_check_domain takes effect only if health_check is set to on.
    HealthCheckHttpCode string
    The HTTP status code for a successful health check. Separate multiple HTTP status codes with commas (,). Default value: http_2xx. Valid values: http_2xx, http_3xx, http_4xx and http_5xx. NOTE: health_check_http_code takes effect only if health_check is set to on.
    HealthCheckInterval int
    The interval between two consecutive health checks. Unit: seconds. Default value: 2. Valid values: 1 to 50. NOTE: health_check_interval takes effect only if health_check is set to on.
    HealthCheckMethod string
    The health check method used in HTTP health checks. Valid values: head, get. NOTE: health_check_method takes effect only if health_check is set to on.
    HealthCheckTimeout int
    The timeout period of a health check response. Unit: seconds. Default value: 5. Valid values: 1 to 300. NOTE: If health_check_timeout < health_check_interval, health_check_timeout will be replaced by health_check_interval. health_check_timeout takes effect only if health_check is set to on.
    HealthCheckType string
    The type of health checks. Default value: tcp. Valid values: tcp, http.
    HealthCheckUri string
    The URI that is used for health checks. The health_check_uri must be 1 to 80 characters in length, and can contain letters, digits, hyphens (-), forward slashes (/), periods (.), percent signs (%), question marks (?), number signs (#), and ampersands (&). The URI must start with a forward slash (/) but cannot be a single forward slash (/). NOTE: health_check_uri takes effect only if health_check is set to on.
    HealthyThreshold int
    The number of times that an unhealthy backend server must consecutively pass health checks before it is declared healthy. Default value: 3. Valid values: 2 to 10. NOTE: healthy_threshold takes effect only if health_check is set to on.
    IdleTimeout int
    The timeout period of an idle connection. Unit: seconds. Default value: 15. Valid values: 1 to 60.
    LbPort int

    Deprecated: Field 'lb_port' has been removed since 1.211.0.

    LbProtocol string

    Deprecated: Field 'lb_protocol' has been removed since 1.211.0.

    ListenerForward string
    Specifies whether to enable HTTP-to-HTTPS redirection. Default value: off. Valid values: on, off.
    LoadBalancerId string
    The Load Balancer ID which is used to launch a new listener.
    MasterSlaveServerGroupId string
    The ID of the primary/secondary server group. NOTE: You cannot set both server_group_id and master_slave_server_group_id.
    PersistenceTimeout int
    The timeout period of session persistence. Unit: seconds. Default value: 0. Valid values: 0 to 3600.
    Protocol string
    The protocol to listen on. Valid values: http.
    ProxyProtocolV2Enabled bool
    Specifies whether to use the Proxy protocol to pass client IP addresses to backend servers. Default value: false. Valid values: true, false.
    RequestTimeout int
    The timeout period of a request. Unit: seconds. Default value: 60. Valid values: 1 to 180.
    Scheduler string
    The scheduling algorithm. Default value: wrr. Valid values:
    ServerCertificateId string
    The ID of the server certificate. NOTE: server_certificate_id is also required when the value of the ssl_certificate_id is Empty.
    ServerGroupId string
    The ID of the vServer group. It's the ID of resource alicloud.slb.ServerGroup.
    SslCertificateId string
    The ID of the server certificate. NOTE: Field ssl_certificate_id has been deprecated from provider version 1.59.0. New field server_certificate_id instead.

    Deprecated: Field 'ssl_certificate_id' has been deprecated from 1.59.0 and using 'server_certificate_id' instead.

    StickySession string
    Specifies whether to enable session persistence. Default value: off. Valid values: on, off.
    StickySessionType string
    The method that is used to handle a cookie. Valid values: insert, server. NOTE: If sticky_session is set to on, sticky_session_type is required. Otherwise, it will be ignored.
    TlsCipherPolicy string
    The Transport Layer Security (TLS) security policy. Default value: tls_cipher_policy_1_0. Valid values: tls_cipher_policy_1_0, tls_cipher_policy_1_1, tls_cipher_policy_1_2, tls_cipher_policy_1_2_strict.
    UnhealthyThreshold int
    The number of times that a healthy backend server must consecutively fail health checks before it is declared unhealthy. Default value: 3. Valid values: 2 to 10. NOTE: unhealthy_threshold takes effect only if health_check is set to on.
    XForwardedFor Pulumi.AliCloud.Slb.Inputs.ListenerXForwardedFor
    Whether to set additional HTTP Header field "X-Forwarded-For". See x_forwarded_for below.
    AclId string
    The ID of the network ACL that is associated with the listener. NOTE: If acl_status is set to on, acl_id is required. Otherwise, it will be ignored.
    AclStatus string
    Specifies whether to enable access control. Default value: off. Valid values: on, off.
    AclType string
    The type of the network ACL. Valid values: black, white. NOTE: If acl_status is set to on, acl_type is required. Otherwise, it will be ignored.
    BackendPort int
    The backend port that is used by the CLB instance. Valid values: 1 to 65535. NOTE: If server_group_id is not set, backend_port is required.
    Bandwidth int
    The maximum bandwidth of the listener. Unit: Mbit/s. Valid values:

    • -1: If you set bandwidth to -1, the bandwidth of the listener is unlimited.
    CaCertificateId string
    The ID of the certification authority (CA) certificate.
    Cookie string
    The cookie that is configured on the server. The cookie must be 1 to 200 characters in length and can contain only ASCII characters and digits. It cannot contain commas (,), semicolons (;), or space characters. It cannot start with a dollar sign ($). NOTE: If sticky_session is set to on, and sticky_session_type is set to server, cookie is required. Otherwise, it will be ignored.
    CookieTimeout int
    The timeout period of a cookie. Unit: seconds. Valid values: 1 to 86400. NOTE: If sticky_session is set to on, and sticky_session_type is set to insert, cookie_timeout is required. Otherwise, it will be ignored.
    DeleteProtectionValidation bool
    Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default value: false.
    Description string
    The name of the listener. The name must be 1 to 256 characters in length, and can contain letters, digits, hyphens (-), forward slashes (/), periods (.), and underscores (_).
    EnableHttp2 string
    Specifies whether to enable HTTP/2. Default value: on. Valid values: on, off.
    EstablishedTimeout int
    The timeout period of a connection. Unit: seconds. Default value: 900. Valid values: 10 to 900.
    ForwardPort int
    The listening port that is used to redirect HTTP requests to HTTPS.
    FrontendPort int
    The frontend port that is used by the CLB instance. Valid values: 1 to 65535.
    Gzip bool
    Specifies whether to enable GZIP compression to compress specific types of files. Default value: true. Valid values: true, false.
    HealthCheck string
    Specifies whether to enable the health check feature. Default value: on. Valid values: on, off. NOTE: TCP and UDP listener's HealthCheck is always on, so it will be ignored when launching TCP or UDP listener.
    HealthCheckConnectPort int
    The backend port that is used for health checks. Valid values: 0 to 65535. NOTE: health_check_connect_port takes effect only if health_check is set to on.
    HealthCheckDomain string
    The domain name that is used for health checks. NOTE: health_check_domain takes effect only if health_check is set to on.
    HealthCheckHttpCode string
    The HTTP status code for a successful health check. Separate multiple HTTP status codes with commas (,). Default value: http_2xx. Valid values: http_2xx, http_3xx, http_4xx and http_5xx. NOTE: health_check_http_code takes effect only if health_check is set to on.
    HealthCheckInterval int
    The interval between two consecutive health checks. Unit: seconds. Default value: 2. Valid values: 1 to 50. NOTE: health_check_interval takes effect only if health_check is set to on.
    HealthCheckMethod string
    The health check method used in HTTP health checks. Valid values: head, get. NOTE: health_check_method takes effect only if health_check is set to on.
    HealthCheckTimeout int
    The timeout period of a health check response. Unit: seconds. Default value: 5. Valid values: 1 to 300. NOTE: If health_check_timeout < health_check_interval, health_check_timeout will be replaced by health_check_interval. health_check_timeout takes effect only if health_check is set to on.
    HealthCheckType string
    The type of health checks. Default value: tcp. Valid values: tcp, http.
    HealthCheckUri string
    The URI that is used for health checks. The health_check_uri must be 1 to 80 characters in length, and can contain letters, digits, hyphens (-), forward slashes (/), periods (.), percent signs (%), question marks (?), number signs (#), and ampersands (&). The URI must start with a forward slash (/) but cannot be a single forward slash (/). NOTE: health_check_uri takes effect only if health_check is set to on.
    HealthyThreshold int
    The number of times that an unhealthy backend server must consecutively pass health checks before it is declared healthy. Default value: 3. Valid values: 2 to 10. NOTE: healthy_threshold takes effect only if health_check is set to on.
    IdleTimeout int
    The timeout period of an idle connection. Unit: seconds. Default value: 15. Valid values: 1 to 60.
    LbPort int

    Deprecated: Field 'lb_port' has been removed since 1.211.0.

    LbProtocol string

    Deprecated: Field 'lb_protocol' has been removed since 1.211.0.

    ListenerForward string
    Specifies whether to enable HTTP-to-HTTPS redirection. Default value: off. Valid values: on, off.
    LoadBalancerId string
    The Load Balancer ID which is used to launch a new listener.
    MasterSlaveServerGroupId string
    The ID of the primary/secondary server group. NOTE: You cannot set both server_group_id and master_slave_server_group_id.
    PersistenceTimeout int
    The timeout period of session persistence. Unit: seconds. Default value: 0. Valid values: 0 to 3600.
    Protocol string
    The protocol to listen on. Valid values: http.
    ProxyProtocolV2Enabled bool
    Specifies whether to use the Proxy protocol to pass client IP addresses to backend servers. Default value: false. Valid values: true, false.
    RequestTimeout int
    The timeout period of a request. Unit: seconds. Default value: 60. Valid values: 1 to 180.
    Scheduler string
    The scheduling algorithm. Default value: wrr. Valid values:
    ServerCertificateId string
    The ID of the server certificate. NOTE: server_certificate_id is also required when the value of the ssl_certificate_id is Empty.
    ServerGroupId string
    The ID of the vServer group. It's the ID of resource alicloud.slb.ServerGroup.
    SslCertificateId string
    The ID of the server certificate. NOTE: Field ssl_certificate_id has been deprecated from provider version 1.59.0. New field server_certificate_id instead.

    Deprecated: Field 'ssl_certificate_id' has been deprecated from 1.59.0 and using 'server_certificate_id' instead.

    StickySession string
    Specifies whether to enable session persistence. Default value: off. Valid values: on, off.
    StickySessionType string
    The method that is used to handle a cookie. Valid values: insert, server. NOTE: If sticky_session is set to on, sticky_session_type is required. Otherwise, it will be ignored.
    TlsCipherPolicy string
    The Transport Layer Security (TLS) security policy. Default value: tls_cipher_policy_1_0. Valid values: tls_cipher_policy_1_0, tls_cipher_policy_1_1, tls_cipher_policy_1_2, tls_cipher_policy_1_2_strict.
    UnhealthyThreshold int
    The number of times that a healthy backend server must consecutively fail health checks before it is declared unhealthy. Default value: 3. Valid values: 2 to 10. NOTE: unhealthy_threshold takes effect only if health_check is set to on.
    XForwardedFor ListenerXForwardedForArgs
    Whether to set additional HTTP Header field "X-Forwarded-For". See x_forwarded_for below.
    aclId String
    The ID of the network ACL that is associated with the listener. NOTE: If acl_status is set to on, acl_id is required. Otherwise, it will be ignored.
    aclStatus String
    Specifies whether to enable access control. Default value: off. Valid values: on, off.
    aclType String
    The type of the network ACL. Valid values: black, white. NOTE: If acl_status is set to on, acl_type is required. Otherwise, it will be ignored.
    backendPort Integer
    The backend port that is used by the CLB instance. Valid values: 1 to 65535. NOTE: If server_group_id is not set, backend_port is required.
    bandwidth Integer
    The maximum bandwidth of the listener. Unit: Mbit/s. Valid values:

    • -1: If you set bandwidth to -1, the bandwidth of the listener is unlimited.
    caCertificateId String
    The ID of the certification authority (CA) certificate.
    cookie String
    The cookie that is configured on the server. The cookie must be 1 to 200 characters in length and can contain only ASCII characters and digits. It cannot contain commas (,), semicolons (;), or space characters. It cannot start with a dollar sign ($). NOTE: If sticky_session is set to on, and sticky_session_type is set to server, cookie is required. Otherwise, it will be ignored.
    cookieTimeout Integer
    The timeout period of a cookie. Unit: seconds. Valid values: 1 to 86400. NOTE: If sticky_session is set to on, and sticky_session_type is set to insert, cookie_timeout is required. Otherwise, it will be ignored.
    deleteProtectionValidation Boolean
    Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default value: false.
    description String
    The name of the listener. The name must be 1 to 256 characters in length, and can contain letters, digits, hyphens (-), forward slashes (/), periods (.), and underscores (_).
    enableHttp2 String
    Specifies whether to enable HTTP/2. Default value: on. Valid values: on, off.
    establishedTimeout Integer
    The timeout period of a connection. Unit: seconds. Default value: 900. Valid values: 10 to 900.
    forwardPort Integer
    The listening port that is used to redirect HTTP requests to HTTPS.
    frontendPort Integer
    The frontend port that is used by the CLB instance. Valid values: 1 to 65535.
    gzip Boolean
    Specifies whether to enable GZIP compression to compress specific types of files. Default value: true. Valid values: true, false.
    healthCheck String
    Specifies whether to enable the health check feature. Default value: on. Valid values: on, off. NOTE: TCP and UDP listener's HealthCheck is always on, so it will be ignored when launching TCP or UDP listener.
    healthCheckConnectPort Integer
    The backend port that is used for health checks. Valid values: 0 to 65535. NOTE: health_check_connect_port takes effect only if health_check is set to on.
    healthCheckDomain String
    The domain name that is used for health checks. NOTE: health_check_domain takes effect only if health_check is set to on.
    healthCheckHttpCode String
    The HTTP status code for a successful health check. Separate multiple HTTP status codes with commas (,). Default value: http_2xx. Valid values: http_2xx, http_3xx, http_4xx and http_5xx. NOTE: health_check_http_code takes effect only if health_check is set to on.
    healthCheckInterval Integer
    The interval between two consecutive health checks. Unit: seconds. Default value: 2. Valid values: 1 to 50. NOTE: health_check_interval takes effect only if health_check is set to on.
    healthCheckMethod String
    The health check method used in HTTP health checks. Valid values: head, get. NOTE: health_check_method takes effect only if health_check is set to on.
    healthCheckTimeout Integer
    The timeout period of a health check response. Unit: seconds. Default value: 5. Valid values: 1 to 300. NOTE: If health_check_timeout < health_check_interval, health_check_timeout will be replaced by health_check_interval. health_check_timeout takes effect only if health_check is set to on.
    healthCheckType String
    The type of health checks. Default value: tcp. Valid values: tcp, http.
    healthCheckUri String
    The URI that is used for health checks. The health_check_uri must be 1 to 80 characters in length, and can contain letters, digits, hyphens (-), forward slashes (/), periods (.), percent signs (%), question marks (?), number signs (#), and ampersands (&). The URI must start with a forward slash (/) but cannot be a single forward slash (/). NOTE: health_check_uri takes effect only if health_check is set to on.
    healthyThreshold Integer
    The number of times that an unhealthy backend server must consecutively pass health checks before it is declared healthy. Default value: 3. Valid values: 2 to 10. NOTE: healthy_threshold takes effect only if health_check is set to on.
    idleTimeout Integer
    The timeout period of an idle connection. Unit: seconds. Default value: 15. Valid values: 1 to 60.
    lbPort Integer

    Deprecated: Field 'lb_port' has been removed since 1.211.0.

    lbProtocol String

    Deprecated: Field 'lb_protocol' has been removed since 1.211.0.

    listenerForward String
    Specifies whether to enable HTTP-to-HTTPS redirection. Default value: off. Valid values: on, off.
    loadBalancerId String
    The Load Balancer ID which is used to launch a new listener.
    masterSlaveServerGroupId String
    The ID of the primary/secondary server group. NOTE: You cannot set both server_group_id and master_slave_server_group_id.
    persistenceTimeout Integer
    The timeout period of session persistence. Unit: seconds. Default value: 0. Valid values: 0 to 3600.
    protocol String
    The protocol to listen on. Valid values: http.
    proxyProtocolV2Enabled Boolean
    Specifies whether to use the Proxy protocol to pass client IP addresses to backend servers. Default value: false. Valid values: true, false.
    requestTimeout Integer
    The timeout period of a request. Unit: seconds. Default value: 60. Valid values: 1 to 180.
    scheduler String
    The scheduling algorithm. Default value: wrr. Valid values:
    serverCertificateId String
    The ID of the server certificate. NOTE: server_certificate_id is also required when the value of the ssl_certificate_id is Empty.
    serverGroupId String
    The ID of the vServer group. It's the ID of resource alicloud.slb.ServerGroup.
    sslCertificateId String
    The ID of the server certificate. NOTE: Field ssl_certificate_id has been deprecated from provider version 1.59.0. New field server_certificate_id instead.

    Deprecated: Field 'ssl_certificate_id' has been deprecated from 1.59.0 and using 'server_certificate_id' instead.

    stickySession String
    Specifies whether to enable session persistence. Default value: off. Valid values: on, off.
    stickySessionType String
    The method that is used to handle a cookie. Valid values: insert, server. NOTE: If sticky_session is set to on, sticky_session_type is required. Otherwise, it will be ignored.
    tlsCipherPolicy String
    The Transport Layer Security (TLS) security policy. Default value: tls_cipher_policy_1_0. Valid values: tls_cipher_policy_1_0, tls_cipher_policy_1_1, tls_cipher_policy_1_2, tls_cipher_policy_1_2_strict.
    unhealthyThreshold Integer
    The number of times that a healthy backend server must consecutively fail health checks before it is declared unhealthy. Default value: 3. Valid values: 2 to 10. NOTE: unhealthy_threshold takes effect only if health_check is set to on.
    xForwardedFor ListenerXForwardedFor
    Whether to set additional HTTP Header field "X-Forwarded-For". See x_forwarded_for below.
    aclId string
    The ID of the network ACL that is associated with the listener. NOTE: If acl_status is set to on, acl_id is required. Otherwise, it will be ignored.
    aclStatus string
    Specifies whether to enable access control. Default value: off. Valid values: on, off.
    aclType string
    The type of the network ACL. Valid values: black, white. NOTE: If acl_status is set to on, acl_type is required. Otherwise, it will be ignored.
    backendPort number
    The backend port that is used by the CLB instance. Valid values: 1 to 65535. NOTE: If server_group_id is not set, backend_port is required.
    bandwidth number
    The maximum bandwidth of the listener. Unit: Mbit/s. Valid values:

    • -1: If you set bandwidth to -1, the bandwidth of the listener is unlimited.
    caCertificateId string
    The ID of the certification authority (CA) certificate.
    cookie string
    The cookie that is configured on the server. The cookie must be 1 to 200 characters in length and can contain only ASCII characters and digits. It cannot contain commas (,), semicolons (;), or space characters. It cannot start with a dollar sign ($). NOTE: If sticky_session is set to on, and sticky_session_type is set to server, cookie is required. Otherwise, it will be ignored.
    cookieTimeout number
    The timeout period of a cookie. Unit: seconds. Valid values: 1 to 86400. NOTE: If sticky_session is set to on, and sticky_session_type is set to insert, cookie_timeout is required. Otherwise, it will be ignored.
    deleteProtectionValidation boolean
    Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default value: false.
    description string
    The name of the listener. The name must be 1 to 256 characters in length, and can contain letters, digits, hyphens (-), forward slashes (/), periods (.), and underscores (_).
    enableHttp2 string
    Specifies whether to enable HTTP/2. Default value: on. Valid values: on, off.
    establishedTimeout number
    The timeout period of a connection. Unit: seconds. Default value: 900. Valid values: 10 to 900.
    forwardPort number
    The listening port that is used to redirect HTTP requests to HTTPS.
    frontendPort number
    The frontend port that is used by the CLB instance. Valid values: 1 to 65535.
    gzip boolean
    Specifies whether to enable GZIP compression to compress specific types of files. Default value: true. Valid values: true, false.
    healthCheck string
    Specifies whether to enable the health check feature. Default value: on. Valid values: on, off. NOTE: TCP and UDP listener's HealthCheck is always on, so it will be ignored when launching TCP or UDP listener.
    healthCheckConnectPort number
    The backend port that is used for health checks. Valid values: 0 to 65535. NOTE: health_check_connect_port takes effect only if health_check is set to on.
    healthCheckDomain string
    The domain name that is used for health checks. NOTE: health_check_domain takes effect only if health_check is set to on.
    healthCheckHttpCode string
    The HTTP status code for a successful health check. Separate multiple HTTP status codes with commas (,). Default value: http_2xx. Valid values: http_2xx, http_3xx, http_4xx and http_5xx. NOTE: health_check_http_code takes effect only if health_check is set to on.
    healthCheckInterval number
    The interval between two consecutive health checks. Unit: seconds. Default value: 2. Valid values: 1 to 50. NOTE: health_check_interval takes effect only if health_check is set to on.
    healthCheckMethod string
    The health check method used in HTTP health checks. Valid values: head, get. NOTE: health_check_method takes effect only if health_check is set to on.
    healthCheckTimeout number
    The timeout period of a health check response. Unit: seconds. Default value: 5. Valid values: 1 to 300. NOTE: If health_check_timeout < health_check_interval, health_check_timeout will be replaced by health_check_interval. health_check_timeout takes effect only if health_check is set to on.
    healthCheckType string
    The type of health checks. Default value: tcp. Valid values: tcp, http.
    healthCheckUri string
    The URI that is used for health checks. The health_check_uri must be 1 to 80 characters in length, and can contain letters, digits, hyphens (-), forward slashes (/), periods (.), percent signs (%), question marks (?), number signs (#), and ampersands (&). The URI must start with a forward slash (/) but cannot be a single forward slash (/). NOTE: health_check_uri takes effect only if health_check is set to on.
    healthyThreshold number
    The number of times that an unhealthy backend server must consecutively pass health checks before it is declared healthy. Default value: 3. Valid values: 2 to 10. NOTE: healthy_threshold takes effect only if health_check is set to on.
    idleTimeout number
    The timeout period of an idle connection. Unit: seconds. Default value: 15. Valid values: 1 to 60.
    lbPort number

    Deprecated: Field 'lb_port' has been removed since 1.211.0.

    lbProtocol string

    Deprecated: Field 'lb_protocol' has been removed since 1.211.0.

    listenerForward string
    Specifies whether to enable HTTP-to-HTTPS redirection. Default value: off. Valid values: on, off.
    loadBalancerId string
    The Load Balancer ID which is used to launch a new listener.
    masterSlaveServerGroupId string
    The ID of the primary/secondary server group. NOTE: You cannot set both server_group_id and master_slave_server_group_id.
    persistenceTimeout number
    The timeout period of session persistence. Unit: seconds. Default value: 0. Valid values: 0 to 3600.
    protocol string
    The protocol to listen on. Valid values: http.
    proxyProtocolV2Enabled boolean
    Specifies whether to use the Proxy protocol to pass client IP addresses to backend servers. Default value: false. Valid values: true, false.
    requestTimeout number
    The timeout period of a request. Unit: seconds. Default value: 60. Valid values: 1 to 180.
    scheduler string
    The scheduling algorithm. Default value: wrr. Valid values:
    serverCertificateId string
    The ID of the server certificate. NOTE: server_certificate_id is also required when the value of the ssl_certificate_id is Empty.
    serverGroupId string
    The ID of the vServer group. It's the ID of resource alicloud.slb.ServerGroup.
    sslCertificateId string
    The ID of the server certificate. NOTE: Field ssl_certificate_id has been deprecated from provider version 1.59.0. New field server_certificate_id instead.

    Deprecated: Field 'ssl_certificate_id' has been deprecated from 1.59.0 and using 'server_certificate_id' instead.

    stickySession string
    Specifies whether to enable session persistence. Default value: off. Valid values: on, off.
    stickySessionType string
    The method that is used to handle a cookie. Valid values: insert, server. NOTE: If sticky_session is set to on, sticky_session_type is required. Otherwise, it will be ignored.
    tlsCipherPolicy string
    The Transport Layer Security (TLS) security policy. Default value: tls_cipher_policy_1_0. Valid values: tls_cipher_policy_1_0, tls_cipher_policy_1_1, tls_cipher_policy_1_2, tls_cipher_policy_1_2_strict.
    unhealthyThreshold number
    The number of times that a healthy backend server must consecutively fail health checks before it is declared unhealthy. Default value: 3. Valid values: 2 to 10. NOTE: unhealthy_threshold takes effect only if health_check is set to on.
    xForwardedFor ListenerXForwardedFor
    Whether to set additional HTTP Header field "X-Forwarded-For". See x_forwarded_for below.
    acl_id str
    The ID of the network ACL that is associated with the listener. NOTE: If acl_status is set to on, acl_id is required. Otherwise, it will be ignored.
    acl_status str
    Specifies whether to enable access control. Default value: off. Valid values: on, off.
    acl_type str
    The type of the network ACL. Valid values: black, white. NOTE: If acl_status is set to on, acl_type is required. Otherwise, it will be ignored.
    backend_port int
    The backend port that is used by the CLB instance. Valid values: 1 to 65535. NOTE: If server_group_id is not set, backend_port is required.
    bandwidth int
    The maximum bandwidth of the listener. Unit: Mbit/s. Valid values:

    • -1: If you set bandwidth to -1, the bandwidth of the listener is unlimited.
    ca_certificate_id str
    The ID of the certification authority (CA) certificate.
    cookie str
    The cookie that is configured on the server. The cookie must be 1 to 200 characters in length and can contain only ASCII characters and digits. It cannot contain commas (,), semicolons (;), or space characters. It cannot start with a dollar sign ($). NOTE: If sticky_session is set to on, and sticky_session_type is set to server, cookie is required. Otherwise, it will be ignored.
    cookie_timeout int
    The timeout period of a cookie. Unit: seconds. Valid values: 1 to 86400. NOTE: If sticky_session is set to on, and sticky_session_type is set to insert, cookie_timeout is required. Otherwise, it will be ignored.
    delete_protection_validation bool
    Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default value: false.
    description str
    The name of the listener. The name must be 1 to 256 characters in length, and can contain letters, digits, hyphens (-), forward slashes (/), periods (.), and underscores (_).
    enable_http2 str
    Specifies whether to enable HTTP/2. Default value: on. Valid values: on, off.
    established_timeout int
    The timeout period of a connection. Unit: seconds. Default value: 900. Valid values: 10 to 900.
    forward_port int
    The listening port that is used to redirect HTTP requests to HTTPS.
    frontend_port int
    The frontend port that is used by the CLB instance. Valid values: 1 to 65535.
    gzip bool
    Specifies whether to enable GZIP compression to compress specific types of files. Default value: true. Valid values: true, false.
    health_check str
    Specifies whether to enable the health check feature. Default value: on. Valid values: on, off. NOTE: TCP and UDP listener's HealthCheck is always on, so it will be ignored when launching TCP or UDP listener.
    health_check_connect_port int
    The backend port that is used for health checks. Valid values: 0 to 65535. NOTE: health_check_connect_port takes effect only if health_check is set to on.
    health_check_domain str
    The domain name that is used for health checks. NOTE: health_check_domain takes effect only if health_check is set to on.
    health_check_http_code str
    The HTTP status code for a successful health check. Separate multiple HTTP status codes with commas (,). Default value: http_2xx. Valid values: http_2xx, http_3xx, http_4xx and http_5xx. NOTE: health_check_http_code takes effect only if health_check is set to on.
    health_check_interval int
    The interval between two consecutive health checks. Unit: seconds. Default value: 2. Valid values: 1 to 50. NOTE: health_check_interval takes effect only if health_check is set to on.
    health_check_method str
    The health check method used in HTTP health checks. Valid values: head, get. NOTE: health_check_method takes effect only if health_check is set to on.
    health_check_timeout int
    The timeout period of a health check response. Unit: seconds. Default value: 5. Valid values: 1 to 300. NOTE: If health_check_timeout < health_check_interval, health_check_timeout will be replaced by health_check_interval. health_check_timeout takes effect only if health_check is set to on.
    health_check_type str
    The type of health checks. Default value: tcp. Valid values: tcp, http.
    health_check_uri str
    The URI that is used for health checks. The health_check_uri must be 1 to 80 characters in length, and can contain letters, digits, hyphens (-), forward slashes (/), periods (.), percent signs (%), question marks (?), number signs (#), and ampersands (&). The URI must start with a forward slash (/) but cannot be a single forward slash (/). NOTE: health_check_uri takes effect only if health_check is set to on.
    healthy_threshold int
    The number of times that an unhealthy backend server must consecutively pass health checks before it is declared healthy. Default value: 3. Valid values: 2 to 10. NOTE: healthy_threshold takes effect only if health_check is set to on.
    idle_timeout int
    The timeout period of an idle connection. Unit: seconds. Default value: 15. Valid values: 1 to 60.
    lb_port int

    Deprecated: Field 'lb_port' has been removed since 1.211.0.

    lb_protocol str

    Deprecated: Field 'lb_protocol' has been removed since 1.211.0.

    listener_forward str
    Specifies whether to enable HTTP-to-HTTPS redirection. Default value: off. Valid values: on, off.
    load_balancer_id str
    The Load Balancer ID which is used to launch a new listener.
    master_slave_server_group_id str
    The ID of the primary/secondary server group. NOTE: You cannot set both server_group_id and master_slave_server_group_id.
    persistence_timeout int
    The timeout period of session persistence. Unit: seconds. Default value: 0. Valid values: 0 to 3600.
    protocol str
    The protocol to listen on. Valid values: http.
    proxy_protocol_v2_enabled bool
    Specifies whether to use the Proxy protocol to pass client IP addresses to backend servers. Default value: false. Valid values: true, false.
    request_timeout int
    The timeout period of a request. Unit: seconds. Default value: 60. Valid values: 1 to 180.
    scheduler str
    The scheduling algorithm. Default value: wrr. Valid values:
    server_certificate_id str
    The ID of the server certificate. NOTE: server_certificate_id is also required when the value of the ssl_certificate_id is Empty.
    server_group_id str
    The ID of the vServer group. It's the ID of resource alicloud.slb.ServerGroup.
    ssl_certificate_id str
    The ID of the server certificate. NOTE: Field ssl_certificate_id has been deprecated from provider version 1.59.0. New field server_certificate_id instead.

    Deprecated: Field 'ssl_certificate_id' has been deprecated from 1.59.0 and using 'server_certificate_id' instead.

    sticky_session str
    Specifies whether to enable session persistence. Default value: off. Valid values: on, off.
    sticky_session_type str
    The method that is used to handle a cookie. Valid values: insert, server. NOTE: If sticky_session is set to on, sticky_session_type is required. Otherwise, it will be ignored.
    tls_cipher_policy str
    The Transport Layer Security (TLS) security policy. Default value: tls_cipher_policy_1_0. Valid values: tls_cipher_policy_1_0, tls_cipher_policy_1_1, tls_cipher_policy_1_2, tls_cipher_policy_1_2_strict.
    unhealthy_threshold int
    The number of times that a healthy backend server must consecutively fail health checks before it is declared unhealthy. Default value: 3. Valid values: 2 to 10. NOTE: unhealthy_threshold takes effect only if health_check is set to on.
    x_forwarded_for ListenerXForwardedForArgs
    Whether to set additional HTTP Header field "X-Forwarded-For". See x_forwarded_for below.
    aclId String
    The ID of the network ACL that is associated with the listener. NOTE: If acl_status is set to on, acl_id is required. Otherwise, it will be ignored.
    aclStatus String
    Specifies whether to enable access control. Default value: off. Valid values: on, off.
    aclType String
    The type of the network ACL. Valid values: black, white. NOTE: If acl_status is set to on, acl_type is required. Otherwise, it will be ignored.
    backendPort Number
    The backend port that is used by the CLB instance. Valid values: 1 to 65535. NOTE: If server_group_id is not set, backend_port is required.
    bandwidth Number
    The maximum bandwidth of the listener. Unit: Mbit/s. Valid values:

    • -1: If you set bandwidth to -1, the bandwidth of the listener is unlimited.
    caCertificateId String
    The ID of the certification authority (CA) certificate.
    cookie String
    The cookie that is configured on the server. The cookie must be 1 to 200 characters in length and can contain only ASCII characters and digits. It cannot contain commas (,), semicolons (;), or space characters. It cannot start with a dollar sign ($). NOTE: If sticky_session is set to on, and sticky_session_type is set to server, cookie is required. Otherwise, it will be ignored.
    cookieTimeout Number
    The timeout period of a cookie. Unit: seconds. Valid values: 1 to 86400. NOTE: If sticky_session is set to on, and sticky_session_type is set to insert, cookie_timeout is required. Otherwise, it will be ignored.
    deleteProtectionValidation Boolean
    Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default value: false.
    description String
    The name of the listener. The name must be 1 to 256 characters in length, and can contain letters, digits, hyphens (-), forward slashes (/), periods (.), and underscores (_).
    enableHttp2 String
    Specifies whether to enable HTTP/2. Default value: on. Valid values: on, off.
    establishedTimeout Number
    The timeout period of a connection. Unit: seconds. Default value: 900. Valid values: 10 to 900.
    forwardPort Number
    The listening port that is used to redirect HTTP requests to HTTPS.
    frontendPort Number
    The frontend port that is used by the CLB instance. Valid values: 1 to 65535.
    gzip Boolean
    Specifies whether to enable GZIP compression to compress specific types of files. Default value: true. Valid values: true, false.
    healthCheck String
    Specifies whether to enable the health check feature. Default value: on. Valid values: on, off. NOTE: TCP and UDP listener's HealthCheck is always on, so it will be ignored when launching TCP or UDP listener.
    healthCheckConnectPort Number
    The backend port that is used for health checks. Valid values: 0 to 65535. NOTE: health_check_connect_port takes effect only if health_check is set to on.
    healthCheckDomain String
    The domain name that is used for health checks. NOTE: health_check_domain takes effect only if health_check is set to on.
    healthCheckHttpCode String
    The HTTP status code for a successful health check. Separate multiple HTTP status codes with commas (,). Default value: http_2xx. Valid values: http_2xx, http_3xx, http_4xx and http_5xx. NOTE: health_check_http_code takes effect only if health_check is set to on.
    healthCheckInterval Number
    The interval between two consecutive health checks. Unit: seconds. Default value: 2. Valid values: 1 to 50. NOTE: health_check_interval takes effect only if health_check is set to on.
    healthCheckMethod String
    The health check method used in HTTP health checks. Valid values: head, get. NOTE: health_check_method takes effect only if health_check is set to on.
    healthCheckTimeout Number
    The timeout period of a health check response. Unit: seconds. Default value: 5. Valid values: 1 to 300. NOTE: If health_check_timeout < health_check_interval, health_check_timeout will be replaced by health_check_interval. health_check_timeout takes effect only if health_check is set to on.
    healthCheckType String
    The type of health checks. Default value: tcp. Valid values: tcp, http.
    healthCheckUri String
    The URI that is used for health checks. The health_check_uri must be 1 to 80 characters in length, and can contain letters, digits, hyphens (-), forward slashes (/), periods (.), percent signs (%), question marks (?), number signs (#), and ampersands (&). The URI must start with a forward slash (/) but cannot be a single forward slash (/). NOTE: health_check_uri takes effect only if health_check is set to on.
    healthyThreshold Number
    The number of times that an unhealthy backend server must consecutively pass health checks before it is declared healthy. Default value: 3. Valid values: 2 to 10. NOTE: healthy_threshold takes effect only if health_check is set to on.
    idleTimeout Number
    The timeout period of an idle connection. Unit: seconds. Default value: 15. Valid values: 1 to 60.
    lbPort Number

    Deprecated: Field 'lb_port' has been removed since 1.211.0.

    lbProtocol String

    Deprecated: Field 'lb_protocol' has been removed since 1.211.0.

    listenerForward String
    Specifies whether to enable HTTP-to-HTTPS redirection. Default value: off. Valid values: on, off.
    loadBalancerId String
    The Load Balancer ID which is used to launch a new listener.
    masterSlaveServerGroupId String
    The ID of the primary/secondary server group. NOTE: You cannot set both server_group_id and master_slave_server_group_id.
    persistenceTimeout Number
    The timeout period of session persistence. Unit: seconds. Default value: 0. Valid values: 0 to 3600.
    protocol String
    The protocol to listen on. Valid values: http.
    proxyProtocolV2Enabled Boolean
    Specifies whether to use the Proxy protocol to pass client IP addresses to backend servers. Default value: false. Valid values: true, false.
    requestTimeout Number
    The timeout period of a request. Unit: seconds. Default value: 60. Valid values: 1 to 180.
    scheduler String
    The scheduling algorithm. Default value: wrr. Valid values:
    serverCertificateId String
    The ID of the server certificate. NOTE: server_certificate_id is also required when the value of the ssl_certificate_id is Empty.
    serverGroupId String
    The ID of the vServer group. It's the ID of resource alicloud.slb.ServerGroup.
    sslCertificateId String
    The ID of the server certificate. NOTE: Field ssl_certificate_id has been deprecated from provider version 1.59.0. New field server_certificate_id instead.

    Deprecated: Field 'ssl_certificate_id' has been deprecated from 1.59.0 and using 'server_certificate_id' instead.

    stickySession String
    Specifies whether to enable session persistence. Default value: off. Valid values: on, off.
    stickySessionType String
    The method that is used to handle a cookie. Valid values: insert, server. NOTE: If sticky_session is set to on, sticky_session_type is required. Otherwise, it will be ignored.
    tlsCipherPolicy String
    The Transport Layer Security (TLS) security policy. Default value: tls_cipher_policy_1_0. Valid values: tls_cipher_policy_1_0, tls_cipher_policy_1_1, tls_cipher_policy_1_2, tls_cipher_policy_1_2_strict.
    unhealthyThreshold Number
    The number of times that a healthy backend server must consecutively fail health checks before it is declared unhealthy. Default value: 3. Valid values: 2 to 10. NOTE: unhealthy_threshold takes effect only if health_check is set to on.
    xForwardedFor Property Map
    Whether to set additional HTTP Header field "X-Forwarded-For". See x_forwarded_for below.

    Supporting Types

    ListenerXForwardedFor, ListenerXForwardedForArgs

    RetriveClientIp bool
    Whether to retrieve the client ip.
    RetriveSlbId bool
    Indicates whether the SLB-ID header is used to retrieve the ID of the CLB instance. Default value: false. Valid values: true, false.
    RetriveSlbIp bool
    Indicates whether the SLB-IP header is used to retrieve the virtual IP address (VIP) requested by the client. Default value: false. Valid values: true, false.
    RetriveSlbProto bool
    Specifies whether to use the X-Forwarded-Proto header to retrieve the listener protocol. Default value: false. Valid values: true, false.
    RetriveClientIp bool
    Whether to retrieve the client ip.
    RetriveSlbId bool
    Indicates whether the SLB-ID header is used to retrieve the ID of the CLB instance. Default value: false. Valid values: true, false.
    RetriveSlbIp bool
    Indicates whether the SLB-IP header is used to retrieve the virtual IP address (VIP) requested by the client. Default value: false. Valid values: true, false.
    RetriveSlbProto bool
    Specifies whether to use the X-Forwarded-Proto header to retrieve the listener protocol. Default value: false. Valid values: true, false.
    retriveClientIp Boolean
    Whether to retrieve the client ip.
    retriveSlbId Boolean
    Indicates whether the SLB-ID header is used to retrieve the ID of the CLB instance. Default value: false. Valid values: true, false.
    retriveSlbIp Boolean
    Indicates whether the SLB-IP header is used to retrieve the virtual IP address (VIP) requested by the client. Default value: false. Valid values: true, false.
    retriveSlbProto Boolean
    Specifies whether to use the X-Forwarded-Proto header to retrieve the listener protocol. Default value: false. Valid values: true, false.
    retriveClientIp boolean
    Whether to retrieve the client ip.
    retriveSlbId boolean
    Indicates whether the SLB-ID header is used to retrieve the ID of the CLB instance. Default value: false. Valid values: true, false.
    retriveSlbIp boolean
    Indicates whether the SLB-IP header is used to retrieve the virtual IP address (VIP) requested by the client. Default value: false. Valid values: true, false.
    retriveSlbProto boolean
    Specifies whether to use the X-Forwarded-Proto header to retrieve the listener protocol. Default value: false. Valid values: true, false.
    retrive_client_ip bool
    Whether to retrieve the client ip.
    retrive_slb_id bool
    Indicates whether the SLB-ID header is used to retrieve the ID of the CLB instance. Default value: false. Valid values: true, false.
    retrive_slb_ip bool
    Indicates whether the SLB-IP header is used to retrieve the virtual IP address (VIP) requested by the client. Default value: false. Valid values: true, false.
    retrive_slb_proto bool
    Specifies whether to use the X-Forwarded-Proto header to retrieve the listener protocol. Default value: false. Valid values: true, false.
    retriveClientIp Boolean
    Whether to retrieve the client ip.
    retriveSlbId Boolean
    Indicates whether the SLB-ID header is used to retrieve the ID of the CLB instance. Default value: false. Valid values: true, false.
    retriveSlbIp Boolean
    Indicates whether the SLB-IP header is used to retrieve the virtual IP address (VIP) requested by the client. Default value: false. Valid values: true, false.
    retriveSlbProto Boolean
    Specifies whether to use the X-Forwarded-Proto header to retrieve the listener protocol. Default value: false. Valid values: true, false.

    Import

    Classic Load Balancer (SLB) Load Balancer Listener can be imported using the id, e.g.

    $ pulumi import alicloud:slb/listener:Listener example <load_balancer_id>:<protocol>:<frontend_port>
    
    $ pulumi import alicloud:slb/listener:Listener example <load_balancer_id>:<frontend_port>
    

    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.53.0 published on Wednesday, Apr 17, 2024 by Pulumi