1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. slb
  5. Listener
Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi

alicloud.slb.Listener

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 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.index.Integer("default", {
        min: 10000,
        max: 99999,
    });
    const listener = new alicloud.slb.ApplicationLoadBalancer("listener", {
        loadBalancerName: `${name}-${_default.result}`,
        internetChargeType: "PayByTraffic",
        addressType: "internet",
        instanceChargeType: "PayByCLCU",
    });
    const listenerAcl = new alicloud.slb.Acl("listener", {
        name: `${name}-${_default.result}`,
        ipVersion: "ipv4",
    });
    const listenerListener = new alicloud.slb.Listener("listener", {
        loadBalancerId: listener.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.index.Integer("default",
        min=10000,
        max=99999)
    listener = alicloud.slb.ApplicationLoadBalancer("listener",
        load_balancer_name=f"{name}-{default['result']}",
        internet_charge_type="PayByTraffic",
        address_type="internet",
        instance_charge_type="PayByCLCU")
    listener_acl = alicloud.slb.Acl("listener",
        name=f"{name}-{default['result']}",
        ip_version="ipv4")
    listener_listener = alicloud.slb.Listener("listener",
        load_balancer_id=listener.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.NewInteger(ctx, "default", &random.IntegerArgs{
    			Min: 10000,
    			Max: 99999,
    		})
    		if err != nil {
    			return err
    		}
    		listener, err := slb.NewApplicationLoadBalancer(ctx, "listener", &slb.ApplicationLoadBalancerArgs{
    			LoadBalancerName:   pulumi.String(fmt.Sprintf("%v-%v", name, _default.Result)),
    			InternetChargeType: pulumi.String("PayByTraffic"),
    			AddressType:        pulumi.String("internet"),
    			InstanceChargeType: pulumi.String("PayByCLCU"),
    		})
    		if err != nil {
    			return err
    		}
    		listenerAcl, err := slb.NewAcl(ctx, "listener", &slb.AclArgs{
    			Name:      pulumi.String(fmt.Sprintf("%v-%v", name, _default.Result)),
    			IpVersion: pulumi.String("ipv4"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = slb.NewListener(ctx, "listener", &slb.ListenerArgs{
    			LoadBalancerId:         listener.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.Index.Integer("default", new()
        {
            Min = 10000,
            Max = 99999,
        });
    
        var listener = new AliCloud.Slb.ApplicationLoadBalancer("listener", new()
        {
            LoadBalancerName = $"{name}-{@default.Result}",
            InternetChargeType = "PayByTraffic",
            AddressType = "internet",
            InstanceChargeType = "PayByCLCU",
        });
    
        var listenerAcl = new AliCloud.Slb.Acl("listener", new()
        {
            Name = $"{name}-{@default.Result}",
            IpVersion = "ipv4",
        });
    
        var listenerListener = new AliCloud.Slb.Listener("listener", new()
        {
            LoadBalancerId = listener.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.integer;
    import com.pulumi.random.IntegerArgs;
    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 Integer("default", IntegerArgs.builder()
                .min(10000)
                .max(99999)
                .build());
    
            var listener = new ApplicationLoadBalancer("listener", ApplicationLoadBalancerArgs.builder()
                .loadBalancerName(String.format("%s-%s", name,default_.result()))
                .internetChargeType("PayByTraffic")
                .addressType("internet")
                .instanceChargeType("PayByCLCU")
                .build());
    
            var listenerAcl = new Acl("listenerAcl", AclArgs.builder()
                .name(String.format("%s-%s", name,default_.result()))
                .ipVersion("ipv4")
                .build());
    
            var listenerListener = new Listener("listenerListener", ListenerArgs.builder()
                .loadBalancerId(listener.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:integer
        properties:
          min: 10000
          max: 99999
      listener:
        type: alicloud:slb:ApplicationLoadBalancer
        properties:
          loadBalancerName: ${name}-${default.result}
          internetChargeType: PayByTraffic
          addressType: internet
          instanceChargeType: PayByCLCU
      listenerListener:
        type: alicloud:slb:Listener
        name: listener
        properties:
          loadBalancerId: ${listener.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
        name: listener
        properties:
          name: ${name}-${default.result}
          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.

    Constructor 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
    LoadBalancerId string
    Protocol string
    AclId string
    AclStatus string
    AclType string
    BackendPort int
    Bandwidth int
    CaCertificateId string
    Cookie string
    CookieTimeout int
    DeleteProtectionValidation bool
    Description string
    EnableHttp2 string
    EstablishedTimeout int
    ForwardPort int
    Gzip bool
    HealthCheck string
    HealthCheckConnectPort int
    HealthCheckDomain string
    HealthCheckHttpCode string
    HealthCheckInterval int
    HealthCheckMethod string
    HealthCheckTimeout int
    HealthCheckType string
    HealthCheckUri string
    HealthyThreshold int
    IdleTimeout int
    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
    MasterSlaveServerGroupId string
    PersistenceTimeout int
    ProxyProtocolV2Enabled bool
    RequestTimeout int
    Scheduler string
    ServerCertificateId string
    ServerGroupId string
    SslCertificateId string

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

    StickySession string
    StickySessionType string
    TlsCipherPolicy string
    UnhealthyThreshold int
    XForwardedFor Pulumi.AliCloud.Slb.Inputs.ListenerXForwardedFor
    Whether to set additional HTTP Header field "X-Forwarded-For".
    FrontendPort int
    LoadBalancerId string
    Protocol string
    AclId string
    AclStatus string
    AclType string
    BackendPort int
    Bandwidth int
    CaCertificateId string
    Cookie string
    CookieTimeout int
    DeleteProtectionValidation bool
    Description string
    EnableHttp2 string
    EstablishedTimeout int
    ForwardPort int
    Gzip bool
    HealthCheck string
    HealthCheckConnectPort int
    HealthCheckDomain string
    HealthCheckHttpCode string
    HealthCheckInterval int
    HealthCheckMethod string
    HealthCheckTimeout int
    HealthCheckType string
    HealthCheckUri string
    HealthyThreshold int
    IdleTimeout int
    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
    MasterSlaveServerGroupId string
    PersistenceTimeout int
    ProxyProtocolV2Enabled bool
    RequestTimeout int
    Scheduler string
    ServerCertificateId string
    ServerGroupId string
    SslCertificateId string

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

    StickySession string
    StickySessionType string
    TlsCipherPolicy string
    UnhealthyThreshold int
    XForwardedFor ListenerXForwardedForArgs
    Whether to set additional HTTP Header field "X-Forwarded-For".
    frontendPort Integer
    loadBalancerId String
    protocol String
    aclId String
    aclStatus String
    aclType String
    backendPort Integer
    bandwidth Integer
    caCertificateId String
    cookie String
    cookieTimeout Integer
    deleteProtectionValidation Boolean
    description String
    enableHttp2 String
    establishedTimeout Integer
    forwardPort Integer
    gzip Boolean
    healthCheck String
    healthCheckConnectPort Integer
    healthCheckDomain String
    healthCheckHttpCode String
    healthCheckInterval Integer
    healthCheckMethod String
    healthCheckTimeout Integer
    healthCheckType String
    healthCheckUri String
    healthyThreshold Integer
    idleTimeout Integer
    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
    masterSlaveServerGroupId String
    persistenceTimeout Integer
    proxyProtocolV2Enabled Boolean
    requestTimeout Integer
    scheduler String
    serverCertificateId String
    serverGroupId String
    sslCertificateId String

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

    stickySession String
    stickySessionType String
    tlsCipherPolicy String
    unhealthyThreshold Integer
    xForwardedFor ListenerXForwardedFor
    Whether to set additional HTTP Header field "X-Forwarded-For".
    frontendPort number
    loadBalancerId string
    protocol string
    aclId string
    aclStatus string
    aclType string
    backendPort number
    bandwidth number
    caCertificateId string
    cookie string
    cookieTimeout number
    deleteProtectionValidation boolean
    description string
    enableHttp2 string
    establishedTimeout number
    forwardPort number
    gzip boolean
    healthCheck string
    healthCheckConnectPort number
    healthCheckDomain string
    healthCheckHttpCode string
    healthCheckInterval number
    healthCheckMethod string
    healthCheckTimeout number
    healthCheckType string
    healthCheckUri string
    healthyThreshold number
    idleTimeout number
    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
    masterSlaveServerGroupId string
    persistenceTimeout number
    proxyProtocolV2Enabled boolean
    requestTimeout number
    scheduler string
    serverCertificateId string
    serverGroupId string
    sslCertificateId string

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

    stickySession string
    stickySessionType string
    tlsCipherPolicy string
    unhealthyThreshold number
    xForwardedFor ListenerXForwardedFor
    Whether to set additional HTTP Header field "X-Forwarded-For".
    frontend_port int
    load_balancer_id str
    protocol str
    acl_id str
    acl_status str
    acl_type str
    backend_port int
    bandwidth int
    ca_certificate_id str
    cookie str
    cookie_timeout int
    delete_protection_validation bool
    description str
    enable_http2 str
    established_timeout int
    forward_port int
    gzip bool
    health_check str
    health_check_connect_port int
    health_check_domain str
    health_check_http_code str
    health_check_interval int
    health_check_method str
    health_check_timeout int
    health_check_type str
    health_check_uri str
    healthy_threshold int
    idle_timeout int
    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
    master_slave_server_group_id str
    persistence_timeout int
    proxy_protocol_v2_enabled bool
    request_timeout int
    scheduler str
    server_certificate_id str
    server_group_id str
    ssl_certificate_id str

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

    sticky_session str
    sticky_session_type str
    tls_cipher_policy str
    unhealthy_threshold int
    x_forwarded_for ListenerXForwardedForArgs
    Whether to set additional HTTP Header field "X-Forwarded-For".
    frontendPort Number
    loadBalancerId String
    protocol String
    aclId String
    aclStatus String
    aclType String
    backendPort Number
    bandwidth Number
    caCertificateId String
    cookie String
    cookieTimeout Number
    deleteProtectionValidation Boolean
    description String
    enableHttp2 String
    establishedTimeout Number
    forwardPort Number
    gzip Boolean
    healthCheck String
    healthCheckConnectPort Number
    healthCheckDomain String
    healthCheckHttpCode String
    healthCheckInterval Number
    healthCheckMethod String
    healthCheckTimeout Number
    healthCheckType String
    healthCheckUri String
    healthyThreshold Number
    idleTimeout Number
    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
    masterSlaveServerGroupId String
    persistenceTimeout Number
    proxyProtocolV2Enabled Boolean
    requestTimeout Number
    scheduler String
    serverCertificateId String
    serverGroupId String
    sslCertificateId String

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

    stickySession String
    stickySessionType String
    tlsCipherPolicy String
    unhealthyThreshold Number
    xForwardedFor Property Map
    Whether to set additional HTTP Header field "X-Forwarded-For".

    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
    AclStatus string
    AclType string
    BackendPort int
    Bandwidth int
    CaCertificateId string
    Cookie string
    CookieTimeout int
    DeleteProtectionValidation bool
    Description string
    EnableHttp2 string
    EstablishedTimeout int
    ForwardPort int
    FrontendPort int
    Gzip bool
    HealthCheck string
    HealthCheckConnectPort int
    HealthCheckDomain string
    HealthCheckHttpCode string
    HealthCheckInterval int
    HealthCheckMethod string
    HealthCheckTimeout int
    HealthCheckType string
    HealthCheckUri string
    HealthyThreshold int
    IdleTimeout int
    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
    LoadBalancerId string
    MasterSlaveServerGroupId string
    PersistenceTimeout int
    Protocol string
    ProxyProtocolV2Enabled bool
    RequestTimeout int
    Scheduler string
    ServerCertificateId string
    ServerGroupId string
    SslCertificateId string

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

    StickySession string
    StickySessionType string
    TlsCipherPolicy string
    UnhealthyThreshold int
    XForwardedFor Pulumi.AliCloud.Slb.Inputs.ListenerXForwardedFor
    Whether to set additional HTTP Header field "X-Forwarded-For".
    AclId string
    AclStatus string
    AclType string
    BackendPort int
    Bandwidth int
    CaCertificateId string
    Cookie string
    CookieTimeout int
    DeleteProtectionValidation bool
    Description string
    EnableHttp2 string
    EstablishedTimeout int
    ForwardPort int
    FrontendPort int
    Gzip bool
    HealthCheck string
    HealthCheckConnectPort int
    HealthCheckDomain string
    HealthCheckHttpCode string
    HealthCheckInterval int
    HealthCheckMethod string
    HealthCheckTimeout int
    HealthCheckType string
    HealthCheckUri string
    HealthyThreshold int
    IdleTimeout int
    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
    LoadBalancerId string
    MasterSlaveServerGroupId string
    PersistenceTimeout int
    Protocol string
    ProxyProtocolV2Enabled bool
    RequestTimeout int
    Scheduler string
    ServerCertificateId string
    ServerGroupId string
    SslCertificateId string

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

    StickySession string
    StickySessionType string
    TlsCipherPolicy string
    UnhealthyThreshold int
    XForwardedFor ListenerXForwardedForArgs
    Whether to set additional HTTP Header field "X-Forwarded-For".
    aclId String
    aclStatus String
    aclType String
    backendPort Integer
    bandwidth Integer
    caCertificateId String
    cookie String
    cookieTimeout Integer
    deleteProtectionValidation Boolean
    description String
    enableHttp2 String
    establishedTimeout Integer
    forwardPort Integer
    frontendPort Integer
    gzip Boolean
    healthCheck String
    healthCheckConnectPort Integer
    healthCheckDomain String
    healthCheckHttpCode String
    healthCheckInterval Integer
    healthCheckMethod String
    healthCheckTimeout Integer
    healthCheckType String
    healthCheckUri String
    healthyThreshold Integer
    idleTimeout Integer
    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
    loadBalancerId String
    masterSlaveServerGroupId String
    persistenceTimeout Integer
    protocol String
    proxyProtocolV2Enabled Boolean
    requestTimeout Integer
    scheduler String
    serverCertificateId String
    serverGroupId String
    sslCertificateId String

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

    stickySession String
    stickySessionType String
    tlsCipherPolicy String
    unhealthyThreshold Integer
    xForwardedFor ListenerXForwardedFor
    Whether to set additional HTTP Header field "X-Forwarded-For".
    aclId string
    aclStatus string
    aclType string
    backendPort number
    bandwidth number
    caCertificateId string
    cookie string
    cookieTimeout number
    deleteProtectionValidation boolean
    description string
    enableHttp2 string
    establishedTimeout number
    forwardPort number
    frontendPort number
    gzip boolean
    healthCheck string
    healthCheckConnectPort number
    healthCheckDomain string
    healthCheckHttpCode string
    healthCheckInterval number
    healthCheckMethod string
    healthCheckTimeout number
    healthCheckType string
    healthCheckUri string
    healthyThreshold number
    idleTimeout number
    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
    loadBalancerId string
    masterSlaveServerGroupId string
    persistenceTimeout number
    protocol string
    proxyProtocolV2Enabled boolean
    requestTimeout number
    scheduler string
    serverCertificateId string
    serverGroupId string
    sslCertificateId string

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

    stickySession string
    stickySessionType string
    tlsCipherPolicy string
    unhealthyThreshold number
    xForwardedFor ListenerXForwardedFor
    Whether to set additional HTTP Header field "X-Forwarded-For".
    acl_id str
    acl_status str
    acl_type str
    backend_port int
    bandwidth int
    ca_certificate_id str
    cookie str
    cookie_timeout int
    delete_protection_validation bool
    description str
    enable_http2 str
    established_timeout int
    forward_port int
    frontend_port int
    gzip bool
    health_check str
    health_check_connect_port int
    health_check_domain str
    health_check_http_code str
    health_check_interval int
    health_check_method str
    health_check_timeout int
    health_check_type str
    health_check_uri str
    healthy_threshold int
    idle_timeout int
    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
    load_balancer_id str
    master_slave_server_group_id str
    persistence_timeout int
    protocol str
    proxy_protocol_v2_enabled bool
    request_timeout int
    scheduler str
    server_certificate_id str
    server_group_id str
    ssl_certificate_id str

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

    sticky_session str
    sticky_session_type str
    tls_cipher_policy str
    unhealthy_threshold int
    x_forwarded_for ListenerXForwardedForArgs
    Whether to set additional HTTP Header field "X-Forwarded-For".
    aclId String
    aclStatus String
    aclType String
    backendPort Number
    bandwidth Number
    caCertificateId String
    cookie String
    cookieTimeout Number
    deleteProtectionValidation Boolean
    description String
    enableHttp2 String
    establishedTimeout Number
    forwardPort Number
    frontendPort Number
    gzip Boolean
    healthCheck String
    healthCheckConnectPort Number
    healthCheckDomain String
    healthCheckHttpCode String
    healthCheckInterval Number
    healthCheckMethod String
    healthCheckTimeout Number
    healthCheckType String
    healthCheckUri String
    healthyThreshold Number
    idleTimeout Number
    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
    loadBalancerId String
    masterSlaveServerGroupId String
    persistenceTimeout Number
    protocol String
    proxyProtocolV2Enabled Boolean
    requestTimeout Number
    scheduler String
    serverCertificateId String
    serverGroupId String
    sslCertificateId String

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

    stickySession String
    stickySessionType String
    tlsCipherPolicy String
    unhealthyThreshold Number
    xForwardedFor Property Map
    Whether to set additional HTTP Header field "X-Forwarded-For".

    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.57.1 published on Wednesday, Jun 26, 2024 by Pulumi