alicloud.slb.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:
- Configure a HTTP Listener.
- Configure a HTTPS Listener.
- Configure a TCP Listener.
- Configure a UDP Listener.
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 parameter | support protocol | value range |
---|---|---|
backend_port | http & https & tcp & udp | 1-65535 |
frontend_port | http & https & tcp & udp | 1-65535 |
protocol | http & https & tcp & udp | |
bandwidth | http & https & tcp & udp | -1 / 1-1000 |
scheduler | http & https & tcp & udp | wrr, rr, wlc, tch, qch |
sticky_session | http & https | on or off |
sticky_session_type | http & https | insert or server |
cookie_timeout | http & https | 1-86400 |
cookie | http & https | |
persistence_timeout | tcp & udp | 0-3600 |
health_check | http & https | on or off |
health_check_type | tcp | tcp or http |
health_check_domain | http & https & tcp | |
health_check_method | http & https & tcp | |
health_check_uri | http & https & tcp | |
health_check_connect_port | http & https & tcp & udp | 1-65535 or -520 |
healthy_threshold | http & https & tcp & udp | 1-10 |
unhealthy_threshold | http & https & tcp & udp | 1-10 |
health_check_timeout | http & https & tcp & udp | 1-300 |
health_check_interval | http & https & tcp & udp | 1-50 |
health_check_http_code | http & https & tcp | http_2xx,http_3xx,http_4xx,http_5xx |
server_certificate_id | https | |
gzip | http & https | true or false |
x_forwarded_for | http & https | |
acl_status | http & https & tcp & udp | on or off |
acl_type | http & https & tcp & udp | white or black |
acl_id | http & https & tcp & udp | the id of resource alicloud_slb_acl |
established_timeout | tcp | 10-900 |
idle_timeout | http & https | 1-60 |
request_timeout | http & https | 1-180 |
enable_http2 | https | on or off |
tls_cipher_policy | https | tls_cipher_policy_1_0, tls_cipher_policy_1_1, tls_cipher_policy_1_2, tls_cipher_policy_1_2_strict |
server_group_id | http & https & tcp & udp | the id of resource alicloud.slb.ServerGroup |
The listener mapping supports the following:
Example Usage
using System.Collections.Generic;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var slbListenerName = config.Get("slbListenerName") ?? "forSlbListener";
var listenerApplicationLoadBalancer = new AliCloud.Slb.ApplicationLoadBalancer("listenerApplicationLoadBalancer", new()
{
LoadBalancerName = "tf-testAccSlbListenerHttp",
InternetChargeType = "PayByTraffic",
AddressType = "internet",
InstanceChargeType = "PayByCLCU",
});
var listenerAcl = new AliCloud.Slb.Acl("listenerAcl", new()
{
IpVersion = "ipv4",
});
var listenerListener = new AliCloud.Slb.Listener("listenerListener", new()
{
LoadBalancerId = listenerApplicationLoadBalancer.Id,
BackendPort = 80,
FrontendPort = 80,
Protocol = "http",
Bandwidth = 10,
StickySession = "on",
StickySessionType = "insert",
CookieTimeout = 86400,
Cookie = "testslblistenercookie",
HealthCheck = "on",
HealthCheckDomain = "ali.com",
HealthCheckUri = "/cons",
HealthCheckConnectPort = 20,
HealthyThreshold = 8,
UnhealthyThreshold = 8,
HealthCheckTimeout = 8,
HealthCheckInterval = 5,
HealthCheckHttpCode = "http_2xx,http_3xx",
XForwardedFor = new AliCloud.Slb.Inputs.ListenerXForwardedForArgs
{
RetriveSlbIp = true,
RetriveSlbId = true,
},
AclStatus = "on",
AclType = "white",
AclId = listenerAcl.Id,
RequestTimeout = 80,
IdleTimeout = 30,
});
var first = new AliCloud.Slb.AclEntryAttachment("first", new()
{
AclId = listenerAcl.Id,
Entry = "10.10.10.0/24",
Comment = "first",
});
var second = new AliCloud.Slb.AclEntryAttachment("second", new()
{
AclId = listenerAcl.Id,
Entry = "168.10.10.0/24",
Comment = "second",
});
});
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/slb"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
slbListenerName := "forSlbListener"
if param := cfg.Get("slbListenerName"); param != "" {
slbListenerName = param
}
listenerApplicationLoadBalancer, err := slb.NewApplicationLoadBalancer(ctx, "listenerApplicationLoadBalancer", &slb.ApplicationLoadBalancerArgs{
LoadBalancerName: pulumi.String("tf-testAccSlbListenerHttp"),
InternetChargeType: pulumi.String("PayByTraffic"),
AddressType: pulumi.String("internet"),
InstanceChargeType: pulumi.String("PayByCLCU"),
})
if err != nil {
return err
}
listenerAcl, err := slb.NewAcl(ctx, "listenerAcl", &slb.AclArgs{
IpVersion: pulumi.String("ipv4"),
})
if err != nil {
return err
}
_, err = slb.NewListener(ctx, "listenerListener", &slb.ListenerArgs{
LoadBalancerId: listenerApplicationLoadBalancer.ID(),
BackendPort: pulumi.Int(80),
FrontendPort: pulumi.Int(80),
Protocol: pulumi.String("http"),
Bandwidth: pulumi.Int(10),
StickySession: pulumi.String("on"),
StickySessionType: pulumi.String("insert"),
CookieTimeout: pulumi.Int(86400),
Cookie: pulumi.String("testslblistenercookie"),
HealthCheck: pulumi.String("on"),
HealthCheckDomain: pulumi.String("ali.com"),
HealthCheckUri: pulumi.String("/cons"),
HealthCheckConnectPort: pulumi.Int(20),
HealthyThreshold: pulumi.Int(8),
UnhealthyThreshold: pulumi.Int(8),
HealthCheckTimeout: pulumi.Int(8),
HealthCheckInterval: pulumi.Int(5),
HealthCheckHttpCode: pulumi.String("http_2xx,http_3xx"),
XForwardedFor: &slb.ListenerXForwardedForArgs{
RetriveSlbIp: pulumi.Bool(true),
RetriveSlbId: pulumi.Bool(true),
},
AclStatus: pulumi.String("on"),
AclType: pulumi.String("white"),
AclId: listenerAcl.ID(),
RequestTimeout: pulumi.Int(80),
IdleTimeout: pulumi.Int(30),
})
if err != nil {
return err
}
_, err = slb.NewAclEntryAttachment(ctx, "first", &slb.AclEntryAttachmentArgs{
AclId: listenerAcl.ID(),
Entry: pulumi.String("10.10.10.0/24"),
Comment: pulumi.String("first"),
})
if err != nil {
return err
}
_, err = slb.NewAclEntryAttachment(ctx, "second", &slb.AclEntryAttachmentArgs{
AclId: listenerAcl.ID(),
Entry: pulumi.String("168.10.10.0/24"),
Comment: pulumi.String("second"),
})
if err != nil {
return err
}
return nil
})
}
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.Listener;
import com.pulumi.alicloud.slb.ListenerArgs;
import com.pulumi.alicloud.slb.inputs.ListenerXForwardedForArgs;
import com.pulumi.alicloud.slb.AclEntryAttachment;
import com.pulumi.alicloud.slb.AclEntryAttachmentArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var config = ctx.config();
final var slbListenerName = config.get("slbListenerName").orElse("forSlbListener");
var listenerApplicationLoadBalancer = new ApplicationLoadBalancer("listenerApplicationLoadBalancer", ApplicationLoadBalancerArgs.builder()
.loadBalancerName("tf-testAccSlbListenerHttp")
.internetChargeType("PayByTraffic")
.addressType("internet")
.instanceChargeType("PayByCLCU")
.build());
var listenerAcl = new Acl("listenerAcl", AclArgs.builder()
.ipVersion("ipv4")
.build());
var listenerListener = new Listener("listenerListener", ListenerArgs.builder()
.loadBalancerId(listenerApplicationLoadBalancer.id())
.backendPort(80)
.frontendPort(80)
.protocol("http")
.bandwidth(10)
.stickySession("on")
.stickySessionType("insert")
.cookieTimeout(86400)
.cookie("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(listenerAcl.id())
.requestTimeout(80)
.idleTimeout(30)
.build());
var first = new AclEntryAttachment("first", AclEntryAttachmentArgs.builder()
.aclId(listenerAcl.id())
.entry("10.10.10.0/24")
.comment("first")
.build());
var second = new AclEntryAttachment("second", AclEntryAttachmentArgs.builder()
.aclId(listenerAcl.id())
.entry("168.10.10.0/24")
.comment("second")
.build());
}
}
import pulumi
import pulumi_alicloud as alicloud
config = pulumi.Config()
slb_listener_name = config.get("slbListenerName")
if slb_listener_name is None:
slb_listener_name = "forSlbListener"
listener_application_load_balancer = alicloud.slb.ApplicationLoadBalancer("listenerApplicationLoadBalancer",
load_balancer_name="tf-testAccSlbListenerHttp",
internet_charge_type="PayByTraffic",
address_type="internet",
instance_charge_type="PayByCLCU")
listener_acl = alicloud.slb.Acl("listenerAcl", ip_version="ipv4")
listener_listener = alicloud.slb.Listener("listenerListener",
load_balancer_id=listener_application_load_balancer.id,
backend_port=80,
frontend_port=80,
protocol="http",
bandwidth=10,
sticky_session="on",
sticky_session_type="insert",
cookie_timeout=86400,
cookie="testslblistenercookie",
health_check="on",
health_check_domain="ali.com",
health_check_uri="/cons",
health_check_connect_port=20,
healthy_threshold=8,
unhealthy_threshold=8,
health_check_timeout=8,
health_check_interval=5,
health_check_http_code="http_2xx,http_3xx",
x_forwarded_for=alicloud.slb.ListenerXForwardedForArgs(
retrive_slb_ip=True,
retrive_slb_id=True,
),
acl_status="on",
acl_type="white",
acl_id=listener_acl.id,
request_timeout=80,
idle_timeout=30)
first = alicloud.slb.AclEntryAttachment("first",
acl_id=listener_acl.id,
entry="10.10.10.0/24",
comment="first")
second = alicloud.slb.AclEntryAttachment("second",
acl_id=listener_acl.id,
entry="168.10.10.0/24",
comment="second")
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const config = new pulumi.Config();
const slbListenerName = config.get("slbListenerName") || "forSlbListener";
const listenerApplicationLoadBalancer = new alicloud.slb.ApplicationLoadBalancer("listenerApplicationLoadBalancer", {
loadBalancerName: "tf-testAccSlbListenerHttp",
internetChargeType: "PayByTraffic",
addressType: "internet",
instanceChargeType: "PayByCLCU",
});
const listenerAcl = new alicloud.slb.Acl("listenerAcl", {ipVersion: "ipv4"});
const listenerListener = new alicloud.slb.Listener("listenerListener", {
loadBalancerId: listenerApplicationLoadBalancer.id,
backendPort: 80,
frontendPort: 80,
protocol: "http",
bandwidth: 10,
stickySession: "on",
stickySessionType: "insert",
cookieTimeout: 86400,
cookie: "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: listenerAcl.id,
requestTimeout: 80,
idleTimeout: 30,
});
const first = new alicloud.slb.AclEntryAttachment("first", {
aclId: listenerAcl.id,
entry: "10.10.10.0/24",
comment: "first",
});
const second = new alicloud.slb.AclEntryAttachment("second", {
aclId: listenerAcl.id,
entry: "168.10.10.0/24",
comment: "second",
});
configuration:
slbListenerName:
type: string
default: forSlbListener
resources:
listenerApplicationLoadBalancer:
type: alicloud:slb:ApplicationLoadBalancer
properties:
loadBalancerName: tf-testAccSlbListenerHttp
internetChargeType: PayByTraffic
addressType: internet
instanceChargeType: PayByCLCU
listenerListener:
type: alicloud:slb:Listener
properties:
loadBalancerId: ${listenerApplicationLoadBalancer.id}
backendPort: 80
frontendPort: 80
protocol: http
bandwidth: 10
stickySession: on
stickySessionType: insert
cookieTimeout: 86400
cookie: 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: ${listenerAcl.id}
requestTimeout: 80
idleTimeout: 30
listenerAcl:
type: alicloud:slb:Acl
properties:
ipVersion: ipv4
first:
type: alicloud:slb:AclEntryAttachment
properties:
aclId: ${listenerAcl.id}
entry: 10.10.10.0/24
comment: first
second:
type: alicloud:slb:AclEntryAttachment
properties:
aclId: ${listenerAcl.id}
entry: 168.10.10.0/24
comment: second
Create Listener Resource
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,
proxy_protocol_v2_enabled: Optional[bool] = None,
request_timeout: Optional[int] = None,
scheduler: Optional[str] = None,
server_certificate_id: Optional[str] = None,
server_group_id: Optional[str] = None,
ssl_certificate_id: Optional[str] = None,
sticky_session: Optional[str] = None,
sticky_session_type: Optional[str] = None,
tls_cipher_policy: Optional[str] = None,
unhealthy_threshold: Optional[int] = None,
x_forwarded_for: Optional[ListenerXForwardedForArgs] = None)
@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:
- Frontend
Port int Port used by the Server Load Balancer instance frontend. Valid value range: [1-65535].
- Load
Balancer stringId 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
].- Acl
Id 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.- Acl
Status string Whether to enable "acl(access control list)", the acl is specified by
acl_id
. Valid values areon
andoff
. Default tooff
.- Acl
Type 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 arewhite
andblack
.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 stringId SLB CA certificate ID. Only when
protocol
ishttps
can be specified.- string
The cookie configured on the server. It is mandatory when
sticky_session
is "on" andsticky_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 $.- int
Cookie timeout. It is mandatory when
sticky_session
is "on" andsticky_session_type
is "insert". Otherwise, it will be ignored. Valid value range: [1-86400] in seconds.- Delete
Protection boolValidation 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.
- Enable
Http2 string Whether to enable https listener support http2 or not. Valid values are
on
andoff
. Default toon
.- 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 string Whether to enable health check. Valid values are
on
andoff
. TCP and UDP listener's HealthCheck is always on, so it will be ignore when launching TCP or UDP listener.- Health
Check intConnect Port 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 stringDomain 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 stringHttp Code Regular health check HTTP status code. Multiple codes are segmented by “,”. It is required when
health_check
is on. Default tohttp_2xx
. Valid values are:http_2xx
,http_3xx
,http_4xx
andhttp_5xx
.- Health
Check intInterval 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 stringMethod HealthCheckMethod used for health check.Valid values: ["head", "get"]
http
andhttps
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 intTimeout 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: Ifhealth_check_timeout
<health_check_interval
, its will be replaced byhealth_check_interval
.- Health
Check stringType Type of health check. Valid values are:
tcp
andhttp
. Default totcp
. TCP supports TCP and HTTP health check mode, you can select the particular mode depending on your application.- Health
Check stringUri 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 thehealth_check
parameter is set toon
.- 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 Field 'instance_port' has been deprecated, and using 'backend_port' to replace.
- Lb
Port int Field 'lb_port' has been deprecated, and using 'frontend_port' to replace.
- Lb
Protocol string Field 'lb_protocol' has been deprecated, and using 'protocol' to replace.
- Listener
Forward string Whether to enable http redirect to https, Valid values are
on
andoff
. Default tooff
.- Master
Slave stringServer Group Id 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.
- Proxy
Protocol boolV2Enabled Whether to support carrying the client source address to the backend server through the Proxy Protocol. Valid values are
true
andfalse
. Default tofalse
.- 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 string
Scheduling algorithm, Valid values:
wrr
,rr
,wlc
,sch
,tcp
,qch
. Default towrr
. Only whenprotocol
istcp
orudp
,scheduler
can be set tosch
. Only when instance is guaranteed-performance instance andprotocol
istcp
orudp
,scheduler
can be set totch
. Only when instance is guaranteed-performance instance andprotocol
isudp
,scheduler
can be set toqch
.- Server
Certificate stringId SLB Server certificate ID. It is required when
protocol
ishttps
. Theserver_certificate_id
is also required when the value of thessl_certificate_id
is Empty.- Server
Group stringId the id of server group to be apply on the listener, is the id of resource
alicloud.slb.ServerGroup
.- Ssl
Certificate stringId SLB Server certificate ID. It has been deprecated from 1.59.0 and using
server_certificate_id
instead.Field 'ssl_certificate_id' has been deprecated from 1.59.0 and using 'server_certificate_id' instead.
- Sticky
Session string Whether to enable session persistence, Valid values are
on
andoff
. Default tooff
.- Sticky
Session stringType Mode for handling the cookie. If
sticky_session
is "on", it is mandatory. Otherwise, it will be ignored. Valid values areinsert
andserver
.insert
means it is inserted from Server Load Balancer;server
means the Server Load Balancer learns from the backend server.- Tls
Cipher stringPolicy 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 totls_cipher_policy_1_0
. Currently thetls_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 thehealth_check
parameter is set toon
.- XForwarded
For Pulumi.Ali Cloud. Slb. Inputs. Listener XForwarded For Args 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 stringId 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
].- Acl
Id 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.- Acl
Status string Whether to enable "acl(access control list)", the acl is specified by
acl_id
. Valid values areon
andoff
. Default tooff
.- Acl
Type 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 arewhite
andblack
.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 stringId SLB CA certificate ID. Only when
protocol
ishttps
can be specified.- string
The cookie configured on the server. It is mandatory when
sticky_session
is "on" andsticky_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 $.- int
Cookie timeout. It is mandatory when
sticky_session
is "on" andsticky_session_type
is "insert". Otherwise, it will be ignored. Valid value range: [1-86400] in seconds.- Delete
Protection boolValidation 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.
- Enable
Http2 string Whether to enable https listener support http2 or not. Valid values are
on
andoff
. Default toon
.- 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 string Whether to enable health check. Valid values are
on
andoff
. TCP and UDP listener's HealthCheck is always on, so it will be ignore when launching TCP or UDP listener.- Health
Check intConnect Port 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 stringDomain 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 stringHttp Code Regular health check HTTP status code. Multiple codes are segmented by “,”. It is required when
health_check
is on. Default tohttp_2xx
. Valid values are:http_2xx
,http_3xx
,http_4xx
andhttp_5xx
.- Health
Check intInterval 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 stringMethod HealthCheckMethod used for health check.Valid values: ["head", "get"]
http
andhttps
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 intTimeout 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: Ifhealth_check_timeout
<health_check_interval
, its will be replaced byhealth_check_interval
.- Health
Check stringType Type of health check. Valid values are:
tcp
andhttp
. Default totcp
. TCP supports TCP and HTTP health check mode, you can select the particular mode depending on your application.- Health
Check stringUri 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 thehealth_check
parameter is set toon
.- 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 Field 'instance_port' has been deprecated, and using 'backend_port' to replace.
- Lb
Port int Field 'lb_port' has been deprecated, and using 'frontend_port' to replace.
- Lb
Protocol string Field 'lb_protocol' has been deprecated, and using 'protocol' to replace.
- Listener
Forward string Whether to enable http redirect to https, Valid values are
on
andoff
. Default tooff
.- Master
Slave stringServer Group Id 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.
- Proxy
Protocol boolV2Enabled Whether to support carrying the client source address to the backend server through the Proxy Protocol. Valid values are
true
andfalse
. Default tofalse
.- 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 string
Scheduling algorithm, Valid values:
wrr
,rr
,wlc
,sch
,tcp
,qch
. Default towrr
. Only whenprotocol
istcp
orudp
,scheduler
can be set tosch
. Only when instance is guaranteed-performance instance andprotocol
istcp
orudp
,scheduler
can be set totch
. Only when instance is guaranteed-performance instance andprotocol
isudp
,scheduler
can be set toqch
.- Server
Certificate stringId SLB Server certificate ID. It is required when
protocol
ishttps
. Theserver_certificate_id
is also required when the value of thessl_certificate_id
is Empty.- Server
Group stringId the id of server group to be apply on the listener, is the id of resource
alicloud.slb.ServerGroup
.- Ssl
Certificate stringId SLB Server certificate ID. It has been deprecated from 1.59.0 and using
server_certificate_id
instead.Field 'ssl_certificate_id' has been deprecated from 1.59.0 and using 'server_certificate_id' instead.
- Sticky
Session string Whether to enable session persistence, Valid values are
on
andoff
. Default tooff
.- Sticky
Session stringType Mode for handling the cookie. If
sticky_session
is "on", it is mandatory. Otherwise, it will be ignored. Valid values areinsert
andserver
.insert
means it is inserted from Server Load Balancer;server
means the Server Load Balancer learns from the backend server.- Tls
Cipher stringPolicy 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 totls_cipher_policy_1_0
. Currently thetls_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 thehealth_check
parameter is set toon
.- XForwarded
For ListenerXForwarded For Args 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 Integer Port used by the Server Load Balancer instance frontend. Valid value range: [1-65535].
- load
Balancer StringId 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
].- acl
Id 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.- acl
Status String Whether to enable "acl(access control list)", the acl is specified by
acl_id
. Valid values areon
andoff
. Default tooff
.- acl
Type 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 arewhite
andblack
.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 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.
- ca
Certificate StringId SLB CA certificate ID. Only when
protocol
ishttps
can be specified.- String
The cookie configured on the server. It is mandatory when
sticky_session
is "on" andsticky_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 $.- Integer
Cookie timeout. It is mandatory when
sticky_session
is "on" andsticky_session_type
is "insert". Otherwise, it will be ignored. Valid value range: [1-86400] in seconds.- delete
Protection BooleanValidation 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.
- enable
Http2 String Whether to enable https listener support http2 or not. Valid values are
on
andoff
. Default toon
.- established
Timeout Integer Timeout of tcp listener established connection idle timeout. Valid value range: [10-900] in seconds. Default to 900.
- forward
Port 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+.
- health
Check String Whether to enable health check. Valid values are
on
andoff
. TCP and UDP listener's HealthCheck is always on, so it will be ignore when launching TCP or UDP listener.- health
Check IntegerConnect Port 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 StringDomain 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 StringHttp Code Regular health check HTTP status code. Multiple codes are segmented by “,”. It is required when
health_check
is on. Default tohttp_2xx
. Valid values are:http_2xx
,http_3xx
,http_4xx
andhttp_5xx
.- health
Check IntegerInterval 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 StringMethod HealthCheckMethod used for health check.Valid values: ["head", "get"]
http
andhttps
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 IntegerTimeout 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: Ifhealth_check_timeout
<health_check_interval
, its will be replaced byhealth_check_interval
.- health
Check StringType Type of health check. Valid values are:
tcp
andhttp
. Default totcp
. TCP supports TCP and HTTP health check mode, you can select the particular mode depending on your application.- health
Check StringUri 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 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 thehealth_check
parameter is set toon
.- idle
Timeout Integer Timeout of http or https listener established connection idle timeout. Valid value range: [1-60] in seconds. Default to 15.
- instance
Port Integer Field 'instance_port' has been deprecated, and using 'backend_port' to replace.
- lb
Port Integer Field 'lb_port' has been deprecated, and using 'frontend_port' to replace.
- lb
Protocol String Field 'lb_protocol' has been deprecated, and using 'protocol' to replace.
- listener
Forward String Whether to enable http redirect to https, Valid values are
on
andoff
. Default tooff
.- master
Slave StringServer Group Id The ID of the master slave server group.
- persistence
Timeout Integer Timeout of connection persistence. Valid value range: [0-3600] in seconds. Default to 0 and means closing it.
- proxy
Protocol BooleanV2Enabled Whether to support carrying the client source address to the backend server through the Proxy Protocol. Valid values are
true
andfalse
. Default tofalse
.- request
Timeout 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 towrr
. Only whenprotocol
istcp
orudp
,scheduler
can be set tosch
. Only when instance is guaranteed-performance instance andprotocol
istcp
orudp
,scheduler
can be set totch
. Only when instance is guaranteed-performance instance andprotocol
isudp
,scheduler
can be set toqch
.- server
Certificate StringId SLB Server certificate ID. It is required when
protocol
ishttps
. Theserver_certificate_id
is also required when the value of thessl_certificate_id
is Empty.- server
Group StringId the id of server group to be apply on the listener, is the id of resource
alicloud.slb.ServerGroup
.- ssl
Certificate StringId SLB Server certificate ID. It has been deprecated from 1.59.0 and using
server_certificate_id
instead.Field 'ssl_certificate_id' has been deprecated from 1.59.0 and using 'server_certificate_id' instead.
- sticky
Session String Whether to enable session persistence, Valid values are
on
andoff
. Default tooff
.- sticky
Session StringType Mode for handling the cookie. If
sticky_session
is "on", it is mandatory. Otherwise, it will be ignored. Valid values areinsert
andserver
.insert
means it is inserted from Server Load Balancer;server
means the Server Load Balancer learns from the backend server.- tls
Cipher StringPolicy 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 totls_cipher_policy_1_0
. Currently thetls_cipher_policy
can not be updated when load balancer instance is "Shared-Performance".- unhealthy
Threshold 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 thehealth_check
parameter is set toon
.- x
Forwarded ListenerFor XForwarded For Args 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 number Port used by the Server Load Balancer instance frontend. Valid value range: [1-65535].
- load
Balancer stringId 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
].- acl
Id 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.- acl
Status string Whether to enable "acl(access control list)", the acl is specified by
acl_id
. Valid values areon
andoff
. Default tooff
.- acl
Type 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 arewhite
andblack
.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 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.
- ca
Certificate stringId SLB CA certificate ID. Only when
protocol
ishttps
can be specified.- string
The cookie configured on the server. It is mandatory when
sticky_session
is "on" andsticky_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 $.- number
Cookie timeout. It is mandatory when
sticky_session
is "on" andsticky_session_type
is "insert". Otherwise, it will be ignored. Valid value range: [1-86400] in seconds.- delete
Protection booleanValidation 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.
- enable
Http2 string Whether to enable https listener support http2 or not. Valid values are
on
andoff
. Default toon
.- established
Timeout number Timeout of tcp listener established connection idle timeout. Valid value range: [10-900] in seconds. Default to 900.
- forward
Port 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+.
- health
Check string Whether to enable health check. Valid values are
on
andoff
. TCP and UDP listener's HealthCheck is always on, so it will be ignore when launching TCP or UDP listener.- health
Check numberConnect Port 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 stringDomain 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 stringHttp Code Regular health check HTTP status code. Multiple codes are segmented by “,”. It is required when
health_check
is on. Default tohttp_2xx
. Valid values are:http_2xx
,http_3xx
,http_4xx
andhttp_5xx
.- health
Check numberInterval 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 stringMethod HealthCheckMethod used for health check.Valid values: ["head", "get"]
http
andhttps
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 numberTimeout 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: Ifhealth_check_timeout
<health_check_interval
, its will be replaced byhealth_check_interval
.- health
Check stringType Type of health check. Valid values are:
tcp
andhttp
. Default totcp
. TCP supports TCP and HTTP health check mode, you can select the particular mode depending on your application.- health
Check stringUri 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 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 thehealth_check
parameter is set toon
.- idle
Timeout number Timeout of http or https listener established connection idle timeout. Valid value range: [1-60] in seconds. Default to 15.
- instance
Port number Field 'instance_port' has been deprecated, and using 'backend_port' to replace.
- lb
Port number Field 'lb_port' has been deprecated, and using 'frontend_port' to replace.
- lb
Protocol string Field 'lb_protocol' has been deprecated, and using 'protocol' to replace.
- listener
Forward string Whether to enable http redirect to https, Valid values are
on
andoff
. Default tooff
.- master
Slave stringServer Group Id The ID of the master slave server group.
- persistence
Timeout number Timeout of connection persistence. Valid value range: [0-3600] in seconds. Default to 0 and means closing it.
- proxy
Protocol booleanV2Enabled Whether to support carrying the client source address to the backend server through the Proxy Protocol. Valid values are
true
andfalse
. Default tofalse
.- request
Timeout 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 towrr
. Only whenprotocol
istcp
orudp
,scheduler
can be set tosch
. Only when instance is guaranteed-performance instance andprotocol
istcp
orudp
,scheduler
can be set totch
. Only when instance is guaranteed-performance instance andprotocol
isudp
,scheduler
can be set toqch
.- server
Certificate stringId SLB Server certificate ID. It is required when
protocol
ishttps
. Theserver_certificate_id
is also required when the value of thessl_certificate_id
is Empty.- server
Group stringId the id of server group to be apply on the listener, is the id of resource
alicloud.slb.ServerGroup
.- ssl
Certificate stringId SLB Server certificate ID. It has been deprecated from 1.59.0 and using
server_certificate_id
instead.Field 'ssl_certificate_id' has been deprecated from 1.59.0 and using 'server_certificate_id' instead.
- sticky
Session string Whether to enable session persistence, Valid values are
on
andoff
. Default tooff
.- sticky
Session stringType Mode for handling the cookie. If
sticky_session
is "on", it is mandatory. Otherwise, it will be ignored. Valid values areinsert
andserver
.insert
means it is inserted from Server Load Balancer;server
means the Server Load Balancer learns from the backend server.- tls
Cipher stringPolicy 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 totls_cipher_policy_1_0
. Currently thetls_cipher_policy
can not be updated when load balancer instance is "Shared-Performance".- unhealthy
Threshold 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 thehealth_check
parameter is set toon
.- x
Forwarded ListenerFor XForwarded For Args 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_ strid 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 areon
andoff
. Default tooff
.- 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 arewhite
andblack
.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_ strid SLB CA certificate ID. Only when
protocol
ishttps
can be specified.- str
The cookie configured on the server. It is mandatory when
sticky_session
is "on" andsticky_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 $.- int
Cookie timeout. It is mandatory when
sticky_session
is "on" andsticky_session_type
is "insert". Otherwise, it will be ignored. Valid value range: [1-86400] in seconds.- delete_
protection_ boolvalidation 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
andoff
. Default toon
.- 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 are
on
andoff
. TCP and UDP listener's HealthCheck is always on, so it will be ignore when launching TCP or UDP listener.- health_
check_ intconnect_ port 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_ strdomain 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_ strhttp_ code Regular health check HTTP status code. Multiple codes are segmented by “,”. It is required when
health_check
is on. Default tohttp_2xx
. Valid values are:http_2xx
,http_3xx
,http_4xx
andhttp_5xx
.- health_
check_ intinterval 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_ strmethod HealthCheckMethod used for health check.Valid values: ["head", "get"]
http
andhttps
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_ inttimeout 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: Ifhealth_check_timeout
<health_check_interval
, its will be replaced byhealth_check_interval
.- health_
check_ strtype Type of health check. Valid values are:
tcp
andhttp
. Default totcp
. TCP supports TCP and HTTP health check mode, you can select the particular mode depending on your application.- health_
check_ struri 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 thehealth_check
parameter is set toon
.- 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 Field 'instance_port' has been deprecated, and using 'backend_port' to replace.
- lb_
port int Field 'lb_port' has been deprecated, and using 'frontend_port' to replace.
- lb_
protocol str 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
andoff
. Default tooff
.- master_
slave_ strserver_ group_ id 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.
- proxy_
protocol_ boolv2_ enabled Whether to support carrying the client source address to the backend server through the Proxy Protocol. Valid values are
true
andfalse
. Default tofalse
.- 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 towrr
. Only whenprotocol
istcp
orudp
,scheduler
can be set tosch
. Only when instance is guaranteed-performance instance andprotocol
istcp
orudp
,scheduler
can be set totch
. Only when instance is guaranteed-performance instance andprotocol
isudp
,scheduler
can be set toqch
.- server_
certificate_ strid SLB Server certificate ID. It is required when
protocol
ishttps
. Theserver_certificate_id
is also required when the value of thessl_certificate_id
is Empty.- server_
group_ strid the id of server group to be apply on the listener, is the id of resource
alicloud.slb.ServerGroup
.- ssl_
certificate_ strid SLB Server certificate ID. It has been deprecated from 1.59.0 and using
server_certificate_id
instead.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
andoff
. Default tooff
.- sticky_
session_ strtype Mode for handling the cookie. If
sticky_session
is "on", it is mandatory. Otherwise, it will be ignored. Valid values areinsert
andserver
.insert
means it is inserted from Server Load Balancer;server
means the Server Load Balancer learns from the backend server.- tls_
cipher_ strpolicy 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 totls_cipher_policy_1_0
. Currently thetls_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 thehealth_check
parameter is set toon
.- x_
forwarded_ Listenerfor XForwarded For Args 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 Number Port used by the Server Load Balancer instance frontend. Valid value range: [1-65535].
- load
Balancer StringId 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
].- acl
Id 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.- acl
Status String Whether to enable "acl(access control list)", the acl is specified by
acl_id
. Valid values areon
andoff
. Default tooff
.- acl
Type 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 arewhite
andblack
.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 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.
- ca
Certificate StringId SLB CA certificate ID. Only when
protocol
ishttps
can be specified.- String
The cookie configured on the server. It is mandatory when
sticky_session
is "on" andsticky_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 $.- Number
Cookie timeout. It is mandatory when
sticky_session
is "on" andsticky_session_type
is "insert". Otherwise, it will be ignored. Valid value range: [1-86400] in seconds.- delete
Protection BooleanValidation 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.
- enable
Http2 String Whether to enable https listener support http2 or not. Valid values are
on
andoff
. Default toon
.- established
Timeout Number Timeout of tcp listener established connection idle timeout. Valid value range: [10-900] in seconds. Default to 900.
- forward
Port 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+.
- health
Check String Whether to enable health check. Valid values are
on
andoff
. TCP and UDP listener's HealthCheck is always on, so it will be ignore when launching TCP or UDP listener.- health
Check NumberConnect Port 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 StringDomain 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 StringHttp Code Regular health check HTTP status code. Multiple codes are segmented by “,”. It is required when
health_check
is on. Default tohttp_2xx
. Valid values are:http_2xx
,http_3xx
,http_4xx
andhttp_5xx
.- health
Check NumberInterval 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 StringMethod HealthCheckMethod used for health check.Valid values: ["head", "get"]
http
andhttps
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 NumberTimeout 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: Ifhealth_check_timeout
<health_check_interval
, its will be replaced byhealth_check_interval
.- health
Check StringType Type of health check. Valid values are:
tcp
andhttp
. Default totcp
. TCP supports TCP and HTTP health check mode, you can select the particular mode depending on your application.- health
Check StringUri 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 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 thehealth_check
parameter is set toon
.- idle
Timeout Number Timeout of http or https listener established connection idle timeout. Valid value range: [1-60] in seconds. Default to 15.
- instance
Port Number Field 'instance_port' has been deprecated, and using 'backend_port' to replace.
- lb
Port Number Field 'lb_port' has been deprecated, and using 'frontend_port' to replace.
- lb
Protocol String Field 'lb_protocol' has been deprecated, and using 'protocol' to replace.
- listener
Forward String Whether to enable http redirect to https, Valid values are
on
andoff
. Default tooff
.- master
Slave StringServer Group Id The ID of the master slave server group.
- persistence
Timeout Number Timeout of connection persistence. Valid value range: [0-3600] in seconds. Default to 0 and means closing it.
- proxy
Protocol BooleanV2Enabled Whether to support carrying the client source address to the backend server through the Proxy Protocol. Valid values are
true
andfalse
. Default tofalse
.- request
Timeout 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 towrr
. Only whenprotocol
istcp
orudp
,scheduler
can be set tosch
. Only when instance is guaranteed-performance instance andprotocol
istcp
orudp
,scheduler
can be set totch
. Only when instance is guaranteed-performance instance andprotocol
isudp
,scheduler
can be set toqch
.- server
Certificate StringId SLB Server certificate ID. It is required when
protocol
ishttps
. Theserver_certificate_id
is also required when the value of thessl_certificate_id
is Empty.- server
Group StringId the id of server group to be apply on the listener, is the id of resource
alicloud.slb.ServerGroup
.- ssl
Certificate StringId SLB Server certificate ID. It has been deprecated from 1.59.0 and using
server_certificate_id
instead.Field 'ssl_certificate_id' has been deprecated from 1.59.0 and using 'server_certificate_id' instead.
- sticky
Session String Whether to enable session persistence, Valid values are
on
andoff
. Default tooff
.- sticky
Session StringType Mode for handling the cookie. If
sticky_session
is "on", it is mandatory. Otherwise, it will be ignored. Valid values areinsert
andserver
.insert
means it is inserted from Server Load Balancer;server
means the Server Load Balancer learns from the backend server.- tls
Cipher StringPolicy 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 totls_cipher_policy_1_0
. Currently thetls_cipher_policy
can not be updated when load balancer instance is "Shared-Performance".- unhealthy
Threshold 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 thehealth_check
parameter is set toon
.- x
Forwarded Property MapFor 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,
proxy_protocol_v2_enabled: Optional[bool] = None,
request_timeout: Optional[int] = None,
scheduler: Optional[str] = None,
server_certificate_id: Optional[str] = None,
server_group_id: Optional[str] = None,
ssl_certificate_id: Optional[str] = None,
sticky_session: Optional[str] = None,
sticky_session_type: Optional[str] = None,
tls_cipher_policy: Optional[str] = None,
unhealthy_threshold: Optional[int] = None,
x_forwarded_for: Optional[ListenerXForwardedForArgs] = None) -> Listener
func GetListener(ctx *Context, name string, id IDInput, state *ListenerState, opts ...ResourceOption) (*Listener, error)
public static Listener Get(string name, Input<string> id, ListenerState? state, CustomResourceOptions? opts = null)
public static Listener get(String name, Output<String> id, ListenerState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Acl
Id 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.- Acl
Status string Whether to enable "acl(access control list)", the acl is specified by
acl_id
. Valid values areon
andoff
. Default tooff
.- Acl
Type 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 arewhite
andblack
.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 stringId SLB CA certificate ID. Only when
protocol
ishttps
can be specified.- string
The cookie configured on the server. It is mandatory when
sticky_session
is "on" andsticky_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 $.- int
Cookie timeout. It is mandatory when
sticky_session
is "on" andsticky_session_type
is "insert". Otherwise, it will be ignored. Valid value range: [1-86400] in seconds.- Delete
Protection boolValidation 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.
- Enable
Http2 string Whether to enable https listener support http2 or not. Valid values are
on
andoff
. Default toon
.- 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 string Whether to enable health check. Valid values are
on
andoff
. TCP and UDP listener's HealthCheck is always on, so it will be ignore when launching TCP or UDP listener.- Health
Check intConnect Port 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 stringDomain 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 stringHttp Code Regular health check HTTP status code. Multiple codes are segmented by “,”. It is required when
health_check
is on. Default tohttp_2xx
. Valid values are:http_2xx
,http_3xx
,http_4xx
andhttp_5xx
.- Health
Check intInterval 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 stringMethod HealthCheckMethod used for health check.Valid values: ["head", "get"]
http
andhttps
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 intTimeout 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: Ifhealth_check_timeout
<health_check_interval
, its will be replaced byhealth_check_interval
.- Health
Check stringType Type of health check. Valid values are:
tcp
andhttp
. Default totcp
. TCP supports TCP and HTTP health check mode, you can select the particular mode depending on your application.- Health
Check stringUri 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 thehealth_check
parameter is set toon
.- 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 Field 'instance_port' has been deprecated, and using 'backend_port' to replace.
- Lb
Port int Field 'lb_port' has been deprecated, and using 'frontend_port' to replace.
- Lb
Protocol string Field 'lb_protocol' has been deprecated, and using 'protocol' to replace.
- Listener
Forward string Whether to enable http redirect to https, Valid values are
on
andoff
. Default tooff
.- Load
Balancer stringId The Load Balancer ID which is used to launch a new listener.
- Master
Slave stringServer Group Id 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 string
The protocol to listen on. Valid values are [
http
,https
,tcp
,udp
].- Proxy
Protocol boolV2Enabled Whether to support carrying the client source address to the backend server through the Proxy Protocol. Valid values are
true
andfalse
. Default tofalse
.- 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 string
Scheduling algorithm, Valid values:
wrr
,rr
,wlc
,sch
,tcp
,qch
. Default towrr
. Only whenprotocol
istcp
orudp
,scheduler
can be set tosch
. Only when instance is guaranteed-performance instance andprotocol
istcp
orudp
,scheduler
can be set totch
. Only when instance is guaranteed-performance instance andprotocol
isudp
,scheduler
can be set toqch
.- Server
Certificate stringId SLB Server certificate ID. It is required when
protocol
ishttps
. Theserver_certificate_id
is also required when the value of thessl_certificate_id
is Empty.- Server
Group stringId the id of server group to be apply on the listener, is the id of resource
alicloud.slb.ServerGroup
.- Ssl
Certificate stringId SLB Server certificate ID. It has been deprecated from 1.59.0 and using
server_certificate_id
instead.Field 'ssl_certificate_id' has been deprecated from 1.59.0 and using 'server_certificate_id' instead.
- Sticky
Session string Whether to enable session persistence, Valid values are
on
andoff
. Default tooff
.- Sticky
Session stringType Mode for handling the cookie. If
sticky_session
is "on", it is mandatory. Otherwise, it will be ignored. Valid values areinsert
andserver
.insert
means it is inserted from Server Load Balancer;server
means the Server Load Balancer learns from the backend server.- Tls
Cipher stringPolicy 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 totls_cipher_policy_1_0
. Currently thetls_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 thehealth_check
parameter is set toon
.- XForwarded
For Pulumi.Ali Cloud. Slb. Inputs. Listener XForwarded For Args 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 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.- Acl
Status string Whether to enable "acl(access control list)", the acl is specified by
acl_id
. Valid values areon
andoff
. Default tooff
.- Acl
Type 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 arewhite
andblack
.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 stringId SLB CA certificate ID. Only when
protocol
ishttps
can be specified.- string
The cookie configured on the server. It is mandatory when
sticky_session
is "on" andsticky_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 $.- int
Cookie timeout. It is mandatory when
sticky_session
is "on" andsticky_session_type
is "insert". Otherwise, it will be ignored. Valid value range: [1-86400] in seconds.- Delete
Protection boolValidation 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.
- Enable
Http2 string Whether to enable https listener support http2 or not. Valid values are
on
andoff
. Default toon
.- 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 string Whether to enable health check. Valid values are
on
andoff
. TCP and UDP listener's HealthCheck is always on, so it will be ignore when launching TCP or UDP listener.- Health
Check intConnect Port 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 stringDomain 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 stringHttp Code Regular health check HTTP status code. Multiple codes are segmented by “,”. It is required when
health_check
is on. Default tohttp_2xx
. Valid values are:http_2xx
,http_3xx
,http_4xx
andhttp_5xx
.- Health
Check intInterval 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 stringMethod HealthCheckMethod used for health check.Valid values: ["head", "get"]
http
andhttps
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 intTimeout 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: Ifhealth_check_timeout
<health_check_interval
, its will be replaced byhealth_check_interval
.- Health
Check stringType Type of health check. Valid values are:
tcp
andhttp
. Default totcp
. TCP supports TCP and HTTP health check mode, you can select the particular mode depending on your application.- Health
Check stringUri 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 thehealth_check
parameter is set toon
.- 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 Field 'instance_port' has been deprecated, and using 'backend_port' to replace.
- Lb
Port int Field 'lb_port' has been deprecated, and using 'frontend_port' to replace.
- Lb
Protocol string Field 'lb_protocol' has been deprecated, and using 'protocol' to replace.
- Listener
Forward string Whether to enable http redirect to https, Valid values are
on
andoff
. Default tooff
.- Load
Balancer stringId The Load Balancer ID which is used to launch a new listener.
- Master
Slave stringServer Group Id 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 string
The protocol to listen on. Valid values are [
http
,https
,tcp
,udp
].- Proxy
Protocol boolV2Enabled Whether to support carrying the client source address to the backend server through the Proxy Protocol. Valid values are
true
andfalse
. Default tofalse
.- 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 string
Scheduling algorithm, Valid values:
wrr
,rr
,wlc
,sch
,tcp
,qch
. Default towrr
. Only whenprotocol
istcp
orudp
,scheduler
can be set tosch
. Only when instance is guaranteed-performance instance andprotocol
istcp
orudp
,scheduler
can be set totch
. Only when instance is guaranteed-performance instance andprotocol
isudp
,scheduler
can be set toqch
.- Server
Certificate stringId SLB Server certificate ID. It is required when
protocol
ishttps
. Theserver_certificate_id
is also required when the value of thessl_certificate_id
is Empty.- Server
Group stringId the id of server group to be apply on the listener, is the id of resource
alicloud.slb.ServerGroup
.- Ssl
Certificate stringId SLB Server certificate ID. It has been deprecated from 1.59.0 and using
server_certificate_id
instead.Field 'ssl_certificate_id' has been deprecated from 1.59.0 and using 'server_certificate_id' instead.
- Sticky
Session string Whether to enable session persistence, Valid values are
on
andoff
. Default tooff
.- Sticky
Session stringType Mode for handling the cookie. If
sticky_session
is "on", it is mandatory. Otherwise, it will be ignored. Valid values areinsert
andserver
.insert
means it is inserted from Server Load Balancer;server
means the Server Load Balancer learns from the backend server.- Tls
Cipher stringPolicy 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 totls_cipher_policy_1_0
. Currently thetls_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 thehealth_check
parameter is set toon
.- XForwarded
For ListenerXForwarded For Args 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 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.- acl
Status String Whether to enable "acl(access control list)", the acl is specified by
acl_id
. Valid values areon
andoff
. Default tooff
.- acl
Type 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 arewhite
andblack
.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 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.
- ca
Certificate StringId SLB CA certificate ID. Only when
protocol
ishttps
can be specified.- String
The cookie configured on the server. It is mandatory when
sticky_session
is "on" andsticky_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 $.- Integer
Cookie timeout. It is mandatory when
sticky_session
is "on" andsticky_session_type
is "insert". Otherwise, it will be ignored. Valid value range: [1-86400] in seconds.- delete
Protection BooleanValidation 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.
- enable
Http2 String Whether to enable https listener support http2 or not. Valid values are
on
andoff
. Default toon
.- established
Timeout Integer Timeout of tcp listener established connection idle timeout. Valid value range: [10-900] in seconds. Default to 900.
- forward
Port Integer The port that http redirect to https.
- frontend
Port 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+.
- health
Check String Whether to enable health check. Valid values are
on
andoff
. TCP and UDP listener's HealthCheck is always on, so it will be ignore when launching TCP or UDP listener.- health
Check IntegerConnect Port 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 StringDomain 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 StringHttp Code Regular health check HTTP status code. Multiple codes are segmented by “,”. It is required when
health_check
is on. Default tohttp_2xx
. Valid values are:http_2xx
,http_3xx
,http_4xx
andhttp_5xx
.- health
Check IntegerInterval 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 StringMethod HealthCheckMethod used for health check.Valid values: ["head", "get"]
http
andhttps
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 IntegerTimeout 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: Ifhealth_check_timeout
<health_check_interval
, its will be replaced byhealth_check_interval
.- health
Check StringType Type of health check. Valid values are:
tcp
andhttp
. Default totcp
. TCP supports TCP and HTTP health check mode, you can select the particular mode depending on your application.- health
Check StringUri 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 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 thehealth_check
parameter is set toon
.- idle
Timeout Integer Timeout of http or https listener established connection idle timeout. Valid value range: [1-60] in seconds. Default to 15.
- instance
Port Integer Field 'instance_port' has been deprecated, and using 'backend_port' to replace.
- lb
Port Integer Field 'lb_port' has been deprecated, and using 'frontend_port' to replace.
- lb
Protocol String Field 'lb_protocol' has been deprecated, and using 'protocol' to replace.
- listener
Forward String Whether to enable http redirect to https, Valid values are
on
andoff
. Default tooff
.- load
Balancer StringId The Load Balancer ID which is used to launch a new listener.
- master
Slave StringServer Group Id The ID of the master slave server group.
- persistence
Timeout 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
].- proxy
Protocol BooleanV2Enabled Whether to support carrying the client source address to the backend server through the Proxy Protocol. Valid values are
true
andfalse
. Default tofalse
.- request
Timeout 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 towrr
. Only whenprotocol
istcp
orudp
,scheduler
can be set tosch
. Only when instance is guaranteed-performance instance andprotocol
istcp
orudp
,scheduler
can be set totch
. Only when instance is guaranteed-performance instance andprotocol
isudp
,scheduler
can be set toqch
.- server
Certificate StringId SLB Server certificate ID. It is required when
protocol
ishttps
. Theserver_certificate_id
is also required when the value of thessl_certificate_id
is Empty.- server
Group StringId the id of server group to be apply on the listener, is the id of resource
alicloud.slb.ServerGroup
.- ssl
Certificate StringId SLB Server certificate ID. It has been deprecated from 1.59.0 and using
server_certificate_id
instead.Field 'ssl_certificate_id' has been deprecated from 1.59.0 and using 'server_certificate_id' instead.
- sticky
Session String Whether to enable session persistence, Valid values are
on
andoff
. Default tooff
.- sticky
Session StringType Mode for handling the cookie. If
sticky_session
is "on", it is mandatory. Otherwise, it will be ignored. Valid values areinsert
andserver
.insert
means it is inserted from Server Load Balancer;server
means the Server Load Balancer learns from the backend server.- tls
Cipher StringPolicy 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 totls_cipher_policy_1_0
. Currently thetls_cipher_policy
can not be updated when load balancer instance is "Shared-Performance".- unhealthy
Threshold 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 thehealth_check
parameter is set toon
.- x
Forwarded ListenerFor XForwarded For Args 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 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.- acl
Status string Whether to enable "acl(access control list)", the acl is specified by
acl_id
. Valid values areon
andoff
. Default tooff
.- acl
Type 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 arewhite
andblack
.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 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.
- ca
Certificate stringId SLB CA certificate ID. Only when
protocol
ishttps
can be specified.- string
The cookie configured on the server. It is mandatory when
sticky_session
is "on" andsticky_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 $.- number
Cookie timeout. It is mandatory when
sticky_session
is "on" andsticky_session_type
is "insert". Otherwise, it will be ignored. Valid value range: [1-86400] in seconds.- delete
Protection booleanValidation 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.
- enable
Http2 string Whether to enable https listener support http2 or not. Valid values are
on
andoff
. Default toon
.- established
Timeout number Timeout of tcp listener established connection idle timeout. Valid value range: [10-900] in seconds. Default to 900.
- forward
Port number The port that http redirect to https.
- frontend
Port 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+.
- health
Check string Whether to enable health check. Valid values are
on
andoff
. TCP and UDP listener's HealthCheck is always on, so it will be ignore when launching TCP or UDP listener.- health
Check numberConnect Port 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 stringDomain 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 stringHttp Code Regular health check HTTP status code. Multiple codes are segmented by “,”. It is required when
health_check
is on. Default tohttp_2xx
. Valid values are:http_2xx
,http_3xx
,http_4xx
andhttp_5xx
.- health
Check numberInterval 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 stringMethod HealthCheckMethod used for health check.Valid values: ["head", "get"]
http
andhttps
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 numberTimeout 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: Ifhealth_check_timeout
<health_check_interval
, its will be replaced byhealth_check_interval
.- health
Check stringType Type of health check. Valid values are:
tcp
andhttp
. Default totcp
. TCP supports TCP and HTTP health check mode, you can select the particular mode depending on your application.- health
Check stringUri 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 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 thehealth_check
parameter is set toon
.- idle
Timeout number Timeout of http or https listener established connection idle timeout. Valid value range: [1-60] in seconds. Default to 15.
- instance
Port number Field 'instance_port' has been deprecated, and using 'backend_port' to replace.
- lb
Port number Field 'lb_port' has been deprecated, and using 'frontend_port' to replace.
- lb
Protocol string Field 'lb_protocol' has been deprecated, and using 'protocol' to replace.
- listener
Forward string Whether to enable http redirect to https, Valid values are
on
andoff
. Default tooff
.- load
Balancer stringId The Load Balancer ID which is used to launch a new listener.
- master
Slave stringServer Group Id The ID of the master slave server group.
- persistence
Timeout 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
].- proxy
Protocol booleanV2Enabled Whether to support carrying the client source address to the backend server through the Proxy Protocol. Valid values are
true
andfalse
. Default tofalse
.- request
Timeout 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 towrr
. Only whenprotocol
istcp
orudp
,scheduler
can be set tosch
. Only when instance is guaranteed-performance instance andprotocol
istcp
orudp
,scheduler
can be set totch
. Only when instance is guaranteed-performance instance andprotocol
isudp
,scheduler
can be set toqch
.- server
Certificate stringId SLB Server certificate ID. It is required when
protocol
ishttps
. Theserver_certificate_id
is also required when the value of thessl_certificate_id
is Empty.- server
Group stringId the id of server group to be apply on the listener, is the id of resource
alicloud.slb.ServerGroup
.- ssl
Certificate stringId SLB Server certificate ID. It has been deprecated from 1.59.0 and using
server_certificate_id
instead.Field 'ssl_certificate_id' has been deprecated from 1.59.0 and using 'server_certificate_id' instead.
- sticky
Session string Whether to enable session persistence, Valid values are
on
andoff
. Default tooff
.- sticky
Session stringType Mode for handling the cookie. If
sticky_session
is "on", it is mandatory. Otherwise, it will be ignored. Valid values areinsert
andserver
.insert
means it is inserted from Server Load Balancer;server
means the Server Load Balancer learns from the backend server.- tls
Cipher stringPolicy 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 totls_cipher_policy_1_0
. Currently thetls_cipher_policy
can not be updated when load balancer instance is "Shared-Performance".- unhealthy
Threshold 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 thehealth_check
parameter is set toon
.- x
Forwarded ListenerFor XForwarded For Args 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 areon
andoff
. Default tooff
.- 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 arewhite
andblack
.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_ strid SLB CA certificate ID. Only when
protocol
ishttps
can be specified.- str
The cookie configured on the server. It is mandatory when
sticky_session
is "on" andsticky_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 $.- int
Cookie timeout. It is mandatory when
sticky_session
is "on" andsticky_session_type
is "insert". Otherwise, it will be ignored. Valid value range: [1-86400] in seconds.- delete_
protection_ boolvalidation 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
andoff
. Default toon
.- 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 are
on
andoff
. TCP and UDP listener's HealthCheck is always on, so it will be ignore when launching TCP or UDP listener.- health_
check_ intconnect_ port 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_ strdomain 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_ strhttp_ code Regular health check HTTP status code. Multiple codes are segmented by “,”. It is required when
health_check
is on. Default tohttp_2xx
. Valid values are:http_2xx
,http_3xx
,http_4xx
andhttp_5xx
.- health_
check_ intinterval 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_ strmethod HealthCheckMethod used for health check.Valid values: ["head", "get"]
http
andhttps
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_ inttimeout 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: Ifhealth_check_timeout
<health_check_interval
, its will be replaced byhealth_check_interval
.- health_
check_ strtype Type of health check. Valid values are:
tcp
andhttp
. Default totcp
. TCP supports TCP and HTTP health check mode, you can select the particular mode depending on your application.- health_
check_ struri 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 thehealth_check
parameter is set toon
.- 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 Field 'instance_port' has been deprecated, and using 'backend_port' to replace.
- lb_
port int Field 'lb_port' has been deprecated, and using 'frontend_port' to replace.
- lb_
protocol str 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
andoff
. Default tooff
.- load_
balancer_ strid The Load Balancer ID which is used to launch a new listener.
- master_
slave_ strserver_ group_ id 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
].- proxy_
protocol_ boolv2_ enabled Whether to support carrying the client source address to the backend server through the Proxy Protocol. Valid values are
true
andfalse
. Default tofalse
.- 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 towrr
. Only whenprotocol
istcp
orudp
,scheduler
can be set tosch
. Only when instance is guaranteed-performance instance andprotocol
istcp
orudp
,scheduler
can be set totch
. Only when instance is guaranteed-performance instance andprotocol
isudp
,scheduler
can be set toqch
.- server_
certificate_ strid SLB Server certificate ID. It is required when
protocol
ishttps
. Theserver_certificate_id
is also required when the value of thessl_certificate_id
is Empty.- server_
group_ strid the id of server group to be apply on the listener, is the id of resource
alicloud.slb.ServerGroup
.- ssl_
certificate_ strid SLB Server certificate ID. It has been deprecated from 1.59.0 and using
server_certificate_id
instead.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
andoff
. Default tooff
.- sticky_
session_ strtype Mode for handling the cookie. If
sticky_session
is "on", it is mandatory. Otherwise, it will be ignored. Valid values areinsert
andserver
.insert
means it is inserted from Server Load Balancer;server
means the Server Load Balancer learns from the backend server.- tls_
cipher_ strpolicy 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 totls_cipher_policy_1_0
. Currently thetls_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 thehealth_check
parameter is set toon
.- x_
forwarded_ Listenerfor XForwarded For Args 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 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.- acl
Status String Whether to enable "acl(access control list)", the acl is specified by
acl_id
. Valid values areon
andoff
. Default tooff
.- acl
Type 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 arewhite
andblack
.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 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.
- ca
Certificate StringId SLB CA certificate ID. Only when
protocol
ishttps
can be specified.- String
The cookie configured on the server. It is mandatory when
sticky_session
is "on" andsticky_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 $.- Number
Cookie timeout. It is mandatory when
sticky_session
is "on" andsticky_session_type
is "insert". Otherwise, it will be ignored. Valid value range: [1-86400] in seconds.- delete
Protection BooleanValidation 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.
- enable
Http2 String Whether to enable https listener support http2 or not. Valid values are
on
andoff
. Default toon
.- established
Timeout Number Timeout of tcp listener established connection idle timeout. Valid value range: [10-900] in seconds. Default to 900.
- forward
Port Number The port that http redirect to https.
- frontend
Port 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+.
- health
Check String Whether to enable health check. Valid values are
on
andoff
. TCP and UDP listener's HealthCheck is always on, so it will be ignore when launching TCP or UDP listener.- health
Check NumberConnect Port 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 StringDomain 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 StringHttp Code Regular health check HTTP status code. Multiple codes are segmented by “,”. It is required when
health_check
is on. Default tohttp_2xx
. Valid values are:http_2xx
,http_3xx
,http_4xx
andhttp_5xx
.- health
Check NumberInterval 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 StringMethod HealthCheckMethod used for health check.Valid values: ["head", "get"]
http
andhttps
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 NumberTimeout 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: Ifhealth_check_timeout
<health_check_interval
, its will be replaced byhealth_check_interval
.- health
Check StringType Type of health check. Valid values are:
tcp
andhttp
. Default totcp
. TCP supports TCP and HTTP health check mode, you can select the particular mode depending on your application.- health
Check StringUri 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 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 thehealth_check
parameter is set toon
.- idle
Timeout Number Timeout of http or https listener established connection idle timeout. Valid value range: [1-60] in seconds. Default to 15.
- instance
Port Number Field 'instance_port' has been deprecated, and using 'backend_port' to replace.
- lb
Port Number Field 'lb_port' has been deprecated, and using 'frontend_port' to replace.
- lb
Protocol String Field 'lb_protocol' has been deprecated, and using 'protocol' to replace.
- listener
Forward String Whether to enable http redirect to https, Valid values are
on
andoff
. Default tooff
.- load
Balancer StringId The Load Balancer ID which is used to launch a new listener.
- master
Slave StringServer Group Id The ID of the master slave server group.
- persistence
Timeout 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
].- proxy
Protocol BooleanV2Enabled Whether to support carrying the client source address to the backend server through the Proxy Protocol. Valid values are
true
andfalse
. Default tofalse
.- request
Timeout 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 towrr
. Only whenprotocol
istcp
orudp
,scheduler
can be set tosch
. Only when instance is guaranteed-performance instance andprotocol
istcp
orudp
,scheduler
can be set totch
. Only when instance is guaranteed-performance instance andprotocol
isudp
,scheduler
can be set toqch
.- server
Certificate StringId SLB Server certificate ID. It is required when
protocol
ishttps
. Theserver_certificate_id
is also required when the value of thessl_certificate_id
is Empty.- server
Group StringId the id of server group to be apply on the listener, is the id of resource
alicloud.slb.ServerGroup
.- ssl
Certificate StringId SLB Server certificate ID. It has been deprecated from 1.59.0 and using
server_certificate_id
instead.Field 'ssl_certificate_id' has been deprecated from 1.59.0 and using 'server_certificate_id' instead.
- sticky
Session String Whether to enable session persistence, Valid values are
on
andoff
. Default tooff
.- sticky
Session StringType Mode for handling the cookie. If
sticky_session
is "on", it is mandatory. Otherwise, it will be ignored. Valid values areinsert
andserver
.insert
means it is inserted from Server Load Balancer;server
means the Server Load Balancer learns from the backend server.- tls
Cipher StringPolicy 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 totls_cipher_policy_1_0
. Currently thetls_cipher_policy
can not be updated when load balancer instance is "Shared-Performance".- unhealthy
Threshold 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 thehealth_check
parameter is set toon
.- x
Forwarded Property MapFor 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
- Retrive
Client boolIp - Retrive
Slb boolId Whether to use the XForwardedFor header to obtain the ID of the SLB instance. Default to false.
- Retrive
Slb boolIp Whether to use the XForwardedFor_SLBIP header to obtain the public IP address of the SLB instance. Default to false.
- Retrive
Slb boolProto Whether to use the XForwardedFor_proto header to obtain the protocol used by the listener. Default to false.
- Retrive
Client boolIp - Retrive
Slb boolId Whether to use the XForwardedFor header to obtain the ID of the SLB instance. Default to false.
- Retrive
Slb boolIp Whether to use the XForwardedFor_SLBIP header to obtain the public IP address of the SLB instance. Default to false.
- Retrive
Slb boolProto Whether to use the XForwardedFor_proto header to obtain the protocol used by the listener. Default to false.
- retrive
Client BooleanIp - retrive
Slb BooleanId Whether to use the XForwardedFor header to obtain the ID of the SLB instance. Default to false.
- retrive
Slb BooleanIp Whether to use the XForwardedFor_SLBIP header to obtain the public IP address of the SLB instance. Default to false.
- retrive
Slb BooleanProto Whether to use the XForwardedFor_proto header to obtain the protocol used by the listener. Default to false.
- retrive
Client booleanIp - retrive
Slb booleanId Whether to use the XForwardedFor header to obtain the ID of the SLB instance. Default to false.
- retrive
Slb booleanIp Whether to use the XForwardedFor_SLBIP header to obtain the public IP address of the SLB instance. Default to false.
- retrive
Slb booleanProto Whether to use the XForwardedFor_proto header to obtain the protocol used by the listener. Default to false.
- retrive_
client_ boolip - retrive_
slb_ boolid Whether to use the XForwardedFor header to obtain the ID of the SLB instance. Default to false.
- retrive_
slb_ boolip Whether to use the XForwardedFor_SLBIP header to obtain the public IP address of the SLB instance. Default to false.
- retrive_
slb_ boolproto Whether to use the XForwardedFor_proto header to obtain the protocol used by the listener. Default to false.
- retrive
Client BooleanIp - retrive
Slb BooleanId Whether to use the XForwardedFor header to obtain the ID of the SLB instance. Default to false.
- retrive
Slb BooleanIp Whether to use the XForwardedFor_SLBIP header to obtain the public IP address of the SLB instance. Default to false.
- retrive
Slb BooleanProto 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
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
alicloud
Terraform Provider.