Listener

Provides an Application Load Balancer Listener resource.

For information about slb and how to use it, see What is Server Load Balancer.

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

Listener fields and protocol mapping

load balance support 4 protocol to listen on, they are http,https,tcp,udp, the every listener support which portocal following:

listener parametersupport protocolvalue range
backend_porthttp & https & tcp & udp1-65535
frontend_porthttp & https & tcp & udp1-65535
protocolhttp & https & tcp & udp
bandwidthhttp & https & tcp & udp-1 / 1-1000
schedulerhttp & https & tcp & udpwrr, rr, wlc, tch, qch
sticky_sessionhttp & httpson or off
sticky_session_typehttp & httpsinsert or server
cookie_timeouthttp & https1-86400
cookiehttp & https
persistence_timeouttcp & udp0-3600
health_checkhttp & httpson or off
health_check_typetcptcp or http
health_check_domainhttp & https & tcp
health_check_methodhttp & https & tcp
health_check_urihttp & https & tcp
health_check_connect_porthttp & https & tcp & udp1-65535 or -520
healthy_thresholdhttp & https & tcp & udp1-10
unhealthy_thresholdhttp & https & tcp & udp1-10
health_check_timeouthttp & https & tcp & udp1-300
health_check_intervalhttp & https & tcp & udp1-50
health_check_http_codehttp & https & tcphttp_2xx,http_3xx,http_4xx,http_5xx
server_certificate_idhttps
gziphttp & httpstrue or false
x_forwarded_forhttp & https
acl_statushttp & https & tcp & udpon or off
acl_typehttp & https & tcp & udpwhite or black
acl_idhttp & https & tcp & udpthe id of resource alicloud_slb_acl
established_timeouttcp10-900
idle_timeouthttp & https1-60
request_timeouthttp & https1-180
enable_http2httpson or off
tls_cipher_policyhttpstls_cipher_policy_1_0, tls_cipher_policy_1_1, tls_cipher_policy_1_2, tls_cipher_policy_1_2_strict
server_group_idhttp & https & tcp & udpthe id of resource alicloud.slb.ServerGroup

The listener mapping supports the following:

Example Usage

Coming soon!

Coming soon!

package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
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.inputs.AclEntryListArgs;
import com.pulumi.alicloud.slb.Listener;
import com.pulumi.alicloud.slb.ListenerArgs;
import com.pulumi.alicloud.slb.inputs.ListenerXForwardedForArgs;
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("testcreatehttplistener");
        final var ipVersion = config.get("ipVersion").orElse("ipv4");
        var defaultApplicationLoadBalancer = new ApplicationLoadBalancer("defaultApplicationLoadBalancer", ApplicationLoadBalancerArgs.builder()        
            .loadBalancerName("tf-testAccSlbListenerHttp")
            .internetChargeType("PayByTraffic")
            .internet(true)
            .build());

        var defaultAcl = new Acl("defaultAcl", AclArgs.builder()        
            .ipVersion(ipVersion)
            .entryLists(            
                AclEntryListArgs.builder()
                    .entry("10.10.10.0/24")
                    .comment("first")
                    .build(),
                AclEntryListArgs.builder()
                    .entry("168.10.10.0/24")
                    .comment("second")
                    .build())
            .build());

        var defaultListener = new Listener("defaultListener", ListenerArgs.builder()        
            .loadBalancerId(defaultApplicationLoadBalancer.id())
            .backendPort(80)
            .frontendPort(80)
            .protocol("http")
            .bandwidth(10)
            .stickySession("on")
            .stickySessionType("insert")
            .cookieTimeout(86400)
            .cookie("testslblistenercookie")
            .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(defaultAcl.id())
            .requestTimeout(80)
            .idleTimeout(30)
            .build());

    }
}

Coming soon!

Coming soon!

configuration:
  name:
    type: string
    default: testcreatehttplistener
  ipVersion:
    type: string
    default: ipv4
resources:
  defaultApplicationLoadBalancer:
    type: alicloud:slb:ApplicationLoadBalancer
    properties:
      loadBalancerName: tf-testAccSlbListenerHttp
      internetChargeType: PayByTraffic
      internet: true
  defaultListener:
    type: alicloud:slb:Listener
    properties:
      loadBalancerId: ${defaultApplicationLoadBalancer.id}
      backendPort: 80
      frontendPort: 80
      protocol: http
      bandwidth: 10
      stickySession: on
      stickySessionType: insert
      cookieTimeout: 86400
      cookie: testslblistenercookie
      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: ${defaultAcl.id}
      requestTimeout: 80
      idleTimeout: 30
  defaultAcl:
    type: alicloud:slb:Acl
    properties:
      ipVersion: ${ipVersion}
      entryLists:
        - entry: 10.10.10.0/24
          comment: first
        - entry: 168.10.10.0/24
          comment: second

Create Listener Resource

new Listener(name: string, args: ListenerArgs, opts?: CustomResourceOptions);
@overload
def Listener(resource_name: 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,
             instance_port: 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,
             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)
@overload
def Listener(resource_name: str,
             args: ListenerArgs,
             opts: Optional[ResourceOptions] = 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.

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.

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

Port used by the Server Load Balancer instance frontend. Valid value range: [1-65535].

LoadBalancerId string

The Load Balancer ID which is used to launch a new listener.

Protocol string

The protocol to listen on. Valid values are [http, https, tcp, udp].

AclId string

the id of access control list to be apply on the listener, is the id of resource alicloud_slb_acl. If acl_status is "on", it is mandatory. Otherwise, it will be ignored.

AclStatus string

Whether to enable "acl(access control list)", the acl is specified by acl_id. Valid values are on and off. Default to off.

AclType string

Mode for handling the acl specified by acl_id. If acl_status is "on", it is mandatory. Otherwise, it will be ignored. Valid values are white and black. white means the Listener can only be accessed by client ip belongs to the acl; black means the Listener can not be accessed by client ip belongs to the acl.

BackendPort int

Port used by the Server Load Balancer instance backend. Valid value range: [1-65535].

Bandwidth int

Bandwidth peak of Listener. For the public network instance charged per traffic consumed, the Bandwidth on Listener can be set to -1, indicating the bandwidth peak is unlimited. Valid values are [-1, 1-1000] in Mbps.

CaCertificateId string

SLB CA certificate ID. Only when protocol is https can be specified.

Cookie string

The cookie configured on the server. It is mandatory when sticky_session is "on" and sticky_session_type is "server". Otherwise, it will be ignored. Valid value:String in line with RFC 2965, with length being 1- 200. It only contains characters such as ASCII codes, English letters and digits instead of the comma, semicolon or spacing, and it cannot start with $.

CookieTimeout int

Cookie timeout. It is mandatory when sticky_session is "on" and sticky_session_type is "insert". Otherwise, it will be ignored. Valid value range: [1-86400] in seconds.

DeleteProtectionValidation bool

Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default to false.

Description string

The description of slb listener. This description can have a string of 1 to 80 characters. Default value: null.

EnableHttp2 string

Whether to enable https listener support http2 or not. Valid values are on and off. Default to on.

EstablishedTimeout int

Timeout of tcp listener established connection idle timeout. Valid value range: [10-900] in seconds. Default to 900.

ForwardPort int

The port that http redirect to https.

Gzip bool

Whether to enable "Gzip Compression". If enabled, files of specific file types will be compressed, otherwise, no files will be compressed. Default to true. Available in v1.13.0+.

HealthCheck string

Whether to enable health check. Valid values areon and off. TCP and UDP listener's HealthCheck is always on, so it will be ignore when launching TCP or UDP listener.

HealthCheckConnectPort int

The port that is used for health checks. Valid value range: [0-65535]. Default to 0 means that the port on a backend server is used for health checks.

HealthCheckDomain string

Domain name used for health check. When it used to launch TCP listener, health_check_type must be "http". Its length is limited to 1-80 and only characters such as letters, digits, ‘-‘ and ‘.’ are allowed. When it is not set or empty, Server Load Balancer uses the private network IP address of each backend server as Domain used for health check.

HealthCheckHttpCode string

Regular health check HTTP status code. Multiple codes are segmented by “,”. It is required when health_check is on. Default to http_2xx. Valid values are: http_2xx, http_3xx, http_4xx and http_5xx.

HealthCheckInterval int

Time interval of health checks. It is required when health_check is on. Valid value range: [1-50] in seconds. Default to 2.

HealthCheckMethod string

HealthCheckMethod used for health check.Valid values: ["head", "get"] http and https support regions ap-northeast-1, ap-southeast-1, ap-southeast-2, ap-southeast-3, us-east-1, us-west-1, eu-central-1, ap-south-1, me-east-1, cn-huhehaote, cn-zhangjiakou, ap-southeast-5, cn-shenzhen, cn-hongkong, cn-qingdao, cn-chengdu, eu-west-1, cn-hangzhou", cn-beijing, cn-shanghai.This function does not support the TCP protocol .

HealthCheckTimeout int

Maximum timeout of each health check response. It is required when health_check is on. Valid value range: [1-300] in seconds. Default to 5. Note: If health_check_timeout < health_check_interval, its will be replaced by health_check_interval.

HealthCheckType string

Type of health check. Valid values are: tcp and http. Default to tcp . TCP supports TCP and HTTP health check mode, you can select the particular mode depending on your application.

HealthCheckUri string

URI used for health check. When it used to launch TCP listener, health_check_type must be "http". Its length is limited to 1-80 and it must start with /. Only characters such as letters, digits, ‘-’, ‘/’, ‘.’, ‘%’, ‘?’, #’ and ‘&’ are allowed.

HealthyThreshold int

The number of health checks that an unhealthy backend server must consecutively pass before it can be declared healthy. In this case, the health check state is changed from fail to success. It is required when health_check is on. Valid value range: [2-10] in seconds. Default to 3. NOTE: This parameter takes effect only if the health_check parameter is set to on.

IdleTimeout int

Timeout of http or https listener established connection idle timeout. Valid value range: [1-60] in seconds. Default to 15.

InstancePort int

Deprecated:

Field 'instance_port' has been deprecated, and using 'backend_port' to replace.

LbPort int

Deprecated:

Field 'lb_port' has been deprecated, and using 'frontend_port' to replace.

LbProtocol string

Deprecated:

Field 'lb_protocol' has been deprecated, and using 'protocol' to replace.

ListenerForward string

Whether to enable http redirect to https, Valid values are on and off. Default to off.

MasterSlaveServerGroupId string

The ID of the master slave server group.

PersistenceTimeout int

Timeout of connection persistence. Valid value range: [0-3600] in seconds. Default to 0 and means closing it.

RequestTimeout int

Timeout of http or https listener request (which does not get response from backend) timeout. Valid value range: [1-180] in seconds. Default to 60.

Scheduler string

Scheduling algorithm, Valid values: wrr, rr, wlc, sch, tcp, qch. Default to wrr. Only when protocol is tcp or udp, scheduler can be set to sch. Only when instance is guaranteed-performance instance and protocol is tcp or udp, scheduler can be set to tch. Only when instance is guaranteed-performance instance and protocol is udp, scheduler can be set to qch.

ServerCertificateId string

SLB Server certificate ID. It is required when protocol is https. The server_certificate_id is also required when the value of the ssl_certificate_id is Empty.

ServerGroupId string

the id of server group to be apply on the listener, is the id of resource alicloud.slb.ServerGroup.

SslCertificateId string

SLB Server certificate ID. It has been deprecated from 1.59.0 and using server_certificate_id instead.

Deprecated:

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

StickySession string

Whether to enable session persistence, Valid values are on and off. Default to off.

StickySessionType string

Mode for handling the cookie. If sticky_session is "on", it is mandatory. Otherwise, it will be ignored. Valid values are insert and server. insert means it is inserted from Server Load Balancer; server means the Server Load Balancer learns from the backend server.

TlsCipherPolicy string

Https listener TLS cipher policy. Valid values are tls_cipher_policy_1_0, tls_cipher_policy_1_1, tls_cipher_policy_1_2, tls_cipher_policy_1_2_strict. Default to tls_cipher_policy_1_0. Currently the tls_cipher_policy can not be updated when load balancer instance is "Shared-Performance".

UnhealthyThreshold int

The number of health checks that a healthy backend server must consecutively fail before it can be declared unhealthy. In this case, the health check state is changed from success to fail. It is required when health_check is on. Valid value range: [2-10] in seconds. Default to 3. NOTE: This parameter takes effect only if the health_check parameter is set to on.

XForwardedFor Pulumi.AliCloud.Slb.Inputs.ListenerXForwardedForArgs

Whether to set additional HTTP Header field "X-Forwarded-For" (documented below). Available in v1.13.0+. The details see Block x_forwarded_for.

FrontendPort int

Port used by the Server Load Balancer instance frontend. Valid value range: [1-65535].

LoadBalancerId string

The Load Balancer ID which is used to launch a new listener.

Protocol string

The protocol to listen on. Valid values are [http, https, tcp, udp].

AclId string

the id of access control list to be apply on the listener, is the id of resource alicloud_slb_acl. If acl_status is "on", it is mandatory. Otherwise, it will be ignored.

AclStatus string

Whether to enable "acl(access control list)", the acl is specified by acl_id. Valid values are on and off. Default to off.

AclType string

Mode for handling the acl specified by acl_id. If acl_status is "on", it is mandatory. Otherwise, it will be ignored. Valid values are white and black. white means the Listener can only be accessed by client ip belongs to the acl; black means the Listener can not be accessed by client ip belongs to the acl.

BackendPort int

Port used by the Server Load Balancer instance backend. Valid value range: [1-65535].

Bandwidth int

Bandwidth peak of Listener. For the public network instance charged per traffic consumed, the Bandwidth on Listener can be set to -1, indicating the bandwidth peak is unlimited. Valid values are [-1, 1-1000] in Mbps.

CaCertificateId string

SLB CA certificate ID. Only when protocol is https can be specified.

Cookie string

The cookie configured on the server. It is mandatory when sticky_session is "on" and sticky_session_type is "server". Otherwise, it will be ignored. Valid value:String in line with RFC 2965, with length being 1- 200. It only contains characters such as ASCII codes, English letters and digits instead of the comma, semicolon or spacing, and it cannot start with $.

CookieTimeout int

Cookie timeout. It is mandatory when sticky_session is "on" and sticky_session_type is "insert". Otherwise, it will be ignored. Valid value range: [1-86400] in seconds.

DeleteProtectionValidation bool

Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default to false.

Description string

The description of slb listener. This description can have a string of 1 to 80 characters. Default value: null.

EnableHttp2 string

Whether to enable https listener support http2 or not. Valid values are on and off. Default to on.

EstablishedTimeout int

Timeout of tcp listener established connection idle timeout. Valid value range: [10-900] in seconds. Default to 900.

ForwardPort int

The port that http redirect to https.

Gzip bool

Whether to enable "Gzip Compression". If enabled, files of specific file types will be compressed, otherwise, no files will be compressed. Default to true. Available in v1.13.0+.

HealthCheck string

Whether to enable health check. Valid values areon and off. TCP and UDP listener's HealthCheck is always on, so it will be ignore when launching TCP or UDP listener.

HealthCheckConnectPort int

The port that is used for health checks. Valid value range: [0-65535]. Default to 0 means that the port on a backend server is used for health checks.

HealthCheckDomain string

Domain name used for health check. When it used to launch TCP listener, health_check_type must be "http". Its length is limited to 1-80 and only characters such as letters, digits, ‘-‘ and ‘.’ are allowed. When it is not set or empty, Server Load Balancer uses the private network IP address of each backend server as Domain used for health check.

HealthCheckHttpCode string

Regular health check HTTP status code. Multiple codes are segmented by “,”. It is required when health_check is on. Default to http_2xx. Valid values are: http_2xx, http_3xx, http_4xx and http_5xx.

HealthCheckInterval int

Time interval of health checks. It is required when health_check is on. Valid value range: [1-50] in seconds. Default to 2.

HealthCheckMethod string

HealthCheckMethod used for health check.Valid values: ["head", "get"] http and https support regions ap-northeast-1, ap-southeast-1, ap-southeast-2, ap-southeast-3, us-east-1, us-west-1, eu-central-1, ap-south-1, me-east-1, cn-huhehaote, cn-zhangjiakou, ap-southeast-5, cn-shenzhen, cn-hongkong, cn-qingdao, cn-chengdu, eu-west-1, cn-hangzhou", cn-beijing, cn-shanghai.This function does not support the TCP protocol .

HealthCheckTimeout int

Maximum timeout of each health check response. It is required when health_check is on. Valid value range: [1-300] in seconds. Default to 5. Note: If health_check_timeout < health_check_interval, its will be replaced by health_check_interval.

HealthCheckType string

Type of health check. Valid values are: tcp and http. Default to tcp . TCP supports TCP and HTTP health check mode, you can select the particular mode depending on your application.

HealthCheckUri string

URI used for health check. When it used to launch TCP listener, health_check_type must be "http". Its length is limited to 1-80 and it must start with /. Only characters such as letters, digits, ‘-’, ‘/’, ‘.’, ‘%’, ‘?’, #’ and ‘&’ are allowed.

HealthyThreshold int

The number of health checks that an unhealthy backend server must consecutively pass before it can be declared healthy. In this case, the health check state is changed from fail to success. It is required when health_check is on. Valid value range: [2-10] in seconds. Default to 3. NOTE: This parameter takes effect only if the health_check parameter is set to on.

IdleTimeout int

Timeout of http or https listener established connection idle timeout. Valid value range: [1-60] in seconds. Default to 15.

InstancePort int

Deprecated:

Field 'instance_port' has been deprecated, and using 'backend_port' to replace.

LbPort int

Deprecated:

Field 'lb_port' has been deprecated, and using 'frontend_port' to replace.

LbProtocol string

Deprecated:

Field 'lb_protocol' has been deprecated, and using 'protocol' to replace.

ListenerForward string

Whether to enable http redirect to https, Valid values are on and off. Default to off.

MasterSlaveServerGroupId string

The ID of the master slave server group.

PersistenceTimeout int

Timeout of connection persistence. Valid value range: [0-3600] in seconds. Default to 0 and means closing it.

RequestTimeout int

Timeout of http or https listener request (which does not get response from backend) timeout. Valid value range: [1-180] in seconds. Default to 60.

Scheduler string

Scheduling algorithm, Valid values: wrr, rr, wlc, sch, tcp, qch. Default to wrr. Only when protocol is tcp or udp, scheduler can be set to sch. Only when instance is guaranteed-performance instance and protocol is tcp or udp, scheduler can be set to tch. Only when instance is guaranteed-performance instance and protocol is udp, scheduler can be set to qch.

ServerCertificateId string

SLB Server certificate ID. It is required when protocol is https. The server_certificate_id is also required when the value of the ssl_certificate_id is Empty.

ServerGroupId string

the id of server group to be apply on the listener, is the id of resource alicloud.slb.ServerGroup.

SslCertificateId string

SLB Server certificate ID. It has been deprecated from 1.59.0 and using server_certificate_id instead.

Deprecated:

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

StickySession string

Whether to enable session persistence, Valid values are on and off. Default to off.

StickySessionType string

Mode for handling the cookie. If sticky_session is "on", it is mandatory. Otherwise, it will be ignored. Valid values are insert and server. insert means it is inserted from Server Load Balancer; server means the Server Load Balancer learns from the backend server.

TlsCipherPolicy string

Https listener TLS cipher policy. Valid values are tls_cipher_policy_1_0, tls_cipher_policy_1_1, tls_cipher_policy_1_2, tls_cipher_policy_1_2_strict. Default to tls_cipher_policy_1_0. Currently the tls_cipher_policy can not be updated when load balancer instance is "Shared-Performance".

UnhealthyThreshold int

The number of health checks that a healthy backend server must consecutively fail before it can be declared unhealthy. In this case, the health check state is changed from success to fail. It is required when health_check is on. Valid value range: [2-10] in seconds. Default to 3. NOTE: This parameter takes effect only if the health_check parameter is set to on.

XForwardedFor ListenerXForwardedForArgs

Whether to set additional HTTP Header field "X-Forwarded-For" (documented below). Available in v1.13.0+. The details see Block x_forwarded_for.

frontendPort Integer

Port used by the Server Load Balancer instance frontend. Valid value range: [1-65535].

loadBalancerId String

The Load Balancer ID which is used to launch a new listener.

protocol String

The protocol to listen on. Valid values are [http, https, tcp, udp].

aclId String

the id of access control list to be apply on the listener, is the id of resource alicloud_slb_acl. If acl_status is "on", it is mandatory. Otherwise, it will be ignored.

aclStatus String

Whether to enable "acl(access control list)", the acl is specified by acl_id. Valid values are on and off. Default to off.

aclType String

Mode for handling the acl specified by acl_id. If acl_status is "on", it is mandatory. Otherwise, it will be ignored. Valid values are white and black. white means the Listener can only be accessed by client ip belongs to the acl; black means the Listener can not be accessed by client ip belongs to the acl.

backendPort Integer

Port used by the Server Load Balancer instance backend. Valid value range: [1-65535].

bandwidth Integer

Bandwidth peak of Listener. For the public network instance charged per traffic consumed, the Bandwidth on Listener can be set to -1, indicating the bandwidth peak is unlimited. Valid values are [-1, 1-1000] in Mbps.

caCertificateId String

SLB CA certificate ID. Only when protocol is https can be specified.

cookie String

The cookie configured on the server. It is mandatory when sticky_session is "on" and sticky_session_type is "server". Otherwise, it will be ignored. Valid value:String in line with RFC 2965, with length being 1- 200. It only contains characters such as ASCII codes, English letters and digits instead of the comma, semicolon or spacing, and it cannot start with $.

cookieTimeout Integer

Cookie timeout. It is mandatory when sticky_session is "on" and sticky_session_type is "insert". Otherwise, it will be ignored. Valid value range: [1-86400] in seconds.

deleteProtectionValidation Boolean

Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default to false.

description String

The description of slb listener. This description can have a string of 1 to 80 characters. Default value: null.

enableHttp2 String

Whether to enable https listener support http2 or not. Valid values are on and off. Default to on.

establishedTimeout Integer

Timeout of tcp listener established connection idle timeout. Valid value range: [10-900] in seconds. Default to 900.

forwardPort Integer

The port that http redirect to https.

gzip Boolean

Whether to enable "Gzip Compression". If enabled, files of specific file types will be compressed, otherwise, no files will be compressed. Default to true. Available in v1.13.0+.

healthCheck String

Whether to enable health check. Valid values areon and off. TCP and UDP listener's HealthCheck is always on, so it will be ignore when launching TCP or UDP listener.

healthCheckConnectPort Integer

The port that is used for health checks. Valid value range: [0-65535]. Default to 0 means that the port on a backend server is used for health checks.

healthCheckDomain String

Domain name used for health check. When it used to launch TCP listener, health_check_type must be "http". Its length is limited to 1-80 and only characters such as letters, digits, ‘-‘ and ‘.’ are allowed. When it is not set or empty, Server Load Balancer uses the private network IP address of each backend server as Domain used for health check.

healthCheckHttpCode String

Regular health check HTTP status code. Multiple codes are segmented by “,”. It is required when health_check is on. Default to http_2xx. Valid values are: http_2xx, http_3xx, http_4xx and http_5xx.

healthCheckInterval Integer

Time interval of health checks. It is required when health_check is on. Valid value range: [1-50] in seconds. Default to 2.

healthCheckMethod String

HealthCheckMethod used for health check.Valid values: ["head", "get"] http and https support regions ap-northeast-1, ap-southeast-1, ap-southeast-2, ap-southeast-3, us-east-1, us-west-1, eu-central-1, ap-south-1, me-east-1, cn-huhehaote, cn-zhangjiakou, ap-southeast-5, cn-shenzhen, cn-hongkong, cn-qingdao, cn-chengdu, eu-west-1, cn-hangzhou", cn-beijing, cn-shanghai.This function does not support the TCP protocol .

healthCheckTimeout Integer

Maximum timeout of each health check response. It is required when health_check is on. Valid value range: [1-300] in seconds. Default to 5. Note: If health_check_timeout < health_check_interval, its will be replaced by health_check_interval.

healthCheckType String

Type of health check. Valid values are: tcp and http. Default to tcp . TCP supports TCP and HTTP health check mode, you can select the particular mode depending on your application.

healthCheckUri String

URI used for health check. When it used to launch TCP listener, health_check_type must be "http". Its length is limited to 1-80 and it must start with /. Only characters such as letters, digits, ‘-’, ‘/’, ‘.’, ‘%’, ‘?’, #’ and ‘&’ are allowed.

healthyThreshold Integer

The number of health checks that an unhealthy backend server must consecutively pass before it can be declared healthy. In this case, the health check state is changed from fail to success. It is required when health_check is on. Valid value range: [2-10] in seconds. Default to 3. NOTE: This parameter takes effect only if the health_check parameter is set to on.

idleTimeout Integer

Timeout of http or https listener established connection idle timeout. Valid value range: [1-60] in seconds. Default to 15.

instancePort Integer

Deprecated:

Field 'instance_port' has been deprecated, and using 'backend_port' to replace.

lbPort Integer

Deprecated:

Field 'lb_port' has been deprecated, and using 'frontend_port' to replace.

lbProtocol String

Deprecated:

Field 'lb_protocol' has been deprecated, and using 'protocol' to replace.

listenerForward String

Whether to enable http redirect to https, Valid values are on and off. Default to off.

masterSlaveServerGroupId String

The ID of the master slave server group.

persistenceTimeout Integer

Timeout of connection persistence. Valid value range: [0-3600] in seconds. Default to 0 and means closing it.

requestTimeout Integer

Timeout of http or https listener request (which does not get response from backend) timeout. Valid value range: [1-180] in seconds. Default to 60.

scheduler String

Scheduling algorithm, Valid values: wrr, rr, wlc, sch, tcp, qch. Default to wrr. Only when protocol is tcp or udp, scheduler can be set to sch. Only when instance is guaranteed-performance instance and protocol is tcp or udp, scheduler can be set to tch. Only when instance is guaranteed-performance instance and protocol is udp, scheduler can be set to qch.

serverCertificateId String

SLB Server certificate ID. It is required when protocol is https. The server_certificate_id is also required when the value of the ssl_certificate_id is Empty.

serverGroupId String

the id of server group to be apply on the listener, is the id of resource alicloud.slb.ServerGroup.

sslCertificateId String

SLB Server certificate ID. It has been deprecated from 1.59.0 and using server_certificate_id instead.

Deprecated:

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

stickySession String

Whether to enable session persistence, Valid values are on and off. Default to off.

stickySessionType String

Mode for handling the cookie. If sticky_session is "on", it is mandatory. Otherwise, it will be ignored. Valid values are insert and server. insert means it is inserted from Server Load Balancer; server means the Server Load Balancer learns from the backend server.

tlsCipherPolicy String

Https listener TLS cipher policy. Valid values are tls_cipher_policy_1_0, tls_cipher_policy_1_1, tls_cipher_policy_1_2, tls_cipher_policy_1_2_strict. Default to tls_cipher_policy_1_0. Currently the tls_cipher_policy can not be updated when load balancer instance is "Shared-Performance".

unhealthyThreshold Integer

The number of health checks that a healthy backend server must consecutively fail before it can be declared unhealthy. In this case, the health check state is changed from success to fail. It is required when health_check is on. Valid value range: [2-10] in seconds. Default to 3. NOTE: This parameter takes effect only if the health_check parameter is set to on.

xForwardedFor ListenerXForwardedForArgs

Whether to set additional HTTP Header field "X-Forwarded-For" (documented below). Available in v1.13.0+. The details see Block x_forwarded_for.

frontendPort number

Port used by the Server Load Balancer instance frontend. Valid value range: [1-65535].

loadBalancerId string

The Load Balancer ID which is used to launch a new listener.

protocol string

The protocol to listen on. Valid values are [http, https, tcp, udp].

aclId string

the id of access control list to be apply on the listener, is the id of resource alicloud_slb_acl. If acl_status is "on", it is mandatory. Otherwise, it will be ignored.

aclStatus string

Whether to enable "acl(access control list)", the acl is specified by acl_id. Valid values are on and off. Default to off.

aclType string

Mode for handling the acl specified by acl_id. If acl_status is "on", it is mandatory. Otherwise, it will be ignored. Valid values are white and black. white means the Listener can only be accessed by client ip belongs to the acl; black means the Listener can not be accessed by client ip belongs to the acl.

backendPort number

Port used by the Server Load Balancer instance backend. Valid value range: [1-65535].

bandwidth number

Bandwidth peak of Listener. For the public network instance charged per traffic consumed, the Bandwidth on Listener can be set to -1, indicating the bandwidth peak is unlimited. Valid values are [-1, 1-1000] in Mbps.

caCertificateId string

SLB CA certificate ID. Only when protocol is https can be specified.

cookie string

The cookie configured on the server. It is mandatory when sticky_session is "on" and sticky_session_type is "server". Otherwise, it will be ignored. Valid value:String in line with RFC 2965, with length being 1- 200. It only contains characters such as ASCII codes, English letters and digits instead of the comma, semicolon or spacing, and it cannot start with $.

cookieTimeout number

Cookie timeout. It is mandatory when sticky_session is "on" and sticky_session_type is "insert". Otherwise, it will be ignored. Valid value range: [1-86400] in seconds.

deleteProtectionValidation boolean

Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default to false.

description string

The description of slb listener. This description can have a string of 1 to 80 characters. Default value: null.

enableHttp2 string

Whether to enable https listener support http2 or not. Valid values are on and off. Default to on.

establishedTimeout number

Timeout of tcp listener established connection idle timeout. Valid value range: [10-900] in seconds. Default to 900.

forwardPort number

The port that http redirect to https.

gzip boolean

Whether to enable "Gzip Compression". If enabled, files of specific file types will be compressed, otherwise, no files will be compressed. Default to true. Available in v1.13.0+.

healthCheck string

Whether to enable health check. Valid values areon and off. TCP and UDP listener's HealthCheck is always on, so it will be ignore when launching TCP or UDP listener.

healthCheckConnectPort number

The port that is used for health checks. Valid value range: [0-65535]. Default to 0 means that the port on a backend server is used for health checks.

healthCheckDomain string

Domain name used for health check. When it used to launch TCP listener, health_check_type must be "http". Its length is limited to 1-80 and only characters such as letters, digits, ‘-‘ and ‘.’ are allowed. When it is not set or empty, Server Load Balancer uses the private network IP address of each backend server as Domain used for health check.

healthCheckHttpCode string

Regular health check HTTP status code. Multiple codes are segmented by “,”. It is required when health_check is on. Default to http_2xx. Valid values are: http_2xx, http_3xx, http_4xx and http_5xx.

healthCheckInterval number

Time interval of health checks. It is required when health_check is on. Valid value range: [1-50] in seconds. Default to 2.

healthCheckMethod string

HealthCheckMethod used for health check.Valid values: ["head", "get"] http and https support regions ap-northeast-1, ap-southeast-1, ap-southeast-2, ap-southeast-3, us-east-1, us-west-1, eu-central-1, ap-south-1, me-east-1, cn-huhehaote, cn-zhangjiakou, ap-southeast-5, cn-shenzhen, cn-hongkong, cn-qingdao, cn-chengdu, eu-west-1, cn-hangzhou", cn-beijing, cn-shanghai.This function does not support the TCP protocol .

healthCheckTimeout number

Maximum timeout of each health check response. It is required when health_check is on. Valid value range: [1-300] in seconds. Default to 5. Note: If health_check_timeout < health_check_interval, its will be replaced by health_check_interval.

healthCheckType string

Type of health check. Valid values are: tcp and http. Default to tcp . TCP supports TCP and HTTP health check mode, you can select the particular mode depending on your application.

healthCheckUri string

URI used for health check. When it used to launch TCP listener, health_check_type must be "http". Its length is limited to 1-80 and it must start with /. Only characters such as letters, digits, ‘-’, ‘/’, ‘.’, ‘%’, ‘?’, #’ and ‘&’ are allowed.

healthyThreshold number

The number of health checks that an unhealthy backend server must consecutively pass before it can be declared healthy. In this case, the health check state is changed from fail to success. It is required when health_check is on. Valid value range: [2-10] in seconds. Default to 3. NOTE: This parameter takes effect only if the health_check parameter is set to on.

idleTimeout number

Timeout of http or https listener established connection idle timeout. Valid value range: [1-60] in seconds. Default to 15.

instancePort number

Deprecated:

Field 'instance_port' has been deprecated, and using 'backend_port' to replace.

lbPort number

Deprecated:

Field 'lb_port' has been deprecated, and using 'frontend_port' to replace.

lbProtocol string

Deprecated:

Field 'lb_protocol' has been deprecated, and using 'protocol' to replace.

listenerForward string

Whether to enable http redirect to https, Valid values are on and off. Default to off.

masterSlaveServerGroupId string

The ID of the master slave server group.

persistenceTimeout number

Timeout of connection persistence. Valid value range: [0-3600] in seconds. Default to 0 and means closing it.

requestTimeout number

Timeout of http or https listener request (which does not get response from backend) timeout. Valid value range: [1-180] in seconds. Default to 60.

scheduler string

Scheduling algorithm, Valid values: wrr, rr, wlc, sch, tcp, qch. Default to wrr. Only when protocol is tcp or udp, scheduler can be set to sch. Only when instance is guaranteed-performance instance and protocol is tcp or udp, scheduler can be set to tch. Only when instance is guaranteed-performance instance and protocol is udp, scheduler can be set to qch.

serverCertificateId string

SLB Server certificate ID. It is required when protocol is https. The server_certificate_id is also required when the value of the ssl_certificate_id is Empty.

serverGroupId string

the id of server group to be apply on the listener, is the id of resource alicloud.slb.ServerGroup.

sslCertificateId string

SLB Server certificate ID. It has been deprecated from 1.59.0 and using server_certificate_id instead.

Deprecated:

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

stickySession string

Whether to enable session persistence, Valid values are on and off. Default to off.

stickySessionType string

Mode for handling the cookie. If sticky_session is "on", it is mandatory. Otherwise, it will be ignored. Valid values are insert and server. insert means it is inserted from Server Load Balancer; server means the Server Load Balancer learns from the backend server.

tlsCipherPolicy string

Https listener TLS cipher policy. Valid values are tls_cipher_policy_1_0, tls_cipher_policy_1_1, tls_cipher_policy_1_2, tls_cipher_policy_1_2_strict. Default to tls_cipher_policy_1_0. Currently the tls_cipher_policy can not be updated when load balancer instance is "Shared-Performance".

unhealthyThreshold number

The number of health checks that a healthy backend server must consecutively fail before it can be declared unhealthy. In this case, the health check state is changed from success to fail. It is required when health_check is on. Valid value range: [2-10] in seconds. Default to 3. NOTE: This parameter takes effect only if the health_check parameter is set to on.

xForwardedFor ListenerXForwardedForArgs

Whether to set additional HTTP Header field "X-Forwarded-For" (documented below). Available in v1.13.0+. The details see Block x_forwarded_for.

frontend_port int

Port used by the Server Load Balancer instance frontend. Valid value range: [1-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 are [http, https, tcp, udp].

acl_id str

the id of access control list to be apply on the listener, is the id of resource alicloud_slb_acl. If acl_status is "on", it is mandatory. Otherwise, it will be ignored.

acl_status str

Whether to enable "acl(access control list)", the acl is specified by acl_id. Valid values are on and off. Default to off.

acl_type str

Mode for handling the acl specified by acl_id. If acl_status is "on", it is mandatory. Otherwise, it will be ignored. Valid values are white and black. white means the Listener can only be accessed by client ip belongs to the acl; black means the Listener can not be accessed by client ip belongs to the acl.

backend_port int

Port used by the Server Load Balancer instance backend. Valid value range: [1-65535].

bandwidth int

Bandwidth peak of Listener. For the public network instance charged per traffic consumed, the Bandwidth on Listener can be set to -1, indicating the bandwidth peak is unlimited. Valid values are [-1, 1-1000] in Mbps.

ca_certificate_id str

SLB CA certificate ID. Only when protocol is https can be specified.

cookie str

The cookie configured on the server. It is mandatory when sticky_session is "on" and sticky_session_type is "server". Otherwise, it will be ignored. Valid value:String in line with RFC 2965, with length being 1- 200. It only contains characters such as ASCII codes, English letters and digits instead of the comma, semicolon or spacing, and it cannot start with $.

cookie_timeout int

Cookie timeout. It is mandatory when sticky_session is "on" and sticky_session_type is "insert". Otherwise, it will be ignored. Valid value range: [1-86400] in seconds.

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 to false.

description str

The description of slb listener. This description can have a string of 1 to 80 characters. Default value: null.

enable_http2 str

Whether to enable https listener support http2 or not. Valid values are on and off. Default to on.

established_timeout int

Timeout of tcp listener established connection idle timeout. Valid value range: [10-900] in seconds. Default to 900.

forward_port int

The port that http redirect to https.

gzip bool

Whether to enable "Gzip Compression". If enabled, files of specific file types will be compressed, otherwise, no files will be compressed. Default to true. Available in v1.13.0+.

health_check str

Whether to enable health check. Valid values areon and off. TCP and UDP listener's HealthCheck is always on, so it will be ignore when launching TCP or UDP listener.

health_check_connect_port int

The port that is used for health checks. Valid value range: [0-65535]. Default to 0 means that the port on a backend server is used for health checks.

health_check_domain str

Domain name used for health check. When it used to launch TCP listener, health_check_type must be "http". Its length is limited to 1-80 and only characters such as letters, digits, ‘-‘ and ‘.’ are allowed. When it is not set or empty, Server Load Balancer uses the private network IP address of each backend server as Domain used for health check.

health_check_http_code str

Regular health check HTTP status code. Multiple codes are segmented by “,”. It is required when health_check is on. Default to http_2xx. Valid values are: http_2xx, http_3xx, http_4xx and http_5xx.

health_check_interval int

Time interval of health checks. It is required when health_check is on. Valid value range: [1-50] in seconds. Default to 2.

health_check_method str

HealthCheckMethod used for health check.Valid values: ["head", "get"] http and https support regions ap-northeast-1, ap-southeast-1, ap-southeast-2, ap-southeast-3, us-east-1, us-west-1, eu-central-1, ap-south-1, me-east-1, cn-huhehaote, cn-zhangjiakou, ap-southeast-5, cn-shenzhen, cn-hongkong, cn-qingdao, cn-chengdu, eu-west-1, cn-hangzhou", cn-beijing, cn-shanghai.This function does not support the TCP protocol .

health_check_timeout int

Maximum timeout of each health check response. It is required when health_check is on. Valid value range: [1-300] in seconds. Default to 5. Note: If health_check_timeout < health_check_interval, its will be replaced by health_check_interval.

health_check_type str

Type of health check. Valid values are: tcp and http. Default to tcp . TCP supports TCP and HTTP health check mode, you can select the particular mode depending on your application.

health_check_uri str

URI used for health check. When it used to launch TCP listener, health_check_type must be "http". Its length is limited to 1-80 and it must start with /. Only characters such as letters, digits, ‘-’, ‘/’, ‘.’, ‘%’, ‘?’, #’ and ‘&’ are allowed.

healthy_threshold int

The number of health checks that an unhealthy backend server must consecutively pass before it can be declared healthy. In this case, the health check state is changed from fail to success. It is required when health_check is on. Valid value range: [2-10] in seconds. Default to 3. NOTE: This parameter takes effect only if the health_check parameter is set to on.

idle_timeout int

Timeout of http or https listener established connection idle timeout. Valid value range: [1-60] in seconds. Default to 15.

instance_port int

Deprecated:

Field 'instance_port' has been deprecated, and using 'backend_port' to replace.

lb_port int

Deprecated:

Field 'lb_port' has been deprecated, and using 'frontend_port' to replace.

lb_protocol str

Deprecated:

Field 'lb_protocol' has been deprecated, and using 'protocol' to replace.

listener_forward str

Whether to enable http redirect to https, Valid values are on and off. Default to off.

master_slave_server_group_id str

The ID of the master slave server group.

persistence_timeout int

Timeout of connection persistence. Valid value range: [0-3600] in seconds. Default to 0 and means closing it.

request_timeout int

Timeout of http or https listener request (which does not get response from backend) timeout. Valid value range: [1-180] in seconds. Default to 60.

scheduler str

Scheduling algorithm, Valid values: wrr, rr, wlc, sch, tcp, qch. Default to wrr. Only when protocol is tcp or udp, scheduler can be set to sch. Only when instance is guaranteed-performance instance and protocol is tcp or udp, scheduler can be set to tch. Only when instance is guaranteed-performance instance and protocol is udp, scheduler can be set to qch.

server_certificate_id str

SLB Server certificate ID. It is required when protocol is https. The server_certificate_id is also required when the value of the ssl_certificate_id is Empty.

server_group_id str

the id of server group to be apply on the listener, is the id of resource alicloud.slb.ServerGroup.

ssl_certificate_id str

SLB Server certificate ID. It has been deprecated from 1.59.0 and using 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

Whether to enable session persistence, Valid values are on and off. Default to off.

sticky_session_type str

Mode for handling the cookie. If sticky_session is "on", it is mandatory. Otherwise, it will be ignored. Valid values are insert and server. insert means it is inserted from Server Load Balancer; server means the Server Load Balancer learns from the backend server.

tls_cipher_policy str

Https listener TLS cipher policy. Valid values are tls_cipher_policy_1_0, tls_cipher_policy_1_1, tls_cipher_policy_1_2, tls_cipher_policy_1_2_strict. Default to tls_cipher_policy_1_0. Currently the tls_cipher_policy can not be updated when load balancer instance is "Shared-Performance".

unhealthy_threshold int

The number of health checks that a healthy backend server must consecutively fail before it can be declared unhealthy. In this case, the health check state is changed from success to fail. It is required when health_check is on. Valid value range: [2-10] in seconds. Default to 3. NOTE: This parameter takes effect only if the health_check parameter is set to on.

x_forwarded_for ListenerXForwardedForArgs

Whether to set additional HTTP Header field "X-Forwarded-For" (documented below). Available in v1.13.0+. The details see Block x_forwarded_for.

frontendPort Number

Port used by the Server Load Balancer instance frontend. Valid value range: [1-65535].

loadBalancerId String

The Load Balancer ID which is used to launch a new listener.

protocol String

The protocol to listen on. Valid values are [http, https, tcp, udp].

aclId String

the id of access control list to be apply on the listener, is the id of resource alicloud_slb_acl. If acl_status is "on", it is mandatory. Otherwise, it will be ignored.

aclStatus String

Whether to enable "acl(access control list)", the acl is specified by acl_id. Valid values are on and off. Default to off.

aclType String

Mode for handling the acl specified by acl_id. If acl_status is "on", it is mandatory. Otherwise, it will be ignored. Valid values are white and black. white means the Listener can only be accessed by client ip belongs to the acl; black means the Listener can not be accessed by client ip belongs to the acl.

backendPort Number

Port used by the Server Load Balancer instance backend. Valid value range: [1-65535].

bandwidth Number

Bandwidth peak of Listener. For the public network instance charged per traffic consumed, the Bandwidth on Listener can be set to -1, indicating the bandwidth peak is unlimited. Valid values are [-1, 1-1000] in Mbps.

caCertificateId String

SLB CA certificate ID. Only when protocol is https can be specified.

cookie String

The cookie configured on the server. It is mandatory when sticky_session is "on" and sticky_session_type is "server". Otherwise, it will be ignored. Valid value:String in line with RFC 2965, with length being 1- 200. It only contains characters such as ASCII codes, English letters and digits instead of the comma, semicolon or spacing, and it cannot start with $.

cookieTimeout Number

Cookie timeout. It is mandatory when sticky_session is "on" and sticky_session_type is "insert". Otherwise, it will be ignored. Valid value range: [1-86400] in seconds.

deleteProtectionValidation Boolean

Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default to false.

description String

The description of slb listener. This description can have a string of 1 to 80 characters. Default value: null.

enableHttp2 String

Whether to enable https listener support http2 or not. Valid values are on and off. Default to on.

establishedTimeout Number

Timeout of tcp listener established connection idle timeout. Valid value range: [10-900] in seconds. Default to 900.

forwardPort Number

The port that http redirect to https.

gzip Boolean

Whether to enable "Gzip Compression". If enabled, files of specific file types will be compressed, otherwise, no files will be compressed. Default to true. Available in v1.13.0+.

healthCheck String

Whether to enable health check. Valid values areon and off. TCP and UDP listener's HealthCheck is always on, so it will be ignore when launching TCP or UDP listener.

healthCheckConnectPort Number

The port that is used for health checks. Valid value range: [0-65535]. Default to 0 means that the port on a backend server is used for health checks.

healthCheckDomain String

Domain name used for health check. When it used to launch TCP listener, health_check_type must be "http". Its length is limited to 1-80 and only characters such as letters, digits, ‘-‘ and ‘.’ are allowed. When it is not set or empty, Server Load Balancer uses the private network IP address of each backend server as Domain used for health check.

healthCheckHttpCode String

Regular health check HTTP status code. Multiple codes are segmented by “,”. It is required when health_check is on. Default to http_2xx. Valid values are: http_2xx, http_3xx, http_4xx and http_5xx.

healthCheckInterval Number

Time interval of health checks. It is required when health_check is on. Valid value range: [1-50] in seconds. Default to 2.

healthCheckMethod String

HealthCheckMethod used for health check.Valid values: ["head", "get"] http and https support regions ap-northeast-1, ap-southeast-1, ap-southeast-2, ap-southeast-3, us-east-1, us-west-1, eu-central-1, ap-south-1, me-east-1, cn-huhehaote, cn-zhangjiakou, ap-southeast-5, cn-shenzhen, cn-hongkong, cn-qingdao, cn-chengdu, eu-west-1, cn-hangzhou", cn-beijing, cn-shanghai.This function does not support the TCP protocol .

healthCheckTimeout Number

Maximum timeout of each health check response. It is required when health_check is on. Valid value range: [1-300] in seconds. Default to 5. Note: If health_check_timeout < health_check_interval, its will be replaced by health_check_interval.

healthCheckType String

Type of health check. Valid values are: tcp and http. Default to tcp . TCP supports TCP and HTTP health check mode, you can select the particular mode depending on your application.

healthCheckUri String

URI used for health check. When it used to launch TCP listener, health_check_type must be "http". Its length is limited to 1-80 and it must start with /. Only characters such as letters, digits, ‘-’, ‘/’, ‘.’, ‘%’, ‘?’, #’ and ‘&’ are allowed.

healthyThreshold Number

The number of health checks that an unhealthy backend server must consecutively pass before it can be declared healthy. In this case, the health check state is changed from fail to success. It is required when health_check is on. Valid value range: [2-10] in seconds. Default to 3. NOTE: This parameter takes effect only if the health_check parameter is set to on.

idleTimeout Number

Timeout of http or https listener established connection idle timeout. Valid value range: [1-60] in seconds. Default to 15.

instancePort Number

Deprecated:

Field 'instance_port' has been deprecated, and using 'backend_port' to replace.

lbPort Number

Deprecated:

Field 'lb_port' has been deprecated, and using 'frontend_port' to replace.

lbProtocol String

Deprecated:

Field 'lb_protocol' has been deprecated, and using 'protocol' to replace.

listenerForward String

Whether to enable http redirect to https, Valid values are on and off. Default to off.

masterSlaveServerGroupId String

The ID of the master slave server group.

persistenceTimeout Number

Timeout of connection persistence. Valid value range: [0-3600] in seconds. Default to 0 and means closing it.

requestTimeout Number

Timeout of http or https listener request (which does not get response from backend) timeout. Valid value range: [1-180] in seconds. Default to 60.

scheduler String

Scheduling algorithm, Valid values: wrr, rr, wlc, sch, tcp, qch. Default to wrr. Only when protocol is tcp or udp, scheduler can be set to sch. Only when instance is guaranteed-performance instance and protocol is tcp or udp, scheduler can be set to tch. Only when instance is guaranteed-performance instance and protocol is udp, scheduler can be set to qch.

serverCertificateId String

SLB Server certificate ID. It is required when protocol is https. The server_certificate_id is also required when the value of the ssl_certificate_id is Empty.

serverGroupId String

the id of server group to be apply on the listener, is the id of resource alicloud.slb.ServerGroup.

sslCertificateId String

SLB Server certificate ID. It has been deprecated from 1.59.0 and using server_certificate_id instead.

Deprecated:

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

stickySession String

Whether to enable session persistence, Valid values are on and off. Default to off.

stickySessionType String

Mode for handling the cookie. If sticky_session is "on", it is mandatory. Otherwise, it will be ignored. Valid values are insert and server. insert means it is inserted from Server Load Balancer; server means the Server Load Balancer learns from the backend server.

tlsCipherPolicy String

Https listener TLS cipher policy. Valid values are tls_cipher_policy_1_0, tls_cipher_policy_1_1, tls_cipher_policy_1_2, tls_cipher_policy_1_2_strict. Default to tls_cipher_policy_1_0. Currently the tls_cipher_policy can not be updated when load balancer instance is "Shared-Performance".

unhealthyThreshold Number

The number of health checks that a healthy backend server must consecutively fail before it can be declared unhealthy. In this case, the health check state is changed from success to fail. It is required when health_check is on. Valid value range: [2-10] in seconds. Default to 3. NOTE: This parameter takes effect only if the health_check parameter is set to on.

xForwardedFor Property Map

Whether to set additional HTTP Header field "X-Forwarded-For" (documented below). Available in v1.13.0+. The details see Block 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,
        instance_port: 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,
        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 access control list to be apply on the listener, is the id of resource alicloud_slb_acl. If acl_status is "on", it is mandatory. Otherwise, it will be ignored.

AclStatus string

Whether to enable "acl(access control list)", the acl is specified by acl_id. Valid values are on and off. Default to off.

AclType string

Mode for handling the acl specified by acl_id. If acl_status is "on", it is mandatory. Otherwise, it will be ignored. Valid values are white and black. white means the Listener can only be accessed by client ip belongs to the acl; black means the Listener can not be accessed by client ip belongs to the acl.

BackendPort int

Port used by the Server Load Balancer instance backend. Valid value range: [1-65535].

Bandwidth int

Bandwidth peak of Listener. For the public network instance charged per traffic consumed, the Bandwidth on Listener can be set to -1, indicating the bandwidth peak is unlimited. Valid values are [-1, 1-1000] in Mbps.

CaCertificateId string

SLB CA certificate ID. Only when protocol is https can be specified.

Cookie string

The cookie configured on the server. It is mandatory when sticky_session is "on" and sticky_session_type is "server". Otherwise, it will be ignored. Valid value:String in line with RFC 2965, with length being 1- 200. It only contains characters such as ASCII codes, English letters and digits instead of the comma, semicolon or spacing, and it cannot start with $.

CookieTimeout int

Cookie timeout. It is mandatory when sticky_session is "on" and sticky_session_type is "insert". Otherwise, it will be ignored. Valid value range: [1-86400] in seconds.

DeleteProtectionValidation bool

Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default to false.

Description string

The description of slb listener. This description can have a string of 1 to 80 characters. Default value: null.

EnableHttp2 string

Whether to enable https listener support http2 or not. Valid values are on and off. Default to on.

EstablishedTimeout int

Timeout of tcp listener established connection idle timeout. Valid value range: [10-900] in seconds. Default to 900.

ForwardPort int

The port that http redirect to https.

FrontendPort int

Port used by the Server Load Balancer instance frontend. Valid value range: [1-65535].

Gzip bool

Whether to enable "Gzip Compression". If enabled, files of specific file types will be compressed, otherwise, no files will be compressed. Default to true. Available in v1.13.0+.

HealthCheck string

Whether to enable health check. Valid values areon and off. TCP and UDP listener's HealthCheck is always on, so it will be ignore when launching TCP or UDP listener.

HealthCheckConnectPort int

The port that is used for health checks. Valid value range: [0-65535]. Default to 0 means that the port on a backend server is used for health checks.

HealthCheckDomain string

Domain name used for health check. When it used to launch TCP listener, health_check_type must be "http". Its length is limited to 1-80 and only characters such as letters, digits, ‘-‘ and ‘.’ are allowed. When it is not set or empty, Server Load Balancer uses the private network IP address of each backend server as Domain used for health check.

HealthCheckHttpCode string

Regular health check HTTP status code. Multiple codes are segmented by “,”. It is required when health_check is on. Default to http_2xx. Valid values are: http_2xx, http_3xx, http_4xx and http_5xx.

HealthCheckInterval int

Time interval of health checks. It is required when health_check is on. Valid value range: [1-50] in seconds. Default to 2.

HealthCheckMethod string

HealthCheckMethod used for health check.Valid values: ["head", "get"] http and https support regions ap-northeast-1, ap-southeast-1, ap-southeast-2, ap-southeast-3, us-east-1, us-west-1, eu-central-1, ap-south-1, me-east-1, cn-huhehaote, cn-zhangjiakou, ap-southeast-5, cn-shenzhen, cn-hongkong, cn-qingdao, cn-chengdu, eu-west-1, cn-hangzhou", cn-beijing, cn-shanghai.This function does not support the TCP protocol .

HealthCheckTimeout int

Maximum timeout of each health check response. It is required when health_check is on. Valid value range: [1-300] in seconds. Default to 5. Note: If health_check_timeout < health_check_interval, its will be replaced by health_check_interval.

HealthCheckType string

Type of health check. Valid values are: tcp and http. Default to tcp . TCP supports TCP and HTTP health check mode, you can select the particular mode depending on your application.

HealthCheckUri string

URI used for health check. When it used to launch TCP listener, health_check_type must be "http". Its length is limited to 1-80 and it must start with /. Only characters such as letters, digits, ‘-’, ‘/’, ‘.’, ‘%’, ‘?’, #’ and ‘&’ are allowed.

HealthyThreshold int

The number of health checks that an unhealthy backend server must consecutively pass before it can be declared healthy. In this case, the health check state is changed from fail to success. It is required when health_check is on. Valid value range: [2-10] in seconds. Default to 3. NOTE: This parameter takes effect only if the health_check parameter is set to on.

IdleTimeout int

Timeout of http or https listener established connection idle timeout. Valid value range: [1-60] in seconds. Default to 15.

InstancePort int

Deprecated:

Field 'instance_port' has been deprecated, and using 'backend_port' to replace.

LbPort int

Deprecated:

Field 'lb_port' has been deprecated, and using 'frontend_port' to replace.

LbProtocol string

Deprecated:

Field 'lb_protocol' has been deprecated, and using 'protocol' to replace.

ListenerForward string

Whether to enable http redirect to https, Valid values are on and off. Default to off.

LoadBalancerId string

The Load Balancer ID which is used to launch a new listener.

MasterSlaveServerGroupId string

The ID of the master slave server group.

PersistenceTimeout int

Timeout of connection persistence. Valid value range: [0-3600] in seconds. Default to 0 and means closing it.

Protocol string

The protocol to listen on. Valid values are [http, https, tcp, udp].

RequestTimeout int

Timeout of http or https listener request (which does not get response from backend) timeout. Valid value range: [1-180] in seconds. Default to 60.

Scheduler string

Scheduling algorithm, Valid values: wrr, rr, wlc, sch, tcp, qch. Default to wrr. Only when protocol is tcp or udp, scheduler can be set to sch. Only when instance is guaranteed-performance instance and protocol is tcp or udp, scheduler can be set to tch. Only when instance is guaranteed-performance instance and protocol is udp, scheduler can be set to qch.

ServerCertificateId string

SLB Server certificate ID. It is required when protocol is https. The server_certificate_id is also required when the value of the ssl_certificate_id is Empty.

ServerGroupId string

the id of server group to be apply on the listener, is the id of resource alicloud.slb.ServerGroup.

SslCertificateId string

SLB Server certificate ID. It has been deprecated from 1.59.0 and using server_certificate_id instead.

Deprecated:

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

StickySession string

Whether to enable session persistence, Valid values are on and off. Default to off.

StickySessionType string

Mode for handling the cookie. If sticky_session is "on", it is mandatory. Otherwise, it will be ignored. Valid values are insert and server. insert means it is inserted from Server Load Balancer; server means the Server Load Balancer learns from the backend server.

TlsCipherPolicy string

Https listener TLS cipher policy. Valid values are tls_cipher_policy_1_0, tls_cipher_policy_1_1, tls_cipher_policy_1_2, tls_cipher_policy_1_2_strict. Default to tls_cipher_policy_1_0. Currently the tls_cipher_policy can not be updated when load balancer instance is "Shared-Performance".

UnhealthyThreshold int

The number of health checks that a healthy backend server must consecutively fail before it can be declared unhealthy. In this case, the health check state is changed from success to fail. It is required when health_check is on. Valid value range: [2-10] in seconds. Default to 3. NOTE: This parameter takes effect only if the health_check parameter is set to on.

XForwardedFor Pulumi.AliCloud.Slb.Inputs.ListenerXForwardedForArgs

Whether to set additional HTTP Header field "X-Forwarded-For" (documented below). Available in v1.13.0+. The details see Block x_forwarded_for.

AclId string

the id of access control list to be apply on the listener, is the id of resource alicloud_slb_acl. If acl_status is "on", it is mandatory. Otherwise, it will be ignored.

AclStatus string

Whether to enable "acl(access control list)", the acl is specified by acl_id. Valid values are on and off. Default to off.

AclType string

Mode for handling the acl specified by acl_id. If acl_status is "on", it is mandatory. Otherwise, it will be ignored. Valid values are white and black. white means the Listener can only be accessed by client ip belongs to the acl; black means the Listener can not be accessed by client ip belongs to the acl.

BackendPort int

Port used by the Server Load Balancer instance backend. Valid value range: [1-65535].

Bandwidth int

Bandwidth peak of Listener. For the public network instance charged per traffic consumed, the Bandwidth on Listener can be set to -1, indicating the bandwidth peak is unlimited. Valid values are [-1, 1-1000] in Mbps.

CaCertificateId string

SLB CA certificate ID. Only when protocol is https can be specified.

Cookie string

The cookie configured on the server. It is mandatory when sticky_session is "on" and sticky_session_type is "server". Otherwise, it will be ignored. Valid value:String in line with RFC 2965, with length being 1- 200. It only contains characters such as ASCII codes, English letters and digits instead of the comma, semicolon or spacing, and it cannot start with $.

CookieTimeout int

Cookie timeout. It is mandatory when sticky_session is "on" and sticky_session_type is "insert". Otherwise, it will be ignored. Valid value range: [1-86400] in seconds.

DeleteProtectionValidation bool

Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default to false.

Description string

The description of slb listener. This description can have a string of 1 to 80 characters. Default value: null.

EnableHttp2 string

Whether to enable https listener support http2 or not. Valid values are on and off. Default to on.

EstablishedTimeout int

Timeout of tcp listener established connection idle timeout. Valid value range: [10-900] in seconds. Default to 900.

ForwardPort int

The port that http redirect to https.

FrontendPort int

Port used by the Server Load Balancer instance frontend. Valid value range: [1-65535].

Gzip bool

Whether to enable "Gzip Compression". If enabled, files of specific file types will be compressed, otherwise, no files will be compressed. Default to true. Available in v1.13.0+.

HealthCheck string

Whether to enable health check. Valid values areon and off. TCP and UDP listener's HealthCheck is always on, so it will be ignore when launching TCP or UDP listener.

HealthCheckConnectPort int

The port that is used for health checks. Valid value range: [0-65535]. Default to 0 means that the port on a backend server is used for health checks.

HealthCheckDomain string

Domain name used for health check. When it used to launch TCP listener, health_check_type must be "http". Its length is limited to 1-80 and only characters such as letters, digits, ‘-‘ and ‘.’ are allowed. When it is not set or empty, Server Load Balancer uses the private network IP address of each backend server as Domain used for health check.

HealthCheckHttpCode string

Regular health check HTTP status code. Multiple codes are segmented by “,”. It is required when health_check is on. Default to http_2xx. Valid values are: http_2xx, http_3xx, http_4xx and http_5xx.

HealthCheckInterval int

Time interval of health checks. It is required when health_check is on. Valid value range: [1-50] in seconds. Default to 2.

HealthCheckMethod string

HealthCheckMethod used for health check.Valid values: ["head", "get"] http and https support regions ap-northeast-1, ap-southeast-1, ap-southeast-2, ap-southeast-3, us-east-1, us-west-1, eu-central-1, ap-south-1, me-east-1, cn-huhehaote, cn-zhangjiakou, ap-southeast-5, cn-shenzhen, cn-hongkong, cn-qingdao, cn-chengdu, eu-west-1, cn-hangzhou", cn-beijing, cn-shanghai.This function does not support the TCP protocol .

HealthCheckTimeout int

Maximum timeout of each health check response. It is required when health_check is on. Valid value range: [1-300] in seconds. Default to 5. Note: If health_check_timeout < health_check_interval, its will be replaced by health_check_interval.

HealthCheckType string

Type of health check. Valid values are: tcp and http. Default to tcp . TCP supports TCP and HTTP health check mode, you can select the particular mode depending on your application.

HealthCheckUri string

URI used for health check. When it used to launch TCP listener, health_check_type must be "http". Its length is limited to 1-80 and it must start with /. Only characters such as letters, digits, ‘-’, ‘/’, ‘.’, ‘%’, ‘?’, #’ and ‘&’ are allowed.

HealthyThreshold int

The number of health checks that an unhealthy backend server must consecutively pass before it can be declared healthy. In this case, the health check state is changed from fail to success. It is required when health_check is on. Valid value range: [2-10] in seconds. Default to 3. NOTE: This parameter takes effect only if the health_check parameter is set to on.

IdleTimeout int

Timeout of http or https listener established connection idle timeout. Valid value range: [1-60] in seconds. Default to 15.

InstancePort int

Deprecated:

Field 'instance_port' has been deprecated, and using 'backend_port' to replace.

LbPort int

Deprecated:

Field 'lb_port' has been deprecated, and using 'frontend_port' to replace.

LbProtocol string

Deprecated:

Field 'lb_protocol' has been deprecated, and using 'protocol' to replace.

ListenerForward string

Whether to enable http redirect to https, Valid values are on and off. Default to off.

LoadBalancerId string

The Load Balancer ID which is used to launch a new listener.

MasterSlaveServerGroupId string

The ID of the master slave server group.

PersistenceTimeout int

Timeout of connection persistence. Valid value range: [0-3600] in seconds. Default to 0 and means closing it.

Protocol string

The protocol to listen on. Valid values are [http, https, tcp, udp].

RequestTimeout int

Timeout of http or https listener request (which does not get response from backend) timeout. Valid value range: [1-180] in seconds. Default to 60.

Scheduler string

Scheduling algorithm, Valid values: wrr, rr, wlc, sch, tcp, qch. Default to wrr. Only when protocol is tcp or udp, scheduler can be set to sch. Only when instance is guaranteed-performance instance and protocol is tcp or udp, scheduler can be set to tch. Only when instance is guaranteed-performance instance and protocol is udp, scheduler can be set to qch.

ServerCertificateId string

SLB Server certificate ID. It is required when protocol is https. The server_certificate_id is also required when the value of the ssl_certificate_id is Empty.

ServerGroupId string

the id of server group to be apply on the listener, is the id of resource alicloud.slb.ServerGroup.

SslCertificateId string

SLB Server certificate ID. It has been deprecated from 1.59.0 and using server_certificate_id instead.

Deprecated:

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

StickySession string

Whether to enable session persistence, Valid values are on and off. Default to off.

StickySessionType string

Mode for handling the cookie. If sticky_session is "on", it is mandatory. Otherwise, it will be ignored. Valid values are insert and server. insert means it is inserted from Server Load Balancer; server means the Server Load Balancer learns from the backend server.

TlsCipherPolicy string

Https listener TLS cipher policy. Valid values are tls_cipher_policy_1_0, tls_cipher_policy_1_1, tls_cipher_policy_1_2, tls_cipher_policy_1_2_strict. Default to tls_cipher_policy_1_0. Currently the tls_cipher_policy can not be updated when load balancer instance is "Shared-Performance".

UnhealthyThreshold int

The number of health checks that a healthy backend server must consecutively fail before it can be declared unhealthy. In this case, the health check state is changed from success to fail. It is required when health_check is on. Valid value range: [2-10] in seconds. Default to 3. NOTE: This parameter takes effect only if the health_check parameter is set to on.

XForwardedFor ListenerXForwardedForArgs

Whether to set additional HTTP Header field "X-Forwarded-For" (documented below). Available in v1.13.0+. The details see Block x_forwarded_for.

aclId String

the id of access control list to be apply on the listener, is the id of resource alicloud_slb_acl. If acl_status is "on", it is mandatory. Otherwise, it will be ignored.

aclStatus String

Whether to enable "acl(access control list)", the acl is specified by acl_id. Valid values are on and off. Default to off.

aclType String

Mode for handling the acl specified by acl_id. If acl_status is "on", it is mandatory. Otherwise, it will be ignored. Valid values are white and black. white means the Listener can only be accessed by client ip belongs to the acl; black means the Listener can not be accessed by client ip belongs to the acl.

backendPort Integer

Port used by the Server Load Balancer instance backend. Valid value range: [1-65535].

bandwidth Integer

Bandwidth peak of Listener. For the public network instance charged per traffic consumed, the Bandwidth on Listener can be set to -1, indicating the bandwidth peak is unlimited. Valid values are [-1, 1-1000] in Mbps.

caCertificateId String

SLB CA certificate ID. Only when protocol is https can be specified.

cookie String

The cookie configured on the server. It is mandatory when sticky_session is "on" and sticky_session_type is "server". Otherwise, it will be ignored. Valid value:String in line with RFC 2965, with length being 1- 200. It only contains characters such as ASCII codes, English letters and digits instead of the comma, semicolon or spacing, and it cannot start with $.

cookieTimeout Integer

Cookie timeout. It is mandatory when sticky_session is "on" and sticky_session_type is "insert". Otherwise, it will be ignored. Valid value range: [1-86400] in seconds.

deleteProtectionValidation Boolean

Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default to false.

description String

The description of slb listener. This description can have a string of 1 to 80 characters. Default value: null.

enableHttp2 String

Whether to enable https listener support http2 or not. Valid values are on and off. Default to on.

establishedTimeout Integer

Timeout of tcp listener established connection idle timeout. Valid value range: [10-900] in seconds. Default to 900.

forwardPort Integer

The port that http redirect to https.

frontendPort Integer

Port used by the Server Load Balancer instance frontend. Valid value range: [1-65535].

gzip Boolean

Whether to enable "Gzip Compression". If enabled, files of specific file types will be compressed, otherwise, no files will be compressed. Default to true. Available in v1.13.0+.

healthCheck String

Whether to enable health check. Valid values areon and off. TCP and UDP listener's HealthCheck is always on, so it will be ignore when launching TCP or UDP listener.

healthCheckConnectPort Integer

The port that is used for health checks. Valid value range: [0-65535]. Default to 0 means that the port on a backend server is used for health checks.

healthCheckDomain String

Domain name used for health check. When it used to launch TCP listener, health_check_type must be "http". Its length is limited to 1-80 and only characters such as letters, digits, ‘-‘ and ‘.’ are allowed. When it is not set or empty, Server Load Balancer uses the private network IP address of each backend server as Domain used for health check.

healthCheckHttpCode String

Regular health check HTTP status code. Multiple codes are segmented by “,”. It is required when health_check is on. Default to http_2xx. Valid values are: http_2xx, http_3xx, http_4xx and http_5xx.

healthCheckInterval Integer

Time interval of health checks. It is required when health_check is on. Valid value range: [1-50] in seconds. Default to 2.

healthCheckMethod String

HealthCheckMethod used for health check.Valid values: ["head", "get"] http and https support regions ap-northeast-1, ap-southeast-1, ap-southeast-2, ap-southeast-3, us-east-1, us-west-1, eu-central-1, ap-south-1, me-east-1, cn-huhehaote, cn-zhangjiakou, ap-southeast-5, cn-shenzhen, cn-hongkong, cn-qingdao, cn-chengdu, eu-west-1, cn-hangzhou", cn-beijing, cn-shanghai.This function does not support the TCP protocol .

healthCheckTimeout Integer

Maximum timeout of each health check response. It is required when health_check is on. Valid value range: [1-300] in seconds. Default to 5. Note: If health_check_timeout < health_check_interval, its will be replaced by health_check_interval.

healthCheckType String

Type of health check. Valid values are: tcp and http. Default to tcp . TCP supports TCP and HTTP health check mode, you can select the particular mode depending on your application.

healthCheckUri String

URI used for health check. When it used to launch TCP listener, health_check_type must be "http". Its length is limited to 1-80 and it must start with /. Only characters such as letters, digits, ‘-’, ‘/’, ‘.’, ‘%’, ‘?’, #’ and ‘&’ are allowed.

healthyThreshold Integer

The number of health checks that an unhealthy backend server must consecutively pass before it can be declared healthy. In this case, the health check state is changed from fail to success. It is required when health_check is on. Valid value range: [2-10] in seconds. Default to 3. NOTE: This parameter takes effect only if the health_check parameter is set to on.

idleTimeout Integer

Timeout of http or https listener established connection idle timeout. Valid value range: [1-60] in seconds. Default to 15.

instancePort Integer

Deprecated:

Field 'instance_port' has been deprecated, and using 'backend_port' to replace.

lbPort Integer

Deprecated:

Field 'lb_port' has been deprecated, and using 'frontend_port' to replace.

lbProtocol String

Deprecated:

Field 'lb_protocol' has been deprecated, and using 'protocol' to replace.

listenerForward String

Whether to enable http redirect to https, Valid values are on and off. Default to off.

loadBalancerId String

The Load Balancer ID which is used to launch a new listener.

masterSlaveServerGroupId String

The ID of the master slave server group.

persistenceTimeout Integer

Timeout of connection persistence. Valid value range: [0-3600] in seconds. Default to 0 and means closing it.

protocol String

The protocol to listen on. Valid values are [http, https, tcp, udp].

requestTimeout Integer

Timeout of http or https listener request (which does not get response from backend) timeout. Valid value range: [1-180] in seconds. Default to 60.

scheduler String

Scheduling algorithm, Valid values: wrr, rr, wlc, sch, tcp, qch. Default to wrr. Only when protocol is tcp or udp, scheduler can be set to sch. Only when instance is guaranteed-performance instance and protocol is tcp or udp, scheduler can be set to tch. Only when instance is guaranteed-performance instance and protocol is udp, scheduler can be set to qch.

serverCertificateId String

SLB Server certificate ID. It is required when protocol is https. The server_certificate_id is also required when the value of the ssl_certificate_id is Empty.

serverGroupId String

the id of server group to be apply on the listener, is the id of resource alicloud.slb.ServerGroup.

sslCertificateId String

SLB Server certificate ID. It has been deprecated from 1.59.0 and using server_certificate_id instead.

Deprecated:

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

stickySession String

Whether to enable session persistence, Valid values are on and off. Default to off.

stickySessionType String

Mode for handling the cookie. If sticky_session is "on", it is mandatory. Otherwise, it will be ignored. Valid values are insert and server. insert means it is inserted from Server Load Balancer; server means the Server Load Balancer learns from the backend server.

tlsCipherPolicy String

Https listener TLS cipher policy. Valid values are tls_cipher_policy_1_0, tls_cipher_policy_1_1, tls_cipher_policy_1_2, tls_cipher_policy_1_2_strict. Default to tls_cipher_policy_1_0. Currently the tls_cipher_policy can not be updated when load balancer instance is "Shared-Performance".

unhealthyThreshold Integer

The number of health checks that a healthy backend server must consecutively fail before it can be declared unhealthy. In this case, the health check state is changed from success to fail. It is required when health_check is on. Valid value range: [2-10] in seconds. Default to 3. NOTE: This parameter takes effect only if the health_check parameter is set to on.

xForwardedFor ListenerXForwardedForArgs

Whether to set additional HTTP Header field "X-Forwarded-For" (documented below). Available in v1.13.0+. The details see Block x_forwarded_for.

aclId string

the id of access control list to be apply on the listener, is the id of resource alicloud_slb_acl. If acl_status is "on", it is mandatory. Otherwise, it will be ignored.

aclStatus string

Whether to enable "acl(access control list)", the acl is specified by acl_id. Valid values are on and off. Default to off.

aclType string

Mode for handling the acl specified by acl_id. If acl_status is "on", it is mandatory. Otherwise, it will be ignored. Valid values are white and black. white means the Listener can only be accessed by client ip belongs to the acl; black means the Listener can not be accessed by client ip belongs to the acl.

backendPort number

Port used by the Server Load Balancer instance backend. Valid value range: [1-65535].

bandwidth number

Bandwidth peak of Listener. For the public network instance charged per traffic consumed, the Bandwidth on Listener can be set to -1, indicating the bandwidth peak is unlimited. Valid values are [-1, 1-1000] in Mbps.

caCertificateId string

SLB CA certificate ID. Only when protocol is https can be specified.

cookie string

The cookie configured on the server. It is mandatory when sticky_session is "on" and sticky_session_type is "server". Otherwise, it will be ignored. Valid value:String in line with RFC 2965, with length being 1- 200. It only contains characters such as ASCII codes, English letters and digits instead of the comma, semicolon or spacing, and it cannot start with $.

cookieTimeout number

Cookie timeout. It is mandatory when sticky_session is "on" and sticky_session_type is "insert". Otherwise, it will be ignored. Valid value range: [1-86400] in seconds.

deleteProtectionValidation boolean

Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default to false.

description string

The description of slb listener. This description can have a string of 1 to 80 characters. Default value: null.

enableHttp2 string

Whether to enable https listener support http2 or not. Valid values are on and off. Default to on.

establishedTimeout number

Timeout of tcp listener established connection idle timeout. Valid value range: [10-900] in seconds. Default to 900.

forwardPort number

The port that http redirect to https.

frontendPort number

Port used by the Server Load Balancer instance frontend. Valid value range: [1-65535].

gzip boolean

Whether to enable "Gzip Compression". If enabled, files of specific file types will be compressed, otherwise, no files will be compressed. Default to true. Available in v1.13.0+.

healthCheck string

Whether to enable health check. Valid values areon and off. TCP and UDP listener's HealthCheck is always on, so it will be ignore when launching TCP or UDP listener.

healthCheckConnectPort number

The port that is used for health checks. Valid value range: [0-65535]. Default to 0 means that the port on a backend server is used for health checks.

healthCheckDomain string

Domain name used for health check. When it used to launch TCP listener, health_check_type must be "http". Its length is limited to 1-80 and only characters such as letters, digits, ‘-‘ and ‘.’ are allowed. When it is not set or empty, Server Load Balancer uses the private network IP address of each backend server as Domain used for health check.

healthCheckHttpCode string

Regular health check HTTP status code. Multiple codes are segmented by “,”. It is required when health_check is on. Default to http_2xx. Valid values are: http_2xx, http_3xx, http_4xx and http_5xx.

healthCheckInterval number

Time interval of health checks. It is required when health_check is on. Valid value range: [1-50] in seconds. Default to 2.

healthCheckMethod string

HealthCheckMethod used for health check.Valid values: ["head", "get"] http and https support regions ap-northeast-1, ap-southeast-1, ap-southeast-2, ap-southeast-3, us-east-1, us-west-1, eu-central-1, ap-south-1, me-east-1, cn-huhehaote, cn-zhangjiakou, ap-southeast-5, cn-shenzhen, cn-hongkong, cn-qingdao, cn-chengdu, eu-west-1, cn-hangzhou", cn-beijing, cn-shanghai.This function does not support the TCP protocol .

healthCheckTimeout number

Maximum timeout of each health check response. It is required when health_check is on. Valid value range: [1-300] in seconds. Default to 5. Note: If health_check_timeout < health_check_interval, its will be replaced by health_check_interval.

healthCheckType string

Type of health check. Valid values are: tcp and http. Default to tcp . TCP supports TCP and HTTP health check mode, you can select the particular mode depending on your application.

healthCheckUri string

URI used for health check. When it used to launch TCP listener, health_check_type must be "http". Its length is limited to 1-80 and it must start with /. Only characters such as letters, digits, ‘-’, ‘/’, ‘.’, ‘%’, ‘?’, #’ and ‘&’ are allowed.

healthyThreshold number

The number of health checks that an unhealthy backend server must consecutively pass before it can be declared healthy. In this case, the health check state is changed from fail to success. It is required when health_check is on. Valid value range: [2-10] in seconds. Default to 3. NOTE: This parameter takes effect only if the health_check parameter is set to on.

idleTimeout number

Timeout of http or https listener established connection idle timeout. Valid value range: [1-60] in seconds. Default to 15.

instancePort number

Deprecated:

Field 'instance_port' has been deprecated, and using 'backend_port' to replace.

lbPort number

Deprecated:

Field 'lb_port' has been deprecated, and using 'frontend_port' to replace.

lbProtocol string

Deprecated:

Field 'lb_protocol' has been deprecated, and using 'protocol' to replace.

listenerForward string

Whether to enable http redirect to https, Valid values are on and off. Default to off.

loadBalancerId string

The Load Balancer ID which is used to launch a new listener.

masterSlaveServerGroupId string

The ID of the master slave server group.

persistenceTimeout number

Timeout of connection persistence. Valid value range: [0-3600] in seconds. Default to 0 and means closing it.

protocol string

The protocol to listen on. Valid values are [http, https, tcp, udp].

requestTimeout number

Timeout of http or https listener request (which does not get response from backend) timeout. Valid value range: [1-180] in seconds. Default to 60.

scheduler string

Scheduling algorithm, Valid values: wrr, rr, wlc, sch, tcp, qch. Default to wrr. Only when protocol is tcp or udp, scheduler can be set to sch. Only when instance is guaranteed-performance instance and protocol is tcp or udp, scheduler can be set to tch. Only when instance is guaranteed-performance instance and protocol is udp, scheduler can be set to qch.

serverCertificateId string

SLB Server certificate ID. It is required when protocol is https. The server_certificate_id is also required when the value of the ssl_certificate_id is Empty.

serverGroupId string

the id of server group to be apply on the listener, is the id of resource alicloud.slb.ServerGroup.

sslCertificateId string

SLB Server certificate ID. It has been deprecated from 1.59.0 and using server_certificate_id instead.

Deprecated:

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

stickySession string

Whether to enable session persistence, Valid values are on and off. Default to off.

stickySessionType string

Mode for handling the cookie. If sticky_session is "on", it is mandatory. Otherwise, it will be ignored. Valid values are insert and server. insert means it is inserted from Server Load Balancer; server means the Server Load Balancer learns from the backend server.

tlsCipherPolicy string

Https listener TLS cipher policy. Valid values are tls_cipher_policy_1_0, tls_cipher_policy_1_1, tls_cipher_policy_1_2, tls_cipher_policy_1_2_strict. Default to tls_cipher_policy_1_0. Currently the tls_cipher_policy can not be updated when load balancer instance is "Shared-Performance".

unhealthyThreshold number

The number of health checks that a healthy backend server must consecutively fail before it can be declared unhealthy. In this case, the health check state is changed from success to fail. It is required when health_check is on. Valid value range: [2-10] in seconds. Default to 3. NOTE: This parameter takes effect only if the health_check parameter is set to on.

xForwardedFor ListenerXForwardedForArgs

Whether to set additional HTTP Header field "X-Forwarded-For" (documented below). Available in v1.13.0+. The details see Block x_forwarded_for.

acl_id str

the id of access control list to be apply on the listener, is the id of resource alicloud_slb_acl. If acl_status is "on", it is mandatory. Otherwise, it will be ignored.

acl_status str

Whether to enable "acl(access control list)", the acl is specified by acl_id. Valid values are on and off. Default to off.

acl_type str

Mode for handling the acl specified by acl_id. If acl_status is "on", it is mandatory. Otherwise, it will be ignored. Valid values are white and black. white means the Listener can only be accessed by client ip belongs to the acl; black means the Listener can not be accessed by client ip belongs to the acl.

backend_port int

Port used by the Server Load Balancer instance backend. Valid value range: [1-65535].

bandwidth int

Bandwidth peak of Listener. For the public network instance charged per traffic consumed, the Bandwidth on Listener can be set to -1, indicating the bandwidth peak is unlimited. Valid values are [-1, 1-1000] in Mbps.

ca_certificate_id str

SLB CA certificate ID. Only when protocol is https can be specified.

cookie str

The cookie configured on the server. It is mandatory when sticky_session is "on" and sticky_session_type is "server". Otherwise, it will be ignored. Valid value:String in line with RFC 2965, with length being 1- 200. It only contains characters such as ASCII codes, English letters and digits instead of the comma, semicolon or spacing, and it cannot start with $.

cookie_timeout int

Cookie timeout. It is mandatory when sticky_session is "on" and sticky_session_type is "insert". Otherwise, it will be ignored. Valid value range: [1-86400] in seconds.

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 to false.

description str

The description of slb listener. This description can have a string of 1 to 80 characters. Default value: null.

enable_http2 str

Whether to enable https listener support http2 or not. Valid values are on and off. Default to on.

established_timeout int

Timeout of tcp listener established connection idle timeout. Valid value range: [10-900] in seconds. Default to 900.

forward_port int

The port that http redirect to https.

frontend_port int

Port used by the Server Load Balancer instance frontend. Valid value range: [1-65535].

gzip bool

Whether to enable "Gzip Compression". If enabled, files of specific file types will be compressed, otherwise, no files will be compressed. Default to true. Available in v1.13.0+.

health_check str

Whether to enable health check. Valid values areon and off. TCP and UDP listener's HealthCheck is always on, so it will be ignore when launching TCP or UDP listener.

health_check_connect_port int

The port that is used for health checks. Valid value range: [0-65535]. Default to 0 means that the port on a backend server is used for health checks.

health_check_domain str

Domain name used for health check. When it used to launch TCP listener, health_check_type must be "http". Its length is limited to 1-80 and only characters such as letters, digits, ‘-‘ and ‘.’ are allowed. When it is not set or empty, Server Load Balancer uses the private network IP address of each backend server as Domain used for health check.

health_check_http_code str

Regular health check HTTP status code. Multiple codes are segmented by “,”. It is required when health_check is on. Default to http_2xx. Valid values are: http_2xx, http_3xx, http_4xx and http_5xx.

health_check_interval int

Time interval of health checks. It is required when health_check is on. Valid value range: [1-50] in seconds. Default to 2.

health_check_method str

HealthCheckMethod used for health check.Valid values: ["head", "get"] http and https support regions ap-northeast-1, ap-southeast-1, ap-southeast-2, ap-southeast-3, us-east-1, us-west-1, eu-central-1, ap-south-1, me-east-1, cn-huhehaote, cn-zhangjiakou, ap-southeast-5, cn-shenzhen, cn-hongkong, cn-qingdao, cn-chengdu, eu-west-1, cn-hangzhou", cn-beijing, cn-shanghai.This function does not support the TCP protocol .

health_check_timeout int

Maximum timeout of each health check response. It is required when health_check is on. Valid value range: [1-300] in seconds. Default to 5. Note: If health_check_timeout < health_check_interval, its will be replaced by health_check_interval.

health_check_type str

Type of health check. Valid values are: tcp and http. Default to tcp . TCP supports TCP and HTTP health check mode, you can select the particular mode depending on your application.

health_check_uri str

URI used for health check. When it used to launch TCP listener, health_check_type must be "http". Its length is limited to 1-80 and it must start with /. Only characters such as letters, digits, ‘-’, ‘/’, ‘.’, ‘%’, ‘?’, #’ and ‘&’ are allowed.

healthy_threshold int

The number of health checks that an unhealthy backend server must consecutively pass before it can be declared healthy. In this case, the health check state is changed from fail to success. It is required when health_check is on. Valid value range: [2-10] in seconds. Default to 3. NOTE: This parameter takes effect only if the health_check parameter is set to on.

idle_timeout int

Timeout of http or https listener established connection idle timeout. Valid value range: [1-60] in seconds. Default to 15.

instance_port int

Deprecated:

Field 'instance_port' has been deprecated, and using 'backend_port' to replace.

lb_port int

Deprecated:

Field 'lb_port' has been deprecated, and using 'frontend_port' to replace.

lb_protocol str

Deprecated:

Field 'lb_protocol' has been deprecated, and using 'protocol' to replace.

listener_forward str

Whether to enable http redirect to https, Valid values are on and off. Default to 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 master slave server group.

persistence_timeout int

Timeout of connection persistence. Valid value range: [0-3600] in seconds. Default to 0 and means closing it.

protocol str

The protocol to listen on. Valid values are [http, https, tcp, udp].

request_timeout int

Timeout of http or https listener request (which does not get response from backend) timeout. Valid value range: [1-180] in seconds. Default to 60.

scheduler str

Scheduling algorithm, Valid values: wrr, rr, wlc, sch, tcp, qch. Default to wrr. Only when protocol is tcp or udp, scheduler can be set to sch. Only when instance is guaranteed-performance instance and protocol is tcp or udp, scheduler can be set to tch. Only when instance is guaranteed-performance instance and protocol is udp, scheduler can be set to qch.

server_certificate_id str

SLB Server certificate ID. It is required when protocol is https. The server_certificate_id is also required when the value of the ssl_certificate_id is Empty.

server_group_id str

the id of server group to be apply on the listener, is the id of resource alicloud.slb.ServerGroup.

ssl_certificate_id str

SLB Server certificate ID. It has been deprecated from 1.59.0 and using 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

Whether to enable session persistence, Valid values are on and off. Default to off.

sticky_session_type str

Mode for handling the cookie. If sticky_session is "on", it is mandatory. Otherwise, it will be ignored. Valid values are insert and server. insert means it is inserted from Server Load Balancer; server means the Server Load Balancer learns from the backend server.

tls_cipher_policy str

Https listener TLS cipher policy. Valid values are tls_cipher_policy_1_0, tls_cipher_policy_1_1, tls_cipher_policy_1_2, tls_cipher_policy_1_2_strict. Default to tls_cipher_policy_1_0. Currently the tls_cipher_policy can not be updated when load balancer instance is "Shared-Performance".

unhealthy_threshold int

The number of health checks that a healthy backend server must consecutively fail before it can be declared unhealthy. In this case, the health check state is changed from success to fail. It is required when health_check is on. Valid value range: [2-10] in seconds. Default to 3. NOTE: This parameter takes effect only if the health_check parameter is set to on.

x_forwarded_for ListenerXForwardedForArgs

Whether to set additional HTTP Header field "X-Forwarded-For" (documented below). Available in v1.13.0+. The details see Block x_forwarded_for.

aclId String

the id of access control list to be apply on the listener, is the id of resource alicloud_slb_acl. If acl_status is "on", it is mandatory. Otherwise, it will be ignored.

aclStatus String

Whether to enable "acl(access control list)", the acl is specified by acl_id. Valid values are on and off. Default to off.

aclType String

Mode for handling the acl specified by acl_id. If acl_status is "on", it is mandatory. Otherwise, it will be ignored. Valid values are white and black. white means the Listener can only be accessed by client ip belongs to the acl; black means the Listener can not be accessed by client ip belongs to the acl.

backendPort Number

Port used by the Server Load Balancer instance backend. Valid value range: [1-65535].

bandwidth Number

Bandwidth peak of Listener. For the public network instance charged per traffic consumed, the Bandwidth on Listener can be set to -1, indicating the bandwidth peak is unlimited. Valid values are [-1, 1-1000] in Mbps.

caCertificateId String

SLB CA certificate ID. Only when protocol is https can be specified.

cookie String

The cookie configured on the server. It is mandatory when sticky_session is "on" and sticky_session_type is "server". Otherwise, it will be ignored. Valid value:String in line with RFC 2965, with length being 1- 200. It only contains characters such as ASCII codes, English letters and digits instead of the comma, semicolon or spacing, and it cannot start with $.

cookieTimeout Number

Cookie timeout. It is mandatory when sticky_session is "on" and sticky_session_type is "insert". Otherwise, it will be ignored. Valid value range: [1-86400] in seconds.

deleteProtectionValidation Boolean

Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default to false.

description String

The description of slb listener. This description can have a string of 1 to 80 characters. Default value: null.

enableHttp2 String

Whether to enable https listener support http2 or not. Valid values are on and off. Default to on.

establishedTimeout Number

Timeout of tcp listener established connection idle timeout. Valid value range: [10-900] in seconds. Default to 900.

forwardPort Number

The port that http redirect to https.

frontendPort Number

Port used by the Server Load Balancer instance frontend. Valid value range: [1-65535].

gzip Boolean

Whether to enable "Gzip Compression". If enabled, files of specific file types will be compressed, otherwise, no files will be compressed. Default to true. Available in v1.13.0+.

healthCheck String

Whether to enable health check. Valid values areon and off. TCP and UDP listener's HealthCheck is always on, so it will be ignore when launching TCP or UDP listener.

healthCheckConnectPort Number

The port that is used for health checks. Valid value range: [0-65535]. Default to 0 means that the port on a backend server is used for health checks.

healthCheckDomain String

Domain name used for health check. When it used to launch TCP listener, health_check_type must be "http". Its length is limited to 1-80 and only characters such as letters, digits, ‘-‘ and ‘.’ are allowed. When it is not set or empty, Server Load Balancer uses the private network IP address of each backend server as Domain used for health check.

healthCheckHttpCode String

Regular health check HTTP status code. Multiple codes are segmented by “,”. It is required when health_check is on. Default to http_2xx. Valid values are: http_2xx, http_3xx, http_4xx and http_5xx.

healthCheckInterval Number

Time interval of health checks. It is required when health_check is on. Valid value range: [1-50] in seconds. Default to 2.

healthCheckMethod String

HealthCheckMethod used for health check.Valid values: ["head", "get"] http and https support regions ap-northeast-1, ap-southeast-1, ap-southeast-2, ap-southeast-3, us-east-1, us-west-1, eu-central-1, ap-south-1, me-east-1, cn-huhehaote, cn-zhangjiakou, ap-southeast-5, cn-shenzhen, cn-hongkong, cn-qingdao, cn-chengdu, eu-west-1, cn-hangzhou", cn-beijing, cn-shanghai.This function does not support the TCP protocol .

healthCheckTimeout Number

Maximum timeout of each health check response. It is required when health_check is on. Valid value range: [1-300] in seconds. Default to 5. Note: If health_check_timeout < health_check_interval, its will be replaced by health_check_interval.

healthCheckType String

Type of health check. Valid values are: tcp and http. Default to tcp . TCP supports TCP and HTTP health check mode, you can select the particular mode depending on your application.

healthCheckUri String

URI used for health check. When it used to launch TCP listener, health_check_type must be "http". Its length is limited to 1-80 and it must start with /. Only characters such as letters, digits, ‘-’, ‘/’, ‘.’, ‘%’, ‘?’, #’ and ‘&’ are allowed.

healthyThreshold Number

The number of health checks that an unhealthy backend server must consecutively pass before it can be declared healthy. In this case, the health check state is changed from fail to success. It is required when health_check is on. Valid value range: [2-10] in seconds. Default to 3. NOTE: This parameter takes effect only if the health_check parameter is set to on.

idleTimeout Number

Timeout of http or https listener established connection idle timeout. Valid value range: [1-60] in seconds. Default to 15.

instancePort Number

Deprecated:

Field 'instance_port' has been deprecated, and using 'backend_port' to replace.

lbPort Number

Deprecated:

Field 'lb_port' has been deprecated, and using 'frontend_port' to replace.

lbProtocol String

Deprecated:

Field 'lb_protocol' has been deprecated, and using 'protocol' to replace.

listenerForward String

Whether to enable http redirect to https, Valid values are on and off. Default to off.

loadBalancerId String

The Load Balancer ID which is used to launch a new listener.

masterSlaveServerGroupId String

The ID of the master slave server group.

persistenceTimeout Number

Timeout of connection persistence. Valid value range: [0-3600] in seconds. Default to 0 and means closing it.

protocol String

The protocol to listen on. Valid values are [http, https, tcp, udp].

requestTimeout Number

Timeout of http or https listener request (which does not get response from backend) timeout. Valid value range: [1-180] in seconds. Default to 60.

scheduler String

Scheduling algorithm, Valid values: wrr, rr, wlc, sch, tcp, qch. Default to wrr. Only when protocol is tcp or udp, scheduler can be set to sch. Only when instance is guaranteed-performance instance and protocol is tcp or udp, scheduler can be set to tch. Only when instance is guaranteed-performance instance and protocol is udp, scheduler can be set to qch.

serverCertificateId String

SLB Server certificate ID. It is required when protocol is https. The server_certificate_id is also required when the value of the ssl_certificate_id is Empty.

serverGroupId String

the id of server group to be apply on the listener, is the id of resource alicloud.slb.ServerGroup.

sslCertificateId String

SLB Server certificate ID. It has been deprecated from 1.59.0 and using server_certificate_id instead.

Deprecated:

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

stickySession String

Whether to enable session persistence, Valid values are on and off. Default to off.

stickySessionType String

Mode for handling the cookie. If sticky_session is "on", it is mandatory. Otherwise, it will be ignored. Valid values are insert and server. insert means it is inserted from Server Load Balancer; server means the Server Load Balancer learns from the backend server.

tlsCipherPolicy String

Https listener TLS cipher policy. Valid values are tls_cipher_policy_1_0, tls_cipher_policy_1_1, tls_cipher_policy_1_2, tls_cipher_policy_1_2_strict. Default to tls_cipher_policy_1_0. Currently the tls_cipher_policy can not be updated when load balancer instance is "Shared-Performance".

unhealthyThreshold Number

The number of health checks that a healthy backend server must consecutively fail before it can be declared unhealthy. In this case, the health check state is changed from success to fail. It is required when health_check is on. Valid value range: [2-10] in seconds. Default to 3. NOTE: This parameter takes effect only if the health_check parameter is set to on.

xForwardedFor Property Map

Whether to set additional HTTP Header field "X-Forwarded-For" (documented below). Available in v1.13.0+. The details see Block x_forwarded_for.

Supporting Types

ListenerXForwardedFor

RetriveClientIp bool
RetriveSlbId bool

Whether to use the XForwardedFor header to obtain the ID of the SLB instance. Default to false.

RetriveSlbIp bool

Whether to use the XForwardedFor_SLBIP header to obtain the public IP address of the SLB instance. Default to false.

RetriveSlbProto bool

Whether to use the XForwardedFor_proto header to obtain the protocol used by the listener. Default to false.

RetriveClientIp bool
RetriveSlbId bool

Whether to use the XForwardedFor header to obtain the ID of the SLB instance. Default to false.

RetriveSlbIp bool

Whether to use the XForwardedFor_SLBIP header to obtain the public IP address of the SLB instance. Default to false.

RetriveSlbProto bool

Whether to use the XForwardedFor_proto header to obtain the protocol used by the listener. Default to false.

retriveClientIp Boolean
retriveSlbId Boolean

Whether to use the XForwardedFor header to obtain the ID of the SLB instance. Default to false.

retriveSlbIp Boolean

Whether to use the XForwardedFor_SLBIP header to obtain the public IP address of the SLB instance. Default to false.

retriveSlbProto Boolean

Whether to use the XForwardedFor_proto header to obtain the protocol used by the listener. Default to false.

retriveClientIp boolean
retriveSlbId boolean

Whether to use the XForwardedFor header to obtain the ID of the SLB instance. Default to false.

retriveSlbIp boolean

Whether to use the XForwardedFor_SLBIP header to obtain the public IP address of the SLB instance. Default to false.

retriveSlbProto boolean

Whether to use the XForwardedFor_proto header to obtain the protocol used by the listener. Default to false.

retrive_client_ip bool
retrive_slb_id bool

Whether to use the XForwardedFor header to obtain the ID of the SLB instance. Default to false.

retrive_slb_ip bool

Whether to use the XForwardedFor_SLBIP header to obtain the public IP address of the SLB instance. Default to false.

retrive_slb_proto bool

Whether to use the XForwardedFor_proto header to obtain the protocol used by the listener. Default to false.

retriveClientIp Boolean
retriveSlbId Boolean

Whether to use the XForwardedFor header to obtain the ID of the SLB instance. Default to false.

retriveSlbIp Boolean

Whether to use the XForwardedFor_SLBIP header to obtain the public IP address of the SLB instance. Default to false.

retriveSlbProto Boolean

Whether to use the XForwardedFor_proto header to obtain the protocol used by the listener. Default to false.

Import

Load balancer listener can be imported using the id, e.g.

 $ pulumi import alicloud:slb/listener:Listener example "lb-abc123456:tcp:22"

Package Details

Repository
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes

This Pulumi package is based on the alicloud Terraform Provider.