alicloud.slb.Listener
Explore with Pulumi AI
Provides a Classic Load Balancer (SLB) Load Balancer Listener resource.
For information about Classic Load Balancer (SLB) and how to use it, see What is Classic Load Balancer.
For information about listener and how to use it, please see the following:
- Configure a HTTP Classic Load Balancer (SLB) Listener.
- Configure a HTTPS Classic Load Balancer (SLB) Listener.
- Configure a TCP Classic Load Balancer (SLB) Listener.
- Configure a UDP Classic Load Balancer (SLB) Listener.
NOTE: Available since v1.0.0.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
import * as random from "@pulumi/random";
const config = new pulumi.Config();
const name = config.get("name") || "tf-example";
const _default = new random.RandomInteger("default", {
min: 10000,
max: 99999,
});
const listenerApplicationLoadBalancer = new alicloud.slb.ApplicationLoadBalancer("listenerApplicationLoadBalancer", {
loadBalancerName: pulumi.interpolate`${name}-${_default.result}`,
internetChargeType: "PayByTraffic",
addressType: "internet",
instanceChargeType: "PayByCLCU",
});
const listenerAcl = new alicloud.slb.Acl("listenerAcl", {ipVersion: "ipv4"});
const listenerListener = new alicloud.slb.Listener("listenerListener", {
loadBalancerId: listenerApplicationLoadBalancer.id,
backendPort: 80,
frontendPort: 80,
protocol: "http",
bandwidth: 10,
stickySession: "on",
stickySessionType: "insert",
cookieTimeout: 86400,
cookie: "tfslblistenercookie",
healthCheck: "on",
healthCheckDomain: "ali.com",
healthCheckUri: "/cons",
healthCheckConnectPort: 20,
healthyThreshold: 8,
unhealthyThreshold: 8,
healthCheckTimeout: 8,
healthCheckInterval: 5,
healthCheckHttpCode: "http_2xx,http_3xx",
xForwardedFor: {
retriveSlbIp: true,
retriveSlbId: true,
},
aclStatus: "on",
aclType: "white",
aclId: listenerAcl.id,
requestTimeout: 80,
idleTimeout: 30,
});
const first = new alicloud.slb.AclEntryAttachment("first", {
aclId: listenerAcl.id,
entry: "10.10.10.0/24",
comment: "first",
});
const second = new alicloud.slb.AclEntryAttachment("second", {
aclId: listenerAcl.id,
entry: "168.10.10.0/24",
comment: "second",
});
import pulumi
import pulumi_alicloud as alicloud
import pulumi_random as random
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "tf-example"
default = random.RandomInteger("default",
min=10000,
max=99999)
listener_application_load_balancer = alicloud.slb.ApplicationLoadBalancer("listenerApplicationLoadBalancer",
load_balancer_name=default.result.apply(lambda result: f"{name}-{result}"),
internet_charge_type="PayByTraffic",
address_type="internet",
instance_charge_type="PayByCLCU")
listener_acl = alicloud.slb.Acl("listenerAcl", ip_version="ipv4")
listener_listener = alicloud.slb.Listener("listenerListener",
load_balancer_id=listener_application_load_balancer.id,
backend_port=80,
frontend_port=80,
protocol="http",
bandwidth=10,
sticky_session="on",
sticky_session_type="insert",
cookie_timeout=86400,
cookie="tfslblistenercookie",
health_check="on",
health_check_domain="ali.com",
health_check_uri="/cons",
health_check_connect_port=20,
healthy_threshold=8,
unhealthy_threshold=8,
health_check_timeout=8,
health_check_interval=5,
health_check_http_code="http_2xx,http_3xx",
x_forwarded_for=alicloud.slb.ListenerXForwardedForArgs(
retrive_slb_ip=True,
retrive_slb_id=True,
),
acl_status="on",
acl_type="white",
acl_id=listener_acl.id,
request_timeout=80,
idle_timeout=30)
first = alicloud.slb.AclEntryAttachment("first",
acl_id=listener_acl.id,
entry="10.10.10.0/24",
comment="first")
second = alicloud.slb.AclEntryAttachment("second",
acl_id=listener_acl.id,
entry="168.10.10.0/24",
comment="second")
package main
import (
"fmt"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/slb"
"github.com/pulumi/pulumi-random/sdk/v4/go/random"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
name := "tf-example"
if param := cfg.Get("name"); param != "" {
name = param
}
_, err := random.NewRandomInteger(ctx, "default", &random.RandomIntegerArgs{
Min: pulumi.Int(10000),
Max: pulumi.Int(99999),
})
if err != nil {
return err
}
listenerApplicationLoadBalancer, err := slb.NewApplicationLoadBalancer(ctx, "listenerApplicationLoadBalancer", &slb.ApplicationLoadBalancerArgs{
LoadBalancerName: _default.Result.ApplyT(func(result int) (string, error) {
return fmt.Sprintf("%v-%v", name, result), nil
}).(pulumi.StringOutput),
InternetChargeType: pulumi.String("PayByTraffic"),
AddressType: pulumi.String("internet"),
InstanceChargeType: pulumi.String("PayByCLCU"),
})
if err != nil {
return err
}
listenerAcl, err := slb.NewAcl(ctx, "listenerAcl", &slb.AclArgs{
IpVersion: pulumi.String("ipv4"),
})
if err != nil {
return err
}
_, err = slb.NewListener(ctx, "listenerListener", &slb.ListenerArgs{
LoadBalancerId: listenerApplicationLoadBalancer.ID(),
BackendPort: pulumi.Int(80),
FrontendPort: pulumi.Int(80),
Protocol: pulumi.String("http"),
Bandwidth: pulumi.Int(10),
StickySession: pulumi.String("on"),
StickySessionType: pulumi.String("insert"),
CookieTimeout: pulumi.Int(86400),
Cookie: pulumi.String("tfslblistenercookie"),
HealthCheck: pulumi.String("on"),
HealthCheckDomain: pulumi.String("ali.com"),
HealthCheckUri: pulumi.String("/cons"),
HealthCheckConnectPort: pulumi.Int(20),
HealthyThreshold: pulumi.Int(8),
UnhealthyThreshold: pulumi.Int(8),
HealthCheckTimeout: pulumi.Int(8),
HealthCheckInterval: pulumi.Int(5),
HealthCheckHttpCode: pulumi.String("http_2xx,http_3xx"),
XForwardedFor: &slb.ListenerXForwardedForArgs{
RetriveSlbIp: pulumi.Bool(true),
RetriveSlbId: pulumi.Bool(true),
},
AclStatus: pulumi.String("on"),
AclType: pulumi.String("white"),
AclId: listenerAcl.ID(),
RequestTimeout: pulumi.Int(80),
IdleTimeout: pulumi.Int(30),
})
if err != nil {
return err
}
_, err = slb.NewAclEntryAttachment(ctx, "first", &slb.AclEntryAttachmentArgs{
AclId: listenerAcl.ID(),
Entry: pulumi.String("10.10.10.0/24"),
Comment: pulumi.String("first"),
})
if err != nil {
return err
}
_, err = slb.NewAclEntryAttachment(ctx, "second", &slb.AclEntryAttachmentArgs{
AclId: listenerAcl.ID(),
Entry: pulumi.String("168.10.10.0/24"),
Comment: pulumi.String("second"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
using Random = Pulumi.Random;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var name = config.Get("name") ?? "tf-example";
var @default = new Random.RandomInteger("default", new()
{
Min = 10000,
Max = 99999,
});
var listenerApplicationLoadBalancer = new AliCloud.Slb.ApplicationLoadBalancer("listenerApplicationLoadBalancer", new()
{
LoadBalancerName = @default.Result.Apply(result => $"{name}-{result}"),
InternetChargeType = "PayByTraffic",
AddressType = "internet",
InstanceChargeType = "PayByCLCU",
});
var listenerAcl = new AliCloud.Slb.Acl("listenerAcl", new()
{
IpVersion = "ipv4",
});
var listenerListener = new AliCloud.Slb.Listener("listenerListener", new()
{
LoadBalancerId = listenerApplicationLoadBalancer.Id,
BackendPort = 80,
FrontendPort = 80,
Protocol = "http",
Bandwidth = 10,
StickySession = "on",
StickySessionType = "insert",
CookieTimeout = 86400,
Cookie = "tfslblistenercookie",
HealthCheck = "on",
HealthCheckDomain = "ali.com",
HealthCheckUri = "/cons",
HealthCheckConnectPort = 20,
HealthyThreshold = 8,
UnhealthyThreshold = 8,
HealthCheckTimeout = 8,
HealthCheckInterval = 5,
HealthCheckHttpCode = "http_2xx,http_3xx",
XForwardedFor = new AliCloud.Slb.Inputs.ListenerXForwardedForArgs
{
RetriveSlbIp = true,
RetriveSlbId = true,
},
AclStatus = "on",
AclType = "white",
AclId = listenerAcl.Id,
RequestTimeout = 80,
IdleTimeout = 30,
});
var first = new AliCloud.Slb.AclEntryAttachment("first", new()
{
AclId = listenerAcl.Id,
Entry = "10.10.10.0/24",
Comment = "first",
});
var second = new AliCloud.Slb.AclEntryAttachment("second", new()
{
AclId = listenerAcl.Id,
Entry = "168.10.10.0/24",
Comment = "second",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.random.RandomInteger;
import com.pulumi.random.RandomIntegerArgs;
import com.pulumi.alicloud.slb.ApplicationLoadBalancer;
import com.pulumi.alicloud.slb.ApplicationLoadBalancerArgs;
import com.pulumi.alicloud.slb.Acl;
import com.pulumi.alicloud.slb.AclArgs;
import com.pulumi.alicloud.slb.Listener;
import com.pulumi.alicloud.slb.ListenerArgs;
import com.pulumi.alicloud.slb.inputs.ListenerXForwardedForArgs;
import com.pulumi.alicloud.slb.AclEntryAttachment;
import com.pulumi.alicloud.slb.AclEntryAttachmentArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var config = ctx.config();
final var name = config.get("name").orElse("tf-example");
var default_ = new RandomInteger("default", RandomIntegerArgs.builder()
.min(10000)
.max(99999)
.build());
var listenerApplicationLoadBalancer = new ApplicationLoadBalancer("listenerApplicationLoadBalancer", ApplicationLoadBalancerArgs.builder()
.loadBalancerName(default_.result().applyValue(result -> String.format("%s-%s", name,result)))
.internetChargeType("PayByTraffic")
.addressType("internet")
.instanceChargeType("PayByCLCU")
.build());
var listenerAcl = new Acl("listenerAcl", AclArgs.builder()
.ipVersion("ipv4")
.build());
var listenerListener = new Listener("listenerListener", ListenerArgs.builder()
.loadBalancerId(listenerApplicationLoadBalancer.id())
.backendPort(80)
.frontendPort(80)
.protocol("http")
.bandwidth(10)
.stickySession("on")
.stickySessionType("insert")
.cookieTimeout(86400)
.cookie("tfslblistenercookie")
.healthCheck("on")
.healthCheckDomain("ali.com")
.healthCheckUri("/cons")
.healthCheckConnectPort(20)
.healthyThreshold(8)
.unhealthyThreshold(8)
.healthCheckTimeout(8)
.healthCheckInterval(5)
.healthCheckHttpCode("http_2xx,http_3xx")
.xForwardedFor(ListenerXForwardedForArgs.builder()
.retriveSlbIp(true)
.retriveSlbId(true)
.build())
.aclStatus("on")
.aclType("white")
.aclId(listenerAcl.id())
.requestTimeout(80)
.idleTimeout(30)
.build());
var first = new AclEntryAttachment("first", AclEntryAttachmentArgs.builder()
.aclId(listenerAcl.id())
.entry("10.10.10.0/24")
.comment("first")
.build());
var second = new AclEntryAttachment("second", AclEntryAttachmentArgs.builder()
.aclId(listenerAcl.id())
.entry("168.10.10.0/24")
.comment("second")
.build());
}
}
configuration:
name:
type: string
default: tf-example
resources:
default:
type: random:RandomInteger
properties:
min: 10000
max: 99999
listenerApplicationLoadBalancer:
type: alicloud:slb:ApplicationLoadBalancer
properties:
loadBalancerName: ${name}-${default.result}
internetChargeType: PayByTraffic
addressType: internet
instanceChargeType: PayByCLCU
listenerListener:
type: alicloud:slb:Listener
properties:
loadBalancerId: ${listenerApplicationLoadBalancer.id}
backendPort: 80
frontendPort: 80
protocol: http
bandwidth: 10
stickySession: on
stickySessionType: insert
cookieTimeout: 86400
cookie: tfslblistenercookie
healthCheck: on
healthCheckDomain: ali.com
healthCheckUri: /cons
healthCheckConnectPort: 20
healthyThreshold: 8
unhealthyThreshold: 8
healthCheckTimeout: 8
healthCheckInterval: 5
healthCheckHttpCode: http_2xx,http_3xx
xForwardedFor:
retriveSlbIp: true
retriveSlbId: true
aclStatus: on
aclType: white
aclId: ${listenerAcl.id}
requestTimeout: 80
idleTimeout: 30
listenerAcl:
type: alicloud:slb:Acl
properties:
ipVersion: ipv4
first:
type: alicloud:slb:AclEntryAttachment
properties:
aclId: ${listenerAcl.id}
entry: 10.10.10.0/24
comment: first
second:
type: alicloud:slb:AclEntryAttachment
properties:
aclId: ${listenerAcl.id}
entry: 168.10.10.0/24
comment: second
Create Listener Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Listener(name: string, args: ListenerArgs, opts?: CustomResourceOptions);
@overload
def Listener(resource_name: str,
args: ListenerArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Listener(resource_name: str,
opts: Optional[ResourceOptions] = None,
frontend_port: Optional[int] = None,
protocol: Optional[str] = None,
load_balancer_id: Optional[str] = None,
health_check_type: Optional[str] = None,
enable_http2: Optional[str] = None,
ca_certificate_id: Optional[str] = None,
health_check_uri: Optional[str] = None,
cookie_timeout: Optional[int] = None,
idle_timeout: Optional[int] = None,
description: Optional[str] = None,
healthy_threshold: Optional[int] = None,
established_timeout: Optional[int] = None,
forward_port: Optional[int] = None,
backend_port: Optional[int] = None,
gzip: Optional[bool] = None,
health_check: Optional[str] = None,
health_check_connect_port: Optional[int] = None,
health_check_domain: Optional[str] = None,
health_check_http_code: Optional[str] = None,
health_check_interval: Optional[int] = None,
health_check_method: Optional[str] = None,
health_check_timeout: Optional[int] = None,
acl_id: Optional[str] = None,
cookie: Optional[str] = None,
bandwidth: Optional[int] = None,
delete_protection_validation: Optional[bool] = None,
lb_port: Optional[int] = None,
lb_protocol: Optional[str] = None,
listener_forward: Optional[str] = None,
acl_type: Optional[str] = None,
master_slave_server_group_id: Optional[str] = None,
persistence_timeout: Optional[int] = None,
acl_status: Optional[str] = None,
proxy_protocol_v2_enabled: Optional[bool] = None,
request_timeout: Optional[int] = None,
scheduler: Optional[str] = None,
server_certificate_id: Optional[str] = None,
server_group_id: Optional[str] = None,
ssl_certificate_id: Optional[str] = None,
sticky_session: Optional[str] = None,
sticky_session_type: Optional[str] = None,
tls_cipher_policy: Optional[str] = None,
unhealthy_threshold: Optional[int] = None,
x_forwarded_for: Optional[ListenerXForwardedForArgs] = None)
func NewListener(ctx *Context, name string, args ListenerArgs, opts ...ResourceOption) (*Listener, error)
public Listener(string name, ListenerArgs args, CustomResourceOptions? opts = null)
public Listener(String name, ListenerArgs args)
public Listener(String name, ListenerArgs args, CustomResourceOptions options)
type: alicloud:slb:Listener
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args ListenerArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args ListenerArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ListenerArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ListenerArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ListenerArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Example
The following reference example uses placeholder values for all input properties.
var examplelistenerResourceResourceFromSlblistener = new AliCloud.Slb.Listener("examplelistenerResourceResourceFromSlblistener", new()
{
FrontendPort = 0,
Protocol = "string",
LoadBalancerId = "string",
HealthCheckType = "string",
EnableHttp2 = "string",
CaCertificateId = "string",
HealthCheckUri = "string",
CookieTimeout = 0,
IdleTimeout = 0,
Description = "string",
HealthyThreshold = 0,
EstablishedTimeout = 0,
ForwardPort = 0,
BackendPort = 0,
Gzip = false,
HealthCheck = "string",
HealthCheckConnectPort = 0,
HealthCheckDomain = "string",
HealthCheckHttpCode = "string",
HealthCheckInterval = 0,
HealthCheckMethod = "string",
HealthCheckTimeout = 0,
AclId = "string",
Cookie = "string",
Bandwidth = 0,
DeleteProtectionValidation = false,
ListenerForward = "string",
AclType = "string",
MasterSlaveServerGroupId = "string",
PersistenceTimeout = 0,
AclStatus = "string",
ProxyProtocolV2Enabled = false,
RequestTimeout = 0,
Scheduler = "string",
ServerCertificateId = "string",
ServerGroupId = "string",
StickySession = "string",
StickySessionType = "string",
TlsCipherPolicy = "string",
UnhealthyThreshold = 0,
XForwardedFor = new AliCloud.Slb.Inputs.ListenerXForwardedForArgs
{
RetriveClientIp = false,
RetriveSlbId = false,
RetriveSlbIp = false,
RetriveSlbProto = false,
},
});
example, err := slb.NewListener(ctx, "examplelistenerResourceResourceFromSlblistener", &slb.ListenerArgs{
FrontendPort: pulumi.Int(0),
Protocol: pulumi.String("string"),
LoadBalancerId: pulumi.String("string"),
HealthCheckType: pulumi.String("string"),
EnableHttp2: pulumi.String("string"),
CaCertificateId: pulumi.String("string"),
HealthCheckUri: pulumi.String("string"),
CookieTimeout: pulumi.Int(0),
IdleTimeout: pulumi.Int(0),
Description: pulumi.String("string"),
HealthyThreshold: pulumi.Int(0),
EstablishedTimeout: pulumi.Int(0),
ForwardPort: pulumi.Int(0),
BackendPort: pulumi.Int(0),
Gzip: pulumi.Bool(false),
HealthCheck: pulumi.String("string"),
HealthCheckConnectPort: pulumi.Int(0),
HealthCheckDomain: pulumi.String("string"),
HealthCheckHttpCode: pulumi.String("string"),
HealthCheckInterval: pulumi.Int(0),
HealthCheckMethod: pulumi.String("string"),
HealthCheckTimeout: pulumi.Int(0),
AclId: pulumi.String("string"),
Cookie: pulumi.String("string"),
Bandwidth: pulumi.Int(0),
DeleteProtectionValidation: pulumi.Bool(false),
ListenerForward: pulumi.String("string"),
AclType: pulumi.String("string"),
MasterSlaveServerGroupId: pulumi.String("string"),
PersistenceTimeout: pulumi.Int(0),
AclStatus: pulumi.String("string"),
ProxyProtocolV2Enabled: pulumi.Bool(false),
RequestTimeout: pulumi.Int(0),
Scheduler: pulumi.String("string"),
ServerCertificateId: pulumi.String("string"),
ServerGroupId: pulumi.String("string"),
StickySession: pulumi.String("string"),
StickySessionType: pulumi.String("string"),
TlsCipherPolicy: pulumi.String("string"),
UnhealthyThreshold: pulumi.Int(0),
XForwardedFor: &slb.ListenerXForwardedForArgs{
RetriveClientIp: pulumi.Bool(false),
RetriveSlbId: pulumi.Bool(false),
RetriveSlbIp: pulumi.Bool(false),
RetriveSlbProto: pulumi.Bool(false),
},
})
var examplelistenerResourceResourceFromSlblistener = new Listener("examplelistenerResourceResourceFromSlblistener", ListenerArgs.builder()
.frontendPort(0)
.protocol("string")
.loadBalancerId("string")
.healthCheckType("string")
.enableHttp2("string")
.caCertificateId("string")
.healthCheckUri("string")
.cookieTimeout(0)
.idleTimeout(0)
.description("string")
.healthyThreshold(0)
.establishedTimeout(0)
.forwardPort(0)
.backendPort(0)
.gzip(false)
.healthCheck("string")
.healthCheckConnectPort(0)
.healthCheckDomain("string")
.healthCheckHttpCode("string")
.healthCheckInterval(0)
.healthCheckMethod("string")
.healthCheckTimeout(0)
.aclId("string")
.cookie("string")
.bandwidth(0)
.deleteProtectionValidation(false)
.listenerForward("string")
.aclType("string")
.masterSlaveServerGroupId("string")
.persistenceTimeout(0)
.aclStatus("string")
.proxyProtocolV2Enabled(false)
.requestTimeout(0)
.scheduler("string")
.serverCertificateId("string")
.serverGroupId("string")
.stickySession("string")
.stickySessionType("string")
.tlsCipherPolicy("string")
.unhealthyThreshold(0)
.xForwardedFor(ListenerXForwardedForArgs.builder()
.retriveClientIp(false)
.retriveSlbId(false)
.retriveSlbIp(false)
.retriveSlbProto(false)
.build())
.build());
examplelistener_resource_resource_from_slblistener = alicloud.slb.Listener("examplelistenerResourceResourceFromSlblistener",
frontend_port=0,
protocol="string",
load_balancer_id="string",
health_check_type="string",
enable_http2="string",
ca_certificate_id="string",
health_check_uri="string",
cookie_timeout=0,
idle_timeout=0,
description="string",
healthy_threshold=0,
established_timeout=0,
forward_port=0,
backend_port=0,
gzip=False,
health_check="string",
health_check_connect_port=0,
health_check_domain="string",
health_check_http_code="string",
health_check_interval=0,
health_check_method="string",
health_check_timeout=0,
acl_id="string",
cookie="string",
bandwidth=0,
delete_protection_validation=False,
listener_forward="string",
acl_type="string",
master_slave_server_group_id="string",
persistence_timeout=0,
acl_status="string",
proxy_protocol_v2_enabled=False,
request_timeout=0,
scheduler="string",
server_certificate_id="string",
server_group_id="string",
sticky_session="string",
sticky_session_type="string",
tls_cipher_policy="string",
unhealthy_threshold=0,
x_forwarded_for=alicloud.slb.ListenerXForwardedForArgs(
retrive_client_ip=False,
retrive_slb_id=False,
retrive_slb_ip=False,
retrive_slb_proto=False,
))
const examplelistenerResourceResourceFromSlblistener = new alicloud.slb.Listener("examplelistenerResourceResourceFromSlblistener", {
frontendPort: 0,
protocol: "string",
loadBalancerId: "string",
healthCheckType: "string",
enableHttp2: "string",
caCertificateId: "string",
healthCheckUri: "string",
cookieTimeout: 0,
idleTimeout: 0,
description: "string",
healthyThreshold: 0,
establishedTimeout: 0,
forwardPort: 0,
backendPort: 0,
gzip: false,
healthCheck: "string",
healthCheckConnectPort: 0,
healthCheckDomain: "string",
healthCheckHttpCode: "string",
healthCheckInterval: 0,
healthCheckMethod: "string",
healthCheckTimeout: 0,
aclId: "string",
cookie: "string",
bandwidth: 0,
deleteProtectionValidation: false,
listenerForward: "string",
aclType: "string",
masterSlaveServerGroupId: "string",
persistenceTimeout: 0,
aclStatus: "string",
proxyProtocolV2Enabled: false,
requestTimeout: 0,
scheduler: "string",
serverCertificateId: "string",
serverGroupId: "string",
stickySession: "string",
stickySessionType: "string",
tlsCipherPolicy: "string",
unhealthyThreshold: 0,
xForwardedFor: {
retriveClientIp: false,
retriveSlbId: false,
retriveSlbIp: false,
retriveSlbProto: false,
},
});
type: alicloud:slb:Listener
properties:
aclId: string
aclStatus: string
aclType: string
backendPort: 0
bandwidth: 0
caCertificateId: string
cookie: string
cookieTimeout: 0
deleteProtectionValidation: false
description: string
enableHttp2: string
establishedTimeout: 0
forwardPort: 0
frontendPort: 0
gzip: false
healthCheck: string
healthCheckConnectPort: 0
healthCheckDomain: string
healthCheckHttpCode: string
healthCheckInterval: 0
healthCheckMethod: string
healthCheckTimeout: 0
healthCheckType: string
healthCheckUri: string
healthyThreshold: 0
idleTimeout: 0
listenerForward: string
loadBalancerId: string
masterSlaveServerGroupId: string
persistenceTimeout: 0
protocol: string
proxyProtocolV2Enabled: false
requestTimeout: 0
scheduler: string
serverCertificateId: string
serverGroupId: string
stickySession: string
stickySessionType: string
tlsCipherPolicy: string
unhealthyThreshold: 0
xForwardedFor:
retriveClientIp: false
retriveSlbId: false
retriveSlbIp: false
retriveSlbProto: false
Listener Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The Listener resource accepts the following input properties:
- Frontend
Port int - The frontend port that is used by the CLB instance. Valid values:
1
to65535
. - Load
Balancer stringId - The Load Balancer ID which is used to launch a new listener.
- Protocol string
- The protocol to listen on. Valid values:
http
. - Acl
Id string - The ID of the network ACL that is associated with the listener. NOTE: If
acl_status
is set toon
,acl_id
is required. Otherwise, it will be ignored. - Acl
Status string - Specifies whether to enable access control. Default value:
off
. Valid values:on
,off
. - Acl
Type string - The type of the network ACL. Valid values:
black
,white
. NOTE: Ifacl_status
is set toon
,acl_type
is required. Otherwise, it will be ignored. - Backend
Port int - The backend port that is used by the CLB instance. Valid values:
1
to65535
. NOTE: Ifserver_group_id
is not set,backend_port
is required. - Bandwidth int
- The maximum bandwidth of the listener. Unit: Mbit/s. Valid values:
-1
: If you setbandwidth
to-1
, the bandwidth of the listener is unlimited.
- Ca
Certificate stringId - The ID of the certification authority (CA) certificate.
- string
- The cookie that is configured on the server. The
cookie
must be1
to200
characters in length and can contain only ASCII characters and digits. It cannot contain commas (,), semicolons (;), or space characters. It cannot start with a dollar sign ($). NOTE: Ifsticky_session
is set toon
, andsticky_session_type
is set toserver
,cookie
is required. Otherwise, it will be ignored. - int
- The timeout period of a cookie. Unit: seconds. Valid values:
1
to86400
. NOTE: Ifsticky_session
is set toon
, andsticky_session_type
is set toinsert
,cookie_timeout
is required. Otherwise, it will be ignored. - 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 value:
false
. - Description string
- The name of the listener. The name must be 1 to 256 characters in length, and can contain letters, digits, hyphens (-), forward slashes (/), periods (.), and underscores (_).
- Enable
Http2 string - Specifies whether to enable HTTP/2. Default value:
on
. Valid values:on
,off
. - Established
Timeout int - The timeout period of a connection. Unit: seconds. Default value:
900
. Valid values:10
to900
. - Forward
Port int - The listening port that is used to redirect HTTP requests to HTTPS.
- Gzip bool
- Specifies whether to enable GZIP compression to compress specific types of files. Default value:
true
. Valid values:true
,false
. - Health
Check string - Specifies whether to enable the health check feature. Default value:
on
. Valid values:on
,off
. NOTE:TCP
andUDP
listener's HealthCheck is always on, so it will be ignored when launchingTCP
orUDP
listener. - Health
Check intConnect Port - The backend port that is used for health checks. Valid values:
0
to65535
. NOTE:health_check_connect_port
takes effect only ifhealth_check
is set toon
. - Health
Check stringDomain - The domain name that is used for health checks. NOTE:
health_check_domain
takes effect only ifhealth_check
is set toon
. - Health
Check stringHttp Code - The HTTP status code for a successful health check. Separate multiple HTTP status codes with commas (
,
). Default value:http_2xx
. Valid values:http_2xx
,http_3xx
,http_4xx
andhttp_5xx
. NOTE:health_check_http_code
takes effect only ifhealth_check
is set toon
. - Health
Check intInterval - The interval between two consecutive health checks. Unit: seconds. Default value:
2
. Valid values:1
to50
. NOTE:health_check_interval
takes effect only ifhealth_check
is set toon
. - Health
Check stringMethod - The health check method used in HTTP health checks. Valid values:
head
,get
. NOTE:health_check_method
takes effect only ifhealth_check
is set toon
. - Health
Check intTimeout - The timeout period of a health check response. Unit: seconds. Default value:
5
. Valid values:1
to300
. NOTE: Ifhealth_check_timeout
<health_check_interval
,health_check_timeout
will be replaced byhealth_check_interval
.health_check_timeout
takes effect only ifhealth_check
is set toon
. - Health
Check stringType - The type of health checks. Default value:
tcp
. Valid values:tcp
,http
. - Health
Check stringUri - The URI that is used for health checks. The
health_check_uri
must be1
to80
characters in length, and can contain letters, digits, hyphens (-), forward slashes (/), periods (.), percent signs (%), question marks (?), number signs (#), and ampersands (&). The URI must start with a forward slash (/) but cannot be a single forward slash (/). NOTE:health_check_uri
takes effect only ifhealth_check
is set toon
. - Healthy
Threshold int - The number of times that an unhealthy backend server must consecutively pass health checks before it is declared healthy. Default value:
3
. Valid values:2
to10
. NOTE:healthy_threshold
takes effect only ifhealth_check
is set toon
. - Idle
Timeout int - The timeout period of an idle connection. Unit: seconds. Default value:
15
. Valid values:1
to60
. - Lb
Port int - Lb
Protocol string - Listener
Forward string - Specifies whether to enable HTTP-to-HTTPS redirection. Default value:
off
. Valid values:on
,off
. - Master
Slave stringServer Group Id - The ID of the primary/secondary server group. NOTE: You cannot set both
server_group_id
andmaster_slave_server_group_id
. - Persistence
Timeout int - The timeout period of session persistence. Unit: seconds. Default value:
0
. Valid values:0
to3600
. - Proxy
Protocol boolV2Enabled - Specifies whether to use the Proxy protocol to pass client IP addresses to backend servers. Default value:
false
. Valid values:true
,false
. - Request
Timeout int - The timeout period of a request. Unit: seconds. Default value:
60
. Valid values:1
to180
. - Scheduler string
- The scheduling algorithm. Default value:
wrr
. Valid values: - Server
Certificate stringId - The ID of the server certificate. NOTE:
server_certificate_id
is also required when the value of thessl_certificate_id
is Empty. - Server
Group stringId - The ID of the vServer group. It's the ID of resource
alicloud.slb.ServerGroup
. - Ssl
Certificate stringId - The ID of the server certificate. NOTE: Field
ssl_certificate_id
has been deprecated from provider version 1.59.0. New fieldserver_certificate_id
instead. - Sticky
Session string - Specifies whether to enable session persistence. Default value:
off
. Valid values:on
,off
. - Sticky
Session stringType - The method that is used to handle a cookie. Valid values:
insert
,server
. NOTE: Ifsticky_session
is set toon
,sticky_session_type
is required. Otherwise, it will be ignored. - Tls
Cipher stringPolicy - The Transport Layer Security (TLS) security policy. Default value:
tls_cipher_policy_1_0
. Valid values:tls_cipher_policy_1_0
,tls_cipher_policy_1_1
,tls_cipher_policy_1_2
,tls_cipher_policy_1_2_strict
. - Unhealthy
Threshold int - The number of times that a healthy backend server must consecutively fail health checks before it is declared unhealthy. Default value:
3
. Valid values:2
to10
. NOTE:unhealthy_threshold
takes effect only ifhealth_check
is set toon
. - XForwarded
For Pulumi.Ali Cloud. Slb. Inputs. Listener XForwarded For - Whether to set additional HTTP Header field "X-Forwarded-For". See
x_forwarded_for
below.
- Frontend
Port int - The frontend port that is used by the CLB instance. Valid values:
1
to65535
. - Load
Balancer stringId - The Load Balancer ID which is used to launch a new listener.
- Protocol string
- The protocol to listen on. Valid values:
http
. - Acl
Id string - The ID of the network ACL that is associated with the listener. NOTE: If
acl_status
is set toon
,acl_id
is required. Otherwise, it will be ignored. - Acl
Status string - Specifies whether to enable access control. Default value:
off
. Valid values:on
,off
. - Acl
Type string - The type of the network ACL. Valid values:
black
,white
. NOTE: Ifacl_status
is set toon
,acl_type
is required. Otherwise, it will be ignored. - Backend
Port int - The backend port that is used by the CLB instance. Valid values:
1
to65535
. NOTE: Ifserver_group_id
is not set,backend_port
is required. - Bandwidth int
- The maximum bandwidth of the listener. Unit: Mbit/s. Valid values:
-1
: If you setbandwidth
to-1
, the bandwidth of the listener is unlimited.
- Ca
Certificate stringId - The ID of the certification authority (CA) certificate.
- string
- The cookie that is configured on the server. The
cookie
must be1
to200
characters in length and can contain only ASCII characters and digits. It cannot contain commas (,), semicolons (;), or space characters. It cannot start with a dollar sign ($). NOTE: Ifsticky_session
is set toon
, andsticky_session_type
is set toserver
,cookie
is required. Otherwise, it will be ignored. - int
- The timeout period of a cookie. Unit: seconds. Valid values:
1
to86400
. NOTE: Ifsticky_session
is set toon
, andsticky_session_type
is set toinsert
,cookie_timeout
is required. Otherwise, it will be ignored. - 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 value:
false
. - Description string
- The name of the listener. The name must be 1 to 256 characters in length, and can contain letters, digits, hyphens (-), forward slashes (/), periods (.), and underscores (_).
- Enable
Http2 string - Specifies whether to enable HTTP/2. Default value:
on
. Valid values:on
,off
. - Established
Timeout int - The timeout period of a connection. Unit: seconds. Default value:
900
. Valid values:10
to900
. - Forward
Port int - The listening port that is used to redirect HTTP requests to HTTPS.
- Gzip bool
- Specifies whether to enable GZIP compression to compress specific types of files. Default value:
true
. Valid values:true
,false
. - Health
Check string - Specifies whether to enable the health check feature. Default value:
on
. Valid values:on
,off
. NOTE:TCP
andUDP
listener's HealthCheck is always on, so it will be ignored when launchingTCP
orUDP
listener. - Health
Check intConnect Port - The backend port that is used for health checks. Valid values:
0
to65535
. NOTE:health_check_connect_port
takes effect only ifhealth_check
is set toon
. - Health
Check stringDomain - The domain name that is used for health checks. NOTE:
health_check_domain
takes effect only ifhealth_check
is set toon
. - Health
Check stringHttp Code - The HTTP status code for a successful health check. Separate multiple HTTP status codes with commas (
,
). Default value:http_2xx
. Valid values:http_2xx
,http_3xx
,http_4xx
andhttp_5xx
. NOTE:health_check_http_code
takes effect only ifhealth_check
is set toon
. - Health
Check intInterval - The interval between two consecutive health checks. Unit: seconds. Default value:
2
. Valid values:1
to50
. NOTE:health_check_interval
takes effect only ifhealth_check
is set toon
. - Health
Check stringMethod - The health check method used in HTTP health checks. Valid values:
head
,get
. NOTE:health_check_method
takes effect only ifhealth_check
is set toon
. - Health
Check intTimeout - The timeout period of a health check response. Unit: seconds. Default value:
5
. Valid values:1
to300
. NOTE: Ifhealth_check_timeout
<health_check_interval
,health_check_timeout
will be replaced byhealth_check_interval
.health_check_timeout
takes effect only ifhealth_check
is set toon
. - Health
Check stringType - The type of health checks. Default value:
tcp
. Valid values:tcp
,http
. - Health
Check stringUri - The URI that is used for health checks. The
health_check_uri
must be1
to80
characters in length, and can contain letters, digits, hyphens (-), forward slashes (/), periods (.), percent signs (%), question marks (?), number signs (#), and ampersands (&). The URI must start with a forward slash (/) but cannot be a single forward slash (/). NOTE:health_check_uri
takes effect only ifhealth_check
is set toon
. - Healthy
Threshold int - The number of times that an unhealthy backend server must consecutively pass health checks before it is declared healthy. Default value:
3
. Valid values:2
to10
. NOTE:healthy_threshold
takes effect only ifhealth_check
is set toon
. - Idle
Timeout int - The timeout period of an idle connection. Unit: seconds. Default value:
15
. Valid values:1
to60
. - Lb
Port int - Lb
Protocol string - Listener
Forward string - Specifies whether to enable HTTP-to-HTTPS redirection. Default value:
off
. Valid values:on
,off
. - Master
Slave stringServer Group Id - The ID of the primary/secondary server group. NOTE: You cannot set both
server_group_id
andmaster_slave_server_group_id
. - Persistence
Timeout int - The timeout period of session persistence. Unit: seconds. Default value:
0
. Valid values:0
to3600
. - Proxy
Protocol boolV2Enabled - Specifies whether to use the Proxy protocol to pass client IP addresses to backend servers. Default value:
false
. Valid values:true
,false
. - Request
Timeout int - The timeout period of a request. Unit: seconds. Default value:
60
. Valid values:1
to180
. - Scheduler string
- The scheduling algorithm. Default value:
wrr
. Valid values: - Server
Certificate stringId - The ID of the server certificate. NOTE:
server_certificate_id
is also required when the value of thessl_certificate_id
is Empty. - Server
Group stringId - The ID of the vServer group. It's the ID of resource
alicloud.slb.ServerGroup
. - Ssl
Certificate stringId - The ID of the server certificate. NOTE: Field
ssl_certificate_id
has been deprecated from provider version 1.59.0. New fieldserver_certificate_id
instead. - Sticky
Session string - Specifies whether to enable session persistence. Default value:
off
. Valid values:on
,off
. - Sticky
Session stringType - The method that is used to handle a cookie. Valid values:
insert
,server
. NOTE: Ifsticky_session
is set toon
,sticky_session_type
is required. Otherwise, it will be ignored. - Tls
Cipher stringPolicy - The Transport Layer Security (TLS) security policy. Default value:
tls_cipher_policy_1_0
. Valid values:tls_cipher_policy_1_0
,tls_cipher_policy_1_1
,tls_cipher_policy_1_2
,tls_cipher_policy_1_2_strict
. - Unhealthy
Threshold int - The number of times that a healthy backend server must consecutively fail health checks before it is declared unhealthy. Default value:
3
. Valid values:2
to10
. NOTE:unhealthy_threshold
takes effect only ifhealth_check
is set toon
. - XForwarded
For ListenerXForwarded For Args - Whether to set additional HTTP Header field "X-Forwarded-For". See
x_forwarded_for
below.
- frontend
Port Integer - The frontend port that is used by the CLB instance. Valid values:
1
to65535
. - load
Balancer StringId - The Load Balancer ID which is used to launch a new listener.
- protocol String
- The protocol to listen on. Valid values:
http
. - acl
Id String - The ID of the network ACL that is associated with the listener. NOTE: If
acl_status
is set toon
,acl_id
is required. Otherwise, it will be ignored. - acl
Status String - Specifies whether to enable access control. Default value:
off
. Valid values:on
,off
. - acl
Type String - The type of the network ACL. Valid values:
black
,white
. NOTE: Ifacl_status
is set toon
,acl_type
is required. Otherwise, it will be ignored. - backend
Port Integer - The backend port that is used by the CLB instance. Valid values:
1
to65535
. NOTE: Ifserver_group_id
is not set,backend_port
is required. - bandwidth Integer
- The maximum bandwidth of the listener. Unit: Mbit/s. Valid values:
-1
: If you setbandwidth
to-1
, the bandwidth of the listener is unlimited.
- ca
Certificate StringId - The ID of the certification authority (CA) certificate.
- String
- The cookie that is configured on the server. The
cookie
must be1
to200
characters in length and can contain only ASCII characters and digits. It cannot contain commas (,), semicolons (;), or space characters. It cannot start with a dollar sign ($). NOTE: Ifsticky_session
is set toon
, andsticky_session_type
is set toserver
,cookie
is required. Otherwise, it will be ignored. - Integer
- The timeout period of a cookie. Unit: seconds. Valid values:
1
to86400
. NOTE: Ifsticky_session
is set toon
, andsticky_session_type
is set toinsert
,cookie_timeout
is required. Otherwise, it will be ignored. - 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 value:
false
. - description String
- The name of the listener. The name must be 1 to 256 characters in length, and can contain letters, digits, hyphens (-), forward slashes (/), periods (.), and underscores (_).
- enable
Http2 String - Specifies whether to enable HTTP/2. Default value:
on
. Valid values:on
,off
. - established
Timeout Integer - The timeout period of a connection. Unit: seconds. Default value:
900
. Valid values:10
to900
. - forward
Port Integer - The listening port that is used to redirect HTTP requests to HTTPS.
- gzip Boolean
- Specifies whether to enable GZIP compression to compress specific types of files. Default value:
true
. Valid values:true
,false
. - health
Check String - Specifies whether to enable the health check feature. Default value:
on
. Valid values:on
,off
. NOTE:TCP
andUDP
listener's HealthCheck is always on, so it will be ignored when launchingTCP
orUDP
listener. - health
Check IntegerConnect Port - The backend port that is used for health checks. Valid values:
0
to65535
. NOTE:health_check_connect_port
takes effect only ifhealth_check
is set toon
. - health
Check StringDomain - The domain name that is used for health checks. NOTE:
health_check_domain
takes effect only ifhealth_check
is set toon
. - health
Check StringHttp Code - The HTTP status code for a successful health check. Separate multiple HTTP status codes with commas (
,
). Default value:http_2xx
. Valid values:http_2xx
,http_3xx
,http_4xx
andhttp_5xx
. NOTE:health_check_http_code
takes effect only ifhealth_check
is set toon
. - health
Check IntegerInterval - The interval between two consecutive health checks. Unit: seconds. Default value:
2
. Valid values:1
to50
. NOTE:health_check_interval
takes effect only ifhealth_check
is set toon
. - health
Check StringMethod - The health check method used in HTTP health checks. Valid values:
head
,get
. NOTE:health_check_method
takes effect only ifhealth_check
is set toon
. - health
Check IntegerTimeout - The timeout period of a health check response. Unit: seconds. Default value:
5
. Valid values:1
to300
. NOTE: Ifhealth_check_timeout
<health_check_interval
,health_check_timeout
will be replaced byhealth_check_interval
.health_check_timeout
takes effect only ifhealth_check
is set toon
. - health
Check StringType - The type of health checks. Default value:
tcp
. Valid values:tcp
,http
. - health
Check StringUri - The URI that is used for health checks. The
health_check_uri
must be1
to80
characters in length, and can contain letters, digits, hyphens (-), forward slashes (/), periods (.), percent signs (%), question marks (?), number signs (#), and ampersands (&). The URI must start with a forward slash (/) but cannot be a single forward slash (/). NOTE:health_check_uri
takes effect only ifhealth_check
is set toon
. - healthy
Threshold Integer - The number of times that an unhealthy backend server must consecutively pass health checks before it is declared healthy. Default value:
3
. Valid values:2
to10
. NOTE:healthy_threshold
takes effect only ifhealth_check
is set toon
. - idle
Timeout Integer - The timeout period of an idle connection. Unit: seconds. Default value:
15
. Valid values:1
to60
. - lb
Port Integer - lb
Protocol String - listener
Forward String - Specifies whether to enable HTTP-to-HTTPS redirection. Default value:
off
. Valid values:on
,off
. - master
Slave StringServer Group Id - The ID of the primary/secondary server group. NOTE: You cannot set both
server_group_id
andmaster_slave_server_group_id
. - persistence
Timeout Integer - The timeout period of session persistence. Unit: seconds. Default value:
0
. Valid values:0
to3600
. - proxy
Protocol BooleanV2Enabled - Specifies whether to use the Proxy protocol to pass client IP addresses to backend servers. Default value:
false
. Valid values:true
,false
. - request
Timeout Integer - The timeout period of a request. Unit: seconds. Default value:
60
. Valid values:1
to180
. - scheduler String
- The scheduling algorithm. Default value:
wrr
. Valid values: - server
Certificate StringId - The ID of the server certificate. NOTE:
server_certificate_id
is also required when the value of thessl_certificate_id
is Empty. - server
Group StringId - The ID of the vServer group. It's the ID of resource
alicloud.slb.ServerGroup
. - ssl
Certificate StringId - The ID of the server certificate. NOTE: Field
ssl_certificate_id
has been deprecated from provider version 1.59.0. New fieldserver_certificate_id
instead. - sticky
Session String - Specifies whether to enable session persistence. Default value:
off
. Valid values:on
,off
. - sticky
Session StringType - The method that is used to handle a cookie. Valid values:
insert
,server
. NOTE: Ifsticky_session
is set toon
,sticky_session_type
is required. Otherwise, it will be ignored. - tls
Cipher StringPolicy - The Transport Layer Security (TLS) security policy. Default value:
tls_cipher_policy_1_0
. Valid values:tls_cipher_policy_1_0
,tls_cipher_policy_1_1
,tls_cipher_policy_1_2
,tls_cipher_policy_1_2_strict
. - unhealthy
Threshold Integer - The number of times that a healthy backend server must consecutively fail health checks before it is declared unhealthy. Default value:
3
. Valid values:2
to10
. NOTE:unhealthy_threshold
takes effect only ifhealth_check
is set toon
. - x
Forwarded ListenerFor XForwarded For - Whether to set additional HTTP Header field "X-Forwarded-For". See
x_forwarded_for
below.
- frontend
Port number - The frontend port that is used by the CLB instance. Valid values:
1
to65535
. - load
Balancer stringId - The Load Balancer ID which is used to launch a new listener.
- protocol string
- The protocol to listen on. Valid values:
http
. - acl
Id string - The ID of the network ACL that is associated with the listener. NOTE: If
acl_status
is set toon
,acl_id
is required. Otherwise, it will be ignored. - acl
Status string - Specifies whether to enable access control. Default value:
off
. Valid values:on
,off
. - acl
Type string - The type of the network ACL. Valid values:
black
,white
. NOTE: Ifacl_status
is set toon
,acl_type
is required. Otherwise, it will be ignored. - backend
Port number - The backend port that is used by the CLB instance. Valid values:
1
to65535
. NOTE: Ifserver_group_id
is not set,backend_port
is required. - bandwidth number
- The maximum bandwidth of the listener. Unit: Mbit/s. Valid values:
-1
: If you setbandwidth
to-1
, the bandwidth of the listener is unlimited.
- ca
Certificate stringId - The ID of the certification authority (CA) certificate.
- string
- The cookie that is configured on the server. The
cookie
must be1
to200
characters in length and can contain only ASCII characters and digits. It cannot contain commas (,), semicolons (;), or space characters. It cannot start with a dollar sign ($). NOTE: Ifsticky_session
is set toon
, andsticky_session_type
is set toserver
,cookie
is required. Otherwise, it will be ignored. - number
- The timeout period of a cookie. Unit: seconds. Valid values:
1
to86400
. NOTE: Ifsticky_session
is set toon
, andsticky_session_type
is set toinsert
,cookie_timeout
is required. Otherwise, it will be ignored. - 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 value:
false
. - description string
- The name of the listener. The name must be 1 to 256 characters in length, and can contain letters, digits, hyphens (-), forward slashes (/), periods (.), and underscores (_).
- enable
Http2 string - Specifies whether to enable HTTP/2. Default value:
on
. Valid values:on
,off
. - established
Timeout number - The timeout period of a connection. Unit: seconds. Default value:
900
. Valid values:10
to900
. - forward
Port number - The listening port that is used to redirect HTTP requests to HTTPS.
- gzip boolean
- Specifies whether to enable GZIP compression to compress specific types of files. Default value:
true
. Valid values:true
,false
. - health
Check string - Specifies whether to enable the health check feature. Default value:
on
. Valid values:on
,off
. NOTE:TCP
andUDP
listener's HealthCheck is always on, so it will be ignored when launchingTCP
orUDP
listener. - health
Check numberConnect Port - The backend port that is used for health checks. Valid values:
0
to65535
. NOTE:health_check_connect_port
takes effect only ifhealth_check
is set toon
. - health
Check stringDomain - The domain name that is used for health checks. NOTE:
health_check_domain
takes effect only ifhealth_check
is set toon
. - health
Check stringHttp Code - The HTTP status code for a successful health check. Separate multiple HTTP status codes with commas (
,
). Default value:http_2xx
. Valid values:http_2xx
,http_3xx
,http_4xx
andhttp_5xx
. NOTE:health_check_http_code
takes effect only ifhealth_check
is set toon
. - health
Check numberInterval - The interval between two consecutive health checks. Unit: seconds. Default value:
2
. Valid values:1
to50
. NOTE:health_check_interval
takes effect only ifhealth_check
is set toon
. - health
Check stringMethod - The health check method used in HTTP health checks. Valid values:
head
,get
. NOTE:health_check_method
takes effect only ifhealth_check
is set toon
. - health
Check numberTimeout - The timeout period of a health check response. Unit: seconds. Default value:
5
. Valid values:1
to300
. NOTE: Ifhealth_check_timeout
<health_check_interval
,health_check_timeout
will be replaced byhealth_check_interval
.health_check_timeout
takes effect only ifhealth_check
is set toon
. - health
Check stringType - The type of health checks. Default value:
tcp
. Valid values:tcp
,http
. - health
Check stringUri - The URI that is used for health checks. The
health_check_uri
must be1
to80
characters in length, and can contain letters, digits, hyphens (-), forward slashes (/), periods (.), percent signs (%), question marks (?), number signs (#), and ampersands (&). The URI must start with a forward slash (/) but cannot be a single forward slash (/). NOTE:health_check_uri
takes effect only ifhealth_check
is set toon
. - healthy
Threshold number - The number of times that an unhealthy backend server must consecutively pass health checks before it is declared healthy. Default value:
3
. Valid values:2
to10
. NOTE:healthy_threshold
takes effect only ifhealth_check
is set toon
. - idle
Timeout number - The timeout period of an idle connection. Unit: seconds. Default value:
15
. Valid values:1
to60
. - lb
Port number - lb
Protocol string - listener
Forward string - Specifies whether to enable HTTP-to-HTTPS redirection. Default value:
off
. Valid values:on
,off
. - master
Slave stringServer Group Id - The ID of the primary/secondary server group. NOTE: You cannot set both
server_group_id
andmaster_slave_server_group_id
. - persistence
Timeout number - The timeout period of session persistence. Unit: seconds. Default value:
0
. Valid values:0
to3600
. - proxy
Protocol booleanV2Enabled - Specifies whether to use the Proxy protocol to pass client IP addresses to backend servers. Default value:
false
. Valid values:true
,false
. - request
Timeout number - The timeout period of a request. Unit: seconds. Default value:
60
. Valid values:1
to180
. - scheduler string
- The scheduling algorithm. Default value:
wrr
. Valid values: - server
Certificate stringId - The ID of the server certificate. NOTE:
server_certificate_id
is also required when the value of thessl_certificate_id
is Empty. - server
Group stringId - The ID of the vServer group. It's the ID of resource
alicloud.slb.ServerGroup
. - ssl
Certificate stringId - The ID of the server certificate. NOTE: Field
ssl_certificate_id
has been deprecated from provider version 1.59.0. New fieldserver_certificate_id
instead. - sticky
Session string - Specifies whether to enable session persistence. Default value:
off
. Valid values:on
,off
. - sticky
Session stringType - The method that is used to handle a cookie. Valid values:
insert
,server
. NOTE: Ifsticky_session
is set toon
,sticky_session_type
is required. Otherwise, it will be ignored. - tls
Cipher stringPolicy - The Transport Layer Security (TLS) security policy. Default value:
tls_cipher_policy_1_0
. Valid values:tls_cipher_policy_1_0
,tls_cipher_policy_1_1
,tls_cipher_policy_1_2
,tls_cipher_policy_1_2_strict
. - unhealthy
Threshold number - The number of times that a healthy backend server must consecutively fail health checks before it is declared unhealthy. Default value:
3
. Valid values:2
to10
. NOTE:unhealthy_threshold
takes effect only ifhealth_check
is set toon
. - x
Forwarded ListenerFor XForwarded For - Whether to set additional HTTP Header field "X-Forwarded-For". See
x_forwarded_for
below.
- frontend_
port int - The frontend port that is used by the CLB instance. Valid values:
1
to65535
. - load_
balancer_ strid - The Load Balancer ID which is used to launch a new listener.
- protocol str
- The protocol to listen on. Valid values:
http
. - acl_
id str - The ID of the network ACL that is associated with the listener. NOTE: If
acl_status
is set toon
,acl_id
is required. Otherwise, it will be ignored. - acl_
status str - Specifies whether to enable access control. Default value:
off
. Valid values:on
,off
. - acl_
type str - The type of the network ACL. Valid values:
black
,white
. NOTE: Ifacl_status
is set toon
,acl_type
is required. Otherwise, it will be ignored. - backend_
port int - The backend port that is used by the CLB instance. Valid values:
1
to65535
. NOTE: Ifserver_group_id
is not set,backend_port
is required. - bandwidth int
- The maximum bandwidth of the listener. Unit: Mbit/s. Valid values:
-1
: If you setbandwidth
to-1
, the bandwidth of the listener is unlimited.
- ca_
certificate_ strid - The ID of the certification authority (CA) certificate.
- str
- The cookie that is configured on the server. The
cookie
must be1
to200
characters in length and can contain only ASCII characters and digits. It cannot contain commas (,), semicolons (;), or space characters. It cannot start with a dollar sign ($). NOTE: Ifsticky_session
is set toon
, andsticky_session_type
is set toserver
,cookie
is required. Otherwise, it will be ignored. - int
- The timeout period of a cookie. Unit: seconds. Valid values:
1
to86400
. NOTE: Ifsticky_session
is set toon
, andsticky_session_type
is set toinsert
,cookie_timeout
is required. Otherwise, it will be ignored. - 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 value:
false
. - description str
- The name of the listener. The name must be 1 to 256 characters in length, and can contain letters, digits, hyphens (-), forward slashes (/), periods (.), and underscores (_).
- enable_
http2 str - Specifies whether to enable HTTP/2. Default value:
on
. Valid values:on
,off
. - established_
timeout int - The timeout period of a connection. Unit: seconds. Default value:
900
. Valid values:10
to900
. - forward_
port int - The listening port that is used to redirect HTTP requests to HTTPS.
- gzip bool
- Specifies whether to enable GZIP compression to compress specific types of files. Default value:
true
. Valid values:true
,false
. - health_
check str - Specifies whether to enable the health check feature. Default value:
on
. Valid values:on
,off
. NOTE:TCP
andUDP
listener's HealthCheck is always on, so it will be ignored when launchingTCP
orUDP
listener. - health_
check_ intconnect_ port - The backend port that is used for health checks. Valid values:
0
to65535
. NOTE:health_check_connect_port
takes effect only ifhealth_check
is set toon
. - health_
check_ strdomain - The domain name that is used for health checks. NOTE:
health_check_domain
takes effect only ifhealth_check
is set toon
. - health_
check_ strhttp_ code - The HTTP status code for a successful health check. Separate multiple HTTP status codes with commas (
,
). Default value:http_2xx
. Valid values:http_2xx
,http_3xx
,http_4xx
andhttp_5xx
. NOTE:health_check_http_code
takes effect only ifhealth_check
is set toon
. - health_
check_ intinterval - The interval between two consecutive health checks. Unit: seconds. Default value:
2
. Valid values:1
to50
. NOTE:health_check_interval
takes effect only ifhealth_check
is set toon
. - health_
check_ strmethod - The health check method used in HTTP health checks. Valid values:
head
,get
. NOTE:health_check_method
takes effect only ifhealth_check
is set toon
. - health_
check_ inttimeout - The timeout period of a health check response. Unit: seconds. Default value:
5
. Valid values:1
to300
. NOTE: Ifhealth_check_timeout
<health_check_interval
,health_check_timeout
will be replaced byhealth_check_interval
.health_check_timeout
takes effect only ifhealth_check
is set toon
. - health_
check_ strtype - The type of health checks. Default value:
tcp
. Valid values:tcp
,http
. - health_
check_ struri - The URI that is used for health checks. The
health_check_uri
must be1
to80
characters in length, and can contain letters, digits, hyphens (-), forward slashes (/), periods (.), percent signs (%), question marks (?), number signs (#), and ampersands (&). The URI must start with a forward slash (/) but cannot be a single forward slash (/). NOTE:health_check_uri
takes effect only ifhealth_check
is set toon
. - healthy_
threshold int - The number of times that an unhealthy backend server must consecutively pass health checks before it is declared healthy. Default value:
3
. Valid values:2
to10
. NOTE:healthy_threshold
takes effect only ifhealth_check
is set toon
. - idle_
timeout int - The timeout period of an idle connection. Unit: seconds. Default value:
15
. Valid values:1
to60
. - lb_
port int - lb_
protocol str - listener_
forward str - Specifies whether to enable HTTP-to-HTTPS redirection. Default value:
off
. Valid values:on
,off
. - master_
slave_ strserver_ group_ id - The ID of the primary/secondary server group. NOTE: You cannot set both
server_group_id
andmaster_slave_server_group_id
. - persistence_
timeout int - The timeout period of session persistence. Unit: seconds. Default value:
0
. Valid values:0
to3600
. - proxy_
protocol_ boolv2_ enabled - Specifies whether to use the Proxy protocol to pass client IP addresses to backend servers. Default value:
false
. Valid values:true
,false
. - request_
timeout int - The timeout period of a request. Unit: seconds. Default value:
60
. Valid values:1
to180
. - scheduler str
- The scheduling algorithm. Default value:
wrr
. Valid values: - server_
certificate_ strid - The ID of the server certificate. NOTE:
server_certificate_id
is also required when the value of thessl_certificate_id
is Empty. - server_
group_ strid - The ID of the vServer group. It's the ID of resource
alicloud.slb.ServerGroup
. - ssl_
certificate_ strid - The ID of the server certificate. NOTE: Field
ssl_certificate_id
has been deprecated from provider version 1.59.0. New fieldserver_certificate_id
instead. - sticky_
session str - Specifies whether to enable session persistence. Default value:
off
. Valid values:on
,off
. - sticky_
session_ strtype - The method that is used to handle a cookie. Valid values:
insert
,server
. NOTE: Ifsticky_session
is set toon
,sticky_session_type
is required. Otherwise, it will be ignored. - tls_
cipher_ strpolicy - The Transport Layer Security (TLS) security policy. Default value:
tls_cipher_policy_1_0
. Valid values:tls_cipher_policy_1_0
,tls_cipher_policy_1_1
,tls_cipher_policy_1_2
,tls_cipher_policy_1_2_strict
. - unhealthy_
threshold int - The number of times that a healthy backend server must consecutively fail health checks before it is declared unhealthy. Default value:
3
. Valid values:2
to10
. NOTE:unhealthy_threshold
takes effect only ifhealth_check
is set toon
. - x_
forwarded_ Listenerfor XForwarded For Args - Whether to set additional HTTP Header field "X-Forwarded-For". See
x_forwarded_for
below.
- frontend
Port Number - The frontend port that is used by the CLB instance. Valid values:
1
to65535
. - load
Balancer StringId - The Load Balancer ID which is used to launch a new listener.
- protocol String
- The protocol to listen on. Valid values:
http
. - acl
Id String - The ID of the network ACL that is associated with the listener. NOTE: If
acl_status
is set toon
,acl_id
is required. Otherwise, it will be ignored. - acl
Status String - Specifies whether to enable access control. Default value:
off
. Valid values:on
,off
. - acl
Type String - The type of the network ACL. Valid values:
black
,white
. NOTE: Ifacl_status
is set toon
,acl_type
is required. Otherwise, it will be ignored. - backend
Port Number - The backend port that is used by the CLB instance. Valid values:
1
to65535
. NOTE: Ifserver_group_id
is not set,backend_port
is required. - bandwidth Number
- The maximum bandwidth of the listener. Unit: Mbit/s. Valid values:
-1
: If you setbandwidth
to-1
, the bandwidth of the listener is unlimited.
- ca
Certificate StringId - The ID of the certification authority (CA) certificate.
- String
- The cookie that is configured on the server. The
cookie
must be1
to200
characters in length and can contain only ASCII characters and digits. It cannot contain commas (,), semicolons (;), or space characters. It cannot start with a dollar sign ($). NOTE: Ifsticky_session
is set toon
, andsticky_session_type
is set toserver
,cookie
is required. Otherwise, it will be ignored. - Number
- The timeout period of a cookie. Unit: seconds. Valid values:
1
to86400
. NOTE: Ifsticky_session
is set toon
, andsticky_session_type
is set toinsert
,cookie_timeout
is required. Otherwise, it will be ignored. - 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 value:
false
. - description String
- The name of the listener. The name must be 1 to 256 characters in length, and can contain letters, digits, hyphens (-), forward slashes (/), periods (.), and underscores (_).
- enable
Http2 String - Specifies whether to enable HTTP/2. Default value:
on
. Valid values:on
,off
. - established
Timeout Number - The timeout period of a connection. Unit: seconds. Default value:
900
. Valid values:10
to900
. - forward
Port Number - The listening port that is used to redirect HTTP requests to HTTPS.
- gzip Boolean
- Specifies whether to enable GZIP compression to compress specific types of files. Default value:
true
. Valid values:true
,false
. - health
Check String - Specifies whether to enable the health check feature. Default value:
on
. Valid values:on
,off
. NOTE:TCP
andUDP
listener's HealthCheck is always on, so it will be ignored when launchingTCP
orUDP
listener. - health
Check NumberConnect Port - The backend port that is used for health checks. Valid values:
0
to65535
. NOTE:health_check_connect_port
takes effect only ifhealth_check
is set toon
. - health
Check StringDomain - The domain name that is used for health checks. NOTE:
health_check_domain
takes effect only ifhealth_check
is set toon
. - health
Check StringHttp Code - The HTTP status code for a successful health check. Separate multiple HTTP status codes with commas (
,
). Default value:http_2xx
. Valid values:http_2xx
,http_3xx
,http_4xx
andhttp_5xx
. NOTE:health_check_http_code
takes effect only ifhealth_check
is set toon
. - health
Check NumberInterval - The interval between two consecutive health checks. Unit: seconds. Default value:
2
. Valid values:1
to50
. NOTE:health_check_interval
takes effect only ifhealth_check
is set toon
. - health
Check StringMethod - The health check method used in HTTP health checks. Valid values:
head
,get
. NOTE:health_check_method
takes effect only ifhealth_check
is set toon
. - health
Check NumberTimeout - The timeout period of a health check response. Unit: seconds. Default value:
5
. Valid values:1
to300
. NOTE: Ifhealth_check_timeout
<health_check_interval
,health_check_timeout
will be replaced byhealth_check_interval
.health_check_timeout
takes effect only ifhealth_check
is set toon
. - health
Check StringType - The type of health checks. Default value:
tcp
. Valid values:tcp
,http
. - health
Check StringUri - The URI that is used for health checks. The
health_check_uri
must be1
to80
characters in length, and can contain letters, digits, hyphens (-), forward slashes (/), periods (.), percent signs (%), question marks (?), number signs (#), and ampersands (&). The URI must start with a forward slash (/) but cannot be a single forward slash (/). NOTE:health_check_uri
takes effect only ifhealth_check
is set toon
. - healthy
Threshold Number - The number of times that an unhealthy backend server must consecutively pass health checks before it is declared healthy. Default value:
3
. Valid values:2
to10
. NOTE:healthy_threshold
takes effect only ifhealth_check
is set toon
. - idle
Timeout Number - The timeout period of an idle connection. Unit: seconds. Default value:
15
. Valid values:1
to60
. - lb
Port Number - lb
Protocol String - listener
Forward String - Specifies whether to enable HTTP-to-HTTPS redirection. Default value:
off
. Valid values:on
,off
. - master
Slave StringServer Group Id - The ID of the primary/secondary server group. NOTE: You cannot set both
server_group_id
andmaster_slave_server_group_id
. - persistence
Timeout Number - The timeout period of session persistence. Unit: seconds. Default value:
0
. Valid values:0
to3600
. - proxy
Protocol BooleanV2Enabled - Specifies whether to use the Proxy protocol to pass client IP addresses to backend servers. Default value:
false
. Valid values:true
,false
. - request
Timeout Number - The timeout period of a request. Unit: seconds. Default value:
60
. Valid values:1
to180
. - scheduler String
- The scheduling algorithm. Default value:
wrr
. Valid values: - server
Certificate StringId - The ID of the server certificate. NOTE:
server_certificate_id
is also required when the value of thessl_certificate_id
is Empty. - server
Group StringId - The ID of the vServer group. It's the ID of resource
alicloud.slb.ServerGroup
. - ssl
Certificate StringId - The ID of the server certificate. NOTE: Field
ssl_certificate_id
has been deprecated from provider version 1.59.0. New fieldserver_certificate_id
instead. - sticky
Session String - Specifies whether to enable session persistence. Default value:
off
. Valid values:on
,off
. - sticky
Session StringType - The method that is used to handle a cookie. Valid values:
insert
,server
. NOTE: Ifsticky_session
is set toon
,sticky_session_type
is required. Otherwise, it will be ignored. - tls
Cipher StringPolicy - The Transport Layer Security (TLS) security policy. Default value:
tls_cipher_policy_1_0
. Valid values:tls_cipher_policy_1_0
,tls_cipher_policy_1_1
,tls_cipher_policy_1_2
,tls_cipher_policy_1_2_strict
. - unhealthy
Threshold Number - The number of times that a healthy backend server must consecutively fail health checks before it is declared unhealthy. Default value:
3
. Valid values:2
to10
. NOTE:unhealthy_threshold
takes effect only ifhealth_check
is set toon
. - x
Forwarded Property MapFor - Whether to set additional HTTP Header field "X-Forwarded-For". See
x_forwarded_for
below.
Outputs
All input properties are implicitly available as output properties. Additionally, the Listener resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing Listener Resource
Get an existing Listener resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: ListenerState, opts?: CustomResourceOptions): Listener
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
acl_id: Optional[str] = None,
acl_status: Optional[str] = None,
acl_type: Optional[str] = None,
backend_port: Optional[int] = None,
bandwidth: Optional[int] = None,
ca_certificate_id: Optional[str] = None,
cookie: Optional[str] = None,
cookie_timeout: Optional[int] = None,
delete_protection_validation: Optional[bool] = None,
description: Optional[str] = None,
enable_http2: Optional[str] = None,
established_timeout: Optional[int] = None,
forward_port: Optional[int] = None,
frontend_port: Optional[int] = None,
gzip: Optional[bool] = None,
health_check: Optional[str] = None,
health_check_connect_port: Optional[int] = None,
health_check_domain: Optional[str] = None,
health_check_http_code: Optional[str] = None,
health_check_interval: Optional[int] = None,
health_check_method: Optional[str] = None,
health_check_timeout: Optional[int] = None,
health_check_type: Optional[str] = None,
health_check_uri: Optional[str] = None,
healthy_threshold: Optional[int] = None,
idle_timeout: Optional[int] = None,
lb_port: Optional[int] = None,
lb_protocol: Optional[str] = None,
listener_forward: Optional[str] = None,
load_balancer_id: Optional[str] = None,
master_slave_server_group_id: Optional[str] = None,
persistence_timeout: Optional[int] = None,
protocol: Optional[str] = None,
proxy_protocol_v2_enabled: Optional[bool] = None,
request_timeout: Optional[int] = None,
scheduler: Optional[str] = None,
server_certificate_id: Optional[str] = None,
server_group_id: Optional[str] = None,
ssl_certificate_id: Optional[str] = None,
sticky_session: Optional[str] = None,
sticky_session_type: Optional[str] = None,
tls_cipher_policy: Optional[str] = None,
unhealthy_threshold: Optional[int] = None,
x_forwarded_for: Optional[ListenerXForwardedForArgs] = None) -> Listener
func GetListener(ctx *Context, name string, id IDInput, state *ListenerState, opts ...ResourceOption) (*Listener, error)
public static Listener Get(string name, Input<string> id, ListenerState? state, CustomResourceOptions? opts = null)
public static Listener get(String name, Output<String> id, ListenerState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Acl
Id string - The ID of the network ACL that is associated with the listener. NOTE: If
acl_status
is set toon
,acl_id
is required. Otherwise, it will be ignored. - Acl
Status string - Specifies whether to enable access control. Default value:
off
. Valid values:on
,off
. - Acl
Type string - The type of the network ACL. Valid values:
black
,white
. NOTE: Ifacl_status
is set toon
,acl_type
is required. Otherwise, it will be ignored. - Backend
Port int - The backend port that is used by the CLB instance. Valid values:
1
to65535
. NOTE: Ifserver_group_id
is not set,backend_port
is required. - Bandwidth int
- The maximum bandwidth of the listener. Unit: Mbit/s. Valid values:
-1
: If you setbandwidth
to-1
, the bandwidth of the listener is unlimited.
- Ca
Certificate stringId - The ID of the certification authority (CA) certificate.
- string
- The cookie that is configured on the server. The
cookie
must be1
to200
characters in length and can contain only ASCII characters and digits. It cannot contain commas (,), semicolons (;), or space characters. It cannot start with a dollar sign ($). NOTE: Ifsticky_session
is set toon
, andsticky_session_type
is set toserver
,cookie
is required. Otherwise, it will be ignored. - int
- The timeout period of a cookie. Unit: seconds. Valid values:
1
to86400
. NOTE: Ifsticky_session
is set toon
, andsticky_session_type
is set toinsert
,cookie_timeout
is required. Otherwise, it will be ignored. - 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 value:
false
. - Description string
- The name of the listener. The name must be 1 to 256 characters in length, and can contain letters, digits, hyphens (-), forward slashes (/), periods (.), and underscores (_).
- Enable
Http2 string - Specifies whether to enable HTTP/2. Default value:
on
. Valid values:on
,off
. - Established
Timeout int - The timeout period of a connection. Unit: seconds. Default value:
900
. Valid values:10
to900
. - Forward
Port int - The listening port that is used to redirect HTTP requests to HTTPS.
- Frontend
Port int - The frontend port that is used by the CLB instance. Valid values:
1
to65535
. - Gzip bool
- Specifies whether to enable GZIP compression to compress specific types of files. Default value:
true
. Valid values:true
,false
. - Health
Check string - Specifies whether to enable the health check feature. Default value:
on
. Valid values:on
,off
. NOTE:TCP
andUDP
listener's HealthCheck is always on, so it will be ignored when launchingTCP
orUDP
listener. - Health
Check intConnect Port - The backend port that is used for health checks. Valid values:
0
to65535
. NOTE:health_check_connect_port
takes effect only ifhealth_check
is set toon
. - Health
Check stringDomain - The domain name that is used for health checks. NOTE:
health_check_domain
takes effect only ifhealth_check
is set toon
. - Health
Check stringHttp Code - The HTTP status code for a successful health check. Separate multiple HTTP status codes with commas (
,
). Default value:http_2xx
. Valid values:http_2xx
,http_3xx
,http_4xx
andhttp_5xx
. NOTE:health_check_http_code
takes effect only ifhealth_check
is set toon
. - Health
Check intInterval - The interval between two consecutive health checks. Unit: seconds. Default value:
2
. Valid values:1
to50
. NOTE:health_check_interval
takes effect only ifhealth_check
is set toon
. - Health
Check stringMethod - The health check method used in HTTP health checks. Valid values:
head
,get
. NOTE:health_check_method
takes effect only ifhealth_check
is set toon
. - Health
Check intTimeout - The timeout period of a health check response. Unit: seconds. Default value:
5
. Valid values:1
to300
. NOTE: Ifhealth_check_timeout
<health_check_interval
,health_check_timeout
will be replaced byhealth_check_interval
.health_check_timeout
takes effect only ifhealth_check
is set toon
. - Health
Check stringType - The type of health checks. Default value:
tcp
. Valid values:tcp
,http
. - Health
Check stringUri - The URI that is used for health checks. The
health_check_uri
must be1
to80
characters in length, and can contain letters, digits, hyphens (-), forward slashes (/), periods (.), percent signs (%), question marks (?), number signs (#), and ampersands (&). The URI must start with a forward slash (/) but cannot be a single forward slash (/). NOTE:health_check_uri
takes effect only ifhealth_check
is set toon
. - Healthy
Threshold int - The number of times that an unhealthy backend server must consecutively pass health checks before it is declared healthy. Default value:
3
. Valid values:2
to10
. NOTE:healthy_threshold
takes effect only ifhealth_check
is set toon
. - Idle
Timeout int - The timeout period of an idle connection. Unit: seconds. Default value:
15
. Valid values:1
to60
. - Lb
Port int - Lb
Protocol string - Listener
Forward string - Specifies whether to enable HTTP-to-HTTPS redirection. Default value:
off
. Valid values:on
,off
. - Load
Balancer stringId - The Load Balancer ID which is used to launch a new listener.
- Master
Slave stringServer Group Id - The ID of the primary/secondary server group. NOTE: You cannot set both
server_group_id
andmaster_slave_server_group_id
. - Persistence
Timeout int - The timeout period of session persistence. Unit: seconds. Default value:
0
. Valid values:0
to3600
. - Protocol string
- The protocol to listen on. Valid values:
http
. - Proxy
Protocol boolV2Enabled - Specifies whether to use the Proxy protocol to pass client IP addresses to backend servers. Default value:
false
. Valid values:true
,false
. - Request
Timeout int - The timeout period of a request. Unit: seconds. Default value:
60
. Valid values:1
to180
. - Scheduler string
- The scheduling algorithm. Default value:
wrr
. Valid values: - Server
Certificate stringId - The ID of the server certificate. NOTE:
server_certificate_id
is also required when the value of thessl_certificate_id
is Empty. - Server
Group stringId - The ID of the vServer group. It's the ID of resource
alicloud.slb.ServerGroup
. - Ssl
Certificate stringId - The ID of the server certificate. NOTE: Field
ssl_certificate_id
has been deprecated from provider version 1.59.0. New fieldserver_certificate_id
instead. - Sticky
Session string - Specifies whether to enable session persistence. Default value:
off
. Valid values:on
,off
. - Sticky
Session stringType - The method that is used to handle a cookie. Valid values:
insert
,server
. NOTE: Ifsticky_session
is set toon
,sticky_session_type
is required. Otherwise, it will be ignored. - Tls
Cipher stringPolicy - The Transport Layer Security (TLS) security policy. Default value:
tls_cipher_policy_1_0
. Valid values:tls_cipher_policy_1_0
,tls_cipher_policy_1_1
,tls_cipher_policy_1_2
,tls_cipher_policy_1_2_strict
. - Unhealthy
Threshold int - The number of times that a healthy backend server must consecutively fail health checks before it is declared unhealthy. Default value:
3
. Valid values:2
to10
. NOTE:unhealthy_threshold
takes effect only ifhealth_check
is set toon
. - XForwarded
For Pulumi.Ali Cloud. Slb. Inputs. Listener XForwarded For - Whether to set additional HTTP Header field "X-Forwarded-For". See
x_forwarded_for
below.
- Acl
Id string - The ID of the network ACL that is associated with the listener. NOTE: If
acl_status
is set toon
,acl_id
is required. Otherwise, it will be ignored. - Acl
Status string - Specifies whether to enable access control. Default value:
off
. Valid values:on
,off
. - Acl
Type string - The type of the network ACL. Valid values:
black
,white
. NOTE: Ifacl_status
is set toon
,acl_type
is required. Otherwise, it will be ignored. - Backend
Port int - The backend port that is used by the CLB instance. Valid values:
1
to65535
. NOTE: Ifserver_group_id
is not set,backend_port
is required. - Bandwidth int
- The maximum bandwidth of the listener. Unit: Mbit/s. Valid values:
-1
: If you setbandwidth
to-1
, the bandwidth of the listener is unlimited.
- Ca
Certificate stringId - The ID of the certification authority (CA) certificate.
- string
- The cookie that is configured on the server. The
cookie
must be1
to200
characters in length and can contain only ASCII characters and digits. It cannot contain commas (,), semicolons (;), or space characters. It cannot start with a dollar sign ($). NOTE: Ifsticky_session
is set toon
, andsticky_session_type
is set toserver
,cookie
is required. Otherwise, it will be ignored. - int
- The timeout period of a cookie. Unit: seconds. Valid values:
1
to86400
. NOTE: Ifsticky_session
is set toon
, andsticky_session_type
is set toinsert
,cookie_timeout
is required. Otherwise, it will be ignored. - 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 value:
false
. - Description string
- The name of the listener. The name must be 1 to 256 characters in length, and can contain letters, digits, hyphens (-), forward slashes (/), periods (.), and underscores (_).
- Enable
Http2 string - Specifies whether to enable HTTP/2. Default value:
on
. Valid values:on
,off
. - Established
Timeout int - The timeout period of a connection. Unit: seconds. Default value:
900
. Valid values:10
to900
. - Forward
Port int - The listening port that is used to redirect HTTP requests to HTTPS.
- Frontend
Port int - The frontend port that is used by the CLB instance. Valid values:
1
to65535
. - Gzip bool
- Specifies whether to enable GZIP compression to compress specific types of files. Default value:
true
. Valid values:true
,false
. - Health
Check string - Specifies whether to enable the health check feature. Default value:
on
. Valid values:on
,off
. NOTE:TCP
andUDP
listener's HealthCheck is always on, so it will be ignored when launchingTCP
orUDP
listener. - Health
Check intConnect Port - The backend port that is used for health checks. Valid values:
0
to65535
. NOTE:health_check_connect_port
takes effect only ifhealth_check
is set toon
. - Health
Check stringDomain - The domain name that is used for health checks. NOTE:
health_check_domain
takes effect only ifhealth_check
is set toon
. - Health
Check stringHttp Code - The HTTP status code for a successful health check. Separate multiple HTTP status codes with commas (
,
). Default value:http_2xx
. Valid values:http_2xx
,http_3xx
,http_4xx
andhttp_5xx
. NOTE:health_check_http_code
takes effect only ifhealth_check
is set toon
. - Health
Check intInterval - The interval between two consecutive health checks. Unit: seconds. Default value:
2
. Valid values:1
to50
. NOTE:health_check_interval
takes effect only ifhealth_check
is set toon
. - Health
Check stringMethod - The health check method used in HTTP health checks. Valid values:
head
,get
. NOTE:health_check_method
takes effect only ifhealth_check
is set toon
. - Health
Check intTimeout - The timeout period of a health check response. Unit: seconds. Default value:
5
. Valid values:1
to300
. NOTE: Ifhealth_check_timeout
<health_check_interval
,health_check_timeout
will be replaced byhealth_check_interval
.health_check_timeout
takes effect only ifhealth_check
is set toon
. - Health
Check stringType - The type of health checks. Default value:
tcp
. Valid values:tcp
,http
. - Health
Check stringUri - The URI that is used for health checks. The
health_check_uri
must be1
to80
characters in length, and can contain letters, digits, hyphens (-), forward slashes (/), periods (.), percent signs (%), question marks (?), number signs (#), and ampersands (&). The URI must start with a forward slash (/) but cannot be a single forward slash (/). NOTE:health_check_uri
takes effect only ifhealth_check
is set toon
. - Healthy
Threshold int - The number of times that an unhealthy backend server must consecutively pass health checks before it is declared healthy. Default value:
3
. Valid values:2
to10
. NOTE:healthy_threshold
takes effect only ifhealth_check
is set toon
. - Idle
Timeout int - The timeout period of an idle connection. Unit: seconds. Default value:
15
. Valid values:1
to60
. - Lb
Port int - Lb
Protocol string - Listener
Forward string - Specifies whether to enable HTTP-to-HTTPS redirection. Default value:
off
. Valid values:on
,off
. - Load
Balancer stringId - The Load Balancer ID which is used to launch a new listener.
- Master
Slave stringServer Group Id - The ID of the primary/secondary server group. NOTE: You cannot set both
server_group_id
andmaster_slave_server_group_id
. - Persistence
Timeout int - The timeout period of session persistence. Unit: seconds. Default value:
0
. Valid values:0
to3600
. - Protocol string
- The protocol to listen on. Valid values:
http
. - Proxy
Protocol boolV2Enabled - Specifies whether to use the Proxy protocol to pass client IP addresses to backend servers. Default value:
false
. Valid values:true
,false
. - Request
Timeout int - The timeout period of a request. Unit: seconds. Default value:
60
. Valid values:1
to180
. - Scheduler string
- The scheduling algorithm. Default value:
wrr
. Valid values: - Server
Certificate stringId - The ID of the server certificate. NOTE:
server_certificate_id
is also required when the value of thessl_certificate_id
is Empty. - Server
Group stringId - The ID of the vServer group. It's the ID of resource
alicloud.slb.ServerGroup
. - Ssl
Certificate stringId - The ID of the server certificate. NOTE: Field
ssl_certificate_id
has been deprecated from provider version 1.59.0. New fieldserver_certificate_id
instead. - Sticky
Session string - Specifies whether to enable session persistence. Default value:
off
. Valid values:on
,off
. - Sticky
Session stringType - The method that is used to handle a cookie. Valid values:
insert
,server
. NOTE: Ifsticky_session
is set toon
,sticky_session_type
is required. Otherwise, it will be ignored. - Tls
Cipher stringPolicy - The Transport Layer Security (TLS) security policy. Default value:
tls_cipher_policy_1_0
. Valid values:tls_cipher_policy_1_0
,tls_cipher_policy_1_1
,tls_cipher_policy_1_2
,tls_cipher_policy_1_2_strict
. - Unhealthy
Threshold int - The number of times that a healthy backend server must consecutively fail health checks before it is declared unhealthy. Default value:
3
. Valid values:2
to10
. NOTE:unhealthy_threshold
takes effect only ifhealth_check
is set toon
. - XForwarded
For ListenerXForwarded For Args - Whether to set additional HTTP Header field "X-Forwarded-For". See
x_forwarded_for
below.
- acl
Id String - The ID of the network ACL that is associated with the listener. NOTE: If
acl_status
is set toon
,acl_id
is required. Otherwise, it will be ignored. - acl
Status String - Specifies whether to enable access control. Default value:
off
. Valid values:on
,off
. - acl
Type String - The type of the network ACL. Valid values:
black
,white
. NOTE: Ifacl_status
is set toon
,acl_type
is required. Otherwise, it will be ignored. - backend
Port Integer - The backend port that is used by the CLB instance. Valid values:
1
to65535
. NOTE: Ifserver_group_id
is not set,backend_port
is required. - bandwidth Integer
- The maximum bandwidth of the listener. Unit: Mbit/s. Valid values:
-1
: If you setbandwidth
to-1
, the bandwidth of the listener is unlimited.
- ca
Certificate StringId - The ID of the certification authority (CA) certificate.
- String
- The cookie that is configured on the server. The
cookie
must be1
to200
characters in length and can contain only ASCII characters and digits. It cannot contain commas (,), semicolons (;), or space characters. It cannot start with a dollar sign ($). NOTE: Ifsticky_session
is set toon
, andsticky_session_type
is set toserver
,cookie
is required. Otherwise, it will be ignored. - Integer
- The timeout period of a cookie. Unit: seconds. Valid values:
1
to86400
. NOTE: Ifsticky_session
is set toon
, andsticky_session_type
is set toinsert
,cookie_timeout
is required. Otherwise, it will be ignored. - 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 value:
false
. - description String
- The name of the listener. The name must be 1 to 256 characters in length, and can contain letters, digits, hyphens (-), forward slashes (/), periods (.), and underscores (_).
- enable
Http2 String - Specifies whether to enable HTTP/2. Default value:
on
. Valid values:on
,off
. - established
Timeout Integer - The timeout period of a connection. Unit: seconds. Default value:
900
. Valid values:10
to900
. - forward
Port Integer - The listening port that is used to redirect HTTP requests to HTTPS.
- frontend
Port Integer - The frontend port that is used by the CLB instance. Valid values:
1
to65535
. - gzip Boolean
- Specifies whether to enable GZIP compression to compress specific types of files. Default value:
true
. Valid values:true
,false
. - health
Check String - Specifies whether to enable the health check feature. Default value:
on
. Valid values:on
,off
. NOTE:TCP
andUDP
listener's HealthCheck is always on, so it will be ignored when launchingTCP
orUDP
listener. - health
Check IntegerConnect Port - The backend port that is used for health checks. Valid values:
0
to65535
. NOTE:health_check_connect_port
takes effect only ifhealth_check
is set toon
. - health
Check StringDomain - The domain name that is used for health checks. NOTE:
health_check_domain
takes effect only ifhealth_check
is set toon
. - health
Check StringHttp Code - The HTTP status code for a successful health check. Separate multiple HTTP status codes with commas (
,
). Default value:http_2xx
. Valid values:http_2xx
,http_3xx
,http_4xx
andhttp_5xx
. NOTE:health_check_http_code
takes effect only ifhealth_check
is set toon
. - health
Check IntegerInterval - The interval between two consecutive health checks. Unit: seconds. Default value:
2
. Valid values:1
to50
. NOTE:health_check_interval
takes effect only ifhealth_check
is set toon
. - health
Check StringMethod - The health check method used in HTTP health checks. Valid values:
head
,get
. NOTE:health_check_method
takes effect only ifhealth_check
is set toon
. - health
Check IntegerTimeout - The timeout period of a health check response. Unit: seconds. Default value:
5
. Valid values:1
to300
. NOTE: Ifhealth_check_timeout
<health_check_interval
,health_check_timeout
will be replaced byhealth_check_interval
.health_check_timeout
takes effect only ifhealth_check
is set toon
. - health
Check StringType - The type of health checks. Default value:
tcp
. Valid values:tcp
,http
. - health
Check StringUri - The URI that is used for health checks. The
health_check_uri
must be1
to80
characters in length, and can contain letters, digits, hyphens (-), forward slashes (/), periods (.), percent signs (%), question marks (?), number signs (#), and ampersands (&). The URI must start with a forward slash (/) but cannot be a single forward slash (/). NOTE:health_check_uri
takes effect only ifhealth_check
is set toon
. - healthy
Threshold Integer - The number of times that an unhealthy backend server must consecutively pass health checks before it is declared healthy. Default value:
3
. Valid values:2
to10
. NOTE:healthy_threshold
takes effect only ifhealth_check
is set toon
. - idle
Timeout Integer - The timeout period of an idle connection. Unit: seconds. Default value:
15
. Valid values:1
to60
. - lb
Port Integer - lb
Protocol String - listener
Forward String - Specifies whether to enable HTTP-to-HTTPS redirection. Default value:
off
. Valid values:on
,off
. - load
Balancer StringId - The Load Balancer ID which is used to launch a new listener.
- master
Slave StringServer Group Id - The ID of the primary/secondary server group. NOTE: You cannot set both
server_group_id
andmaster_slave_server_group_id
. - persistence
Timeout Integer - The timeout period of session persistence. Unit: seconds. Default value:
0
. Valid values:0
to3600
. - protocol String
- The protocol to listen on. Valid values:
http
. - proxy
Protocol BooleanV2Enabled - Specifies whether to use the Proxy protocol to pass client IP addresses to backend servers. Default value:
false
. Valid values:true
,false
. - request
Timeout Integer - The timeout period of a request. Unit: seconds. Default value:
60
. Valid values:1
to180
. - scheduler String
- The scheduling algorithm. Default value:
wrr
. Valid values: - server
Certificate StringId - The ID of the server certificate. NOTE:
server_certificate_id
is also required when the value of thessl_certificate_id
is Empty. - server
Group StringId - The ID of the vServer group. It's the ID of resource
alicloud.slb.ServerGroup
. - ssl
Certificate StringId - The ID of the server certificate. NOTE: Field
ssl_certificate_id
has been deprecated from provider version 1.59.0. New fieldserver_certificate_id
instead. - sticky
Session String - Specifies whether to enable session persistence. Default value:
off
. Valid values:on
,off
. - sticky
Session StringType - The method that is used to handle a cookie. Valid values:
insert
,server
. NOTE: Ifsticky_session
is set toon
,sticky_session_type
is required. Otherwise, it will be ignored. - tls
Cipher StringPolicy - The Transport Layer Security (TLS) security policy. Default value:
tls_cipher_policy_1_0
. Valid values:tls_cipher_policy_1_0
,tls_cipher_policy_1_1
,tls_cipher_policy_1_2
,tls_cipher_policy_1_2_strict
. - unhealthy
Threshold Integer - The number of times that a healthy backend server must consecutively fail health checks before it is declared unhealthy. Default value:
3
. Valid values:2
to10
. NOTE:unhealthy_threshold
takes effect only ifhealth_check
is set toon
. - x
Forwarded ListenerFor XForwarded For - Whether to set additional HTTP Header field "X-Forwarded-For". See
x_forwarded_for
below.
- acl
Id string - The ID of the network ACL that is associated with the listener. NOTE: If
acl_status
is set toon
,acl_id
is required. Otherwise, it will be ignored. - acl
Status string - Specifies whether to enable access control. Default value:
off
. Valid values:on
,off
. - acl
Type string - The type of the network ACL. Valid values:
black
,white
. NOTE: Ifacl_status
is set toon
,acl_type
is required. Otherwise, it will be ignored. - backend
Port number - The backend port that is used by the CLB instance. Valid values:
1
to65535
. NOTE: Ifserver_group_id
is not set,backend_port
is required. - bandwidth number
- The maximum bandwidth of the listener. Unit: Mbit/s. Valid values:
-1
: If you setbandwidth
to-1
, the bandwidth of the listener is unlimited.
- ca
Certificate stringId - The ID of the certification authority (CA) certificate.
- string
- The cookie that is configured on the server. The
cookie
must be1
to200
characters in length and can contain only ASCII characters and digits. It cannot contain commas (,), semicolons (;), or space characters. It cannot start with a dollar sign ($). NOTE: Ifsticky_session
is set toon
, andsticky_session_type
is set toserver
,cookie
is required. Otherwise, it will be ignored. - number
- The timeout period of a cookie. Unit: seconds. Valid values:
1
to86400
. NOTE: Ifsticky_session
is set toon
, andsticky_session_type
is set toinsert
,cookie_timeout
is required. Otherwise, it will be ignored. - 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 value:
false
. - description string
- The name of the listener. The name must be 1 to 256 characters in length, and can contain letters, digits, hyphens (-), forward slashes (/), periods (.), and underscores (_).
- enable
Http2 string - Specifies whether to enable HTTP/2. Default value:
on
. Valid values:on
,off
. - established
Timeout number - The timeout period of a connection. Unit: seconds. Default value:
900
. Valid values:10
to900
. - forward
Port number - The listening port that is used to redirect HTTP requests to HTTPS.
- frontend
Port number - The frontend port that is used by the CLB instance. Valid values:
1
to65535
. - gzip boolean
- Specifies whether to enable GZIP compression to compress specific types of files. Default value:
true
. Valid values:true
,false
. - health
Check string - Specifies whether to enable the health check feature. Default value:
on
. Valid values:on
,off
. NOTE:TCP
andUDP
listener's HealthCheck is always on, so it will be ignored when launchingTCP
orUDP
listener. - health
Check numberConnect Port - The backend port that is used for health checks. Valid values:
0
to65535
. NOTE:health_check_connect_port
takes effect only ifhealth_check
is set toon
. - health
Check stringDomain - The domain name that is used for health checks. NOTE:
health_check_domain
takes effect only ifhealth_check
is set toon
. - health
Check stringHttp Code - The HTTP status code for a successful health check. Separate multiple HTTP status codes with commas (
,
). Default value:http_2xx
. Valid values:http_2xx
,http_3xx
,http_4xx
andhttp_5xx
. NOTE:health_check_http_code
takes effect only ifhealth_check
is set toon
. - health
Check numberInterval - The interval between two consecutive health checks. Unit: seconds. Default value:
2
. Valid values:1
to50
. NOTE:health_check_interval
takes effect only ifhealth_check
is set toon
. - health
Check stringMethod - The health check method used in HTTP health checks. Valid values:
head
,get
. NOTE:health_check_method
takes effect only ifhealth_check
is set toon
. - health
Check numberTimeout - The timeout period of a health check response. Unit: seconds. Default value:
5
. Valid values:1
to300
. NOTE: Ifhealth_check_timeout
<health_check_interval
,health_check_timeout
will be replaced byhealth_check_interval
.health_check_timeout
takes effect only ifhealth_check
is set toon
. - health
Check stringType - The type of health checks. Default value:
tcp
. Valid values:tcp
,http
. - health
Check stringUri - The URI that is used for health checks. The
health_check_uri
must be1
to80
characters in length, and can contain letters, digits, hyphens (-), forward slashes (/), periods (.), percent signs (%), question marks (?), number signs (#), and ampersands (&). The URI must start with a forward slash (/) but cannot be a single forward slash (/). NOTE:health_check_uri
takes effect only ifhealth_check
is set toon
. - healthy
Threshold number - The number of times that an unhealthy backend server must consecutively pass health checks before it is declared healthy. Default value:
3
. Valid values:2
to10
. NOTE:healthy_threshold
takes effect only ifhealth_check
is set toon
. - idle
Timeout number - The timeout period of an idle connection. Unit: seconds. Default value:
15
. Valid values:1
to60
. - lb
Port number - lb
Protocol string - listener
Forward string - Specifies whether to enable HTTP-to-HTTPS redirection. Default value:
off
. Valid values:on
,off
. - load
Balancer stringId - The Load Balancer ID which is used to launch a new listener.
- master
Slave stringServer Group Id - The ID of the primary/secondary server group. NOTE: You cannot set both
server_group_id
andmaster_slave_server_group_id
. - persistence
Timeout number - The timeout period of session persistence. Unit: seconds. Default value:
0
. Valid values:0
to3600
. - protocol string
- The protocol to listen on. Valid values:
http
. - proxy
Protocol booleanV2Enabled - Specifies whether to use the Proxy protocol to pass client IP addresses to backend servers. Default value:
false
. Valid values:true
,false
. - request
Timeout number - The timeout period of a request. Unit: seconds. Default value:
60
. Valid values:1
to180
. - scheduler string
- The scheduling algorithm. Default value:
wrr
. Valid values: - server
Certificate stringId - The ID of the server certificate. NOTE:
server_certificate_id
is also required when the value of thessl_certificate_id
is Empty. - server
Group stringId - The ID of the vServer group. It's the ID of resource
alicloud.slb.ServerGroup
. - ssl
Certificate stringId - The ID of the server certificate. NOTE: Field
ssl_certificate_id
has been deprecated from provider version 1.59.0. New fieldserver_certificate_id
instead. - sticky
Session string - Specifies whether to enable session persistence. Default value:
off
. Valid values:on
,off
. - sticky
Session stringType - The method that is used to handle a cookie. Valid values:
insert
,server
. NOTE: Ifsticky_session
is set toon
,sticky_session_type
is required. Otherwise, it will be ignored. - tls
Cipher stringPolicy - The Transport Layer Security (TLS) security policy. Default value:
tls_cipher_policy_1_0
. Valid values:tls_cipher_policy_1_0
,tls_cipher_policy_1_1
,tls_cipher_policy_1_2
,tls_cipher_policy_1_2_strict
. - unhealthy
Threshold number - The number of times that a healthy backend server must consecutively fail health checks before it is declared unhealthy. Default value:
3
. Valid values:2
to10
. NOTE:unhealthy_threshold
takes effect only ifhealth_check
is set toon
. - x
Forwarded ListenerFor XForwarded For - Whether to set additional HTTP Header field "X-Forwarded-For". See
x_forwarded_for
below.
- acl_
id str - The ID of the network ACL that is associated with the listener. NOTE: If
acl_status
is set toon
,acl_id
is required. Otherwise, it will be ignored. - acl_
status str - Specifies whether to enable access control. Default value:
off
. Valid values:on
,off
. - acl_
type str - The type of the network ACL. Valid values:
black
,white
. NOTE: Ifacl_status
is set toon
,acl_type
is required. Otherwise, it will be ignored. - backend_
port int - The backend port that is used by the CLB instance. Valid values:
1
to65535
. NOTE: Ifserver_group_id
is not set,backend_port
is required. - bandwidth int
- The maximum bandwidth of the listener. Unit: Mbit/s. Valid values:
-1
: If you setbandwidth
to-1
, the bandwidth of the listener is unlimited.
- ca_
certificate_ strid - The ID of the certification authority (CA) certificate.
- str
- The cookie that is configured on the server. The
cookie
must be1
to200
characters in length and can contain only ASCII characters and digits. It cannot contain commas (,), semicolons (;), or space characters. It cannot start with a dollar sign ($). NOTE: Ifsticky_session
is set toon
, andsticky_session_type
is set toserver
,cookie
is required. Otherwise, it will be ignored. - int
- The timeout period of a cookie. Unit: seconds. Valid values:
1
to86400
. NOTE: Ifsticky_session
is set toon
, andsticky_session_type
is set toinsert
,cookie_timeout
is required. Otherwise, it will be ignored. - 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 value:
false
. - description str
- The name of the listener. The name must be 1 to 256 characters in length, and can contain letters, digits, hyphens (-), forward slashes (/), periods (.), and underscores (_).
- enable_
http2 str - Specifies whether to enable HTTP/2. Default value:
on
. Valid values:on
,off
. - established_
timeout int - The timeout period of a connection. Unit: seconds. Default value:
900
. Valid values:10
to900
. - forward_
port int - The listening port that is used to redirect HTTP requests to HTTPS.
- frontend_
port int - The frontend port that is used by the CLB instance. Valid values:
1
to65535
. - gzip bool
- Specifies whether to enable GZIP compression to compress specific types of files. Default value:
true
. Valid values:true
,false
. - health_
check str - Specifies whether to enable the health check feature. Default value:
on
. Valid values:on
,off
. NOTE:TCP
andUDP
listener's HealthCheck is always on, so it will be ignored when launchingTCP
orUDP
listener. - health_
check_ intconnect_ port - The backend port that is used for health checks. Valid values:
0
to65535
. NOTE:health_check_connect_port
takes effect only ifhealth_check
is set toon
. - health_
check_ strdomain - The domain name that is used for health checks. NOTE:
health_check_domain
takes effect only ifhealth_check
is set toon
. - health_
check_ strhttp_ code - The HTTP status code for a successful health check. Separate multiple HTTP status codes with commas (
,
). Default value:http_2xx
. Valid values:http_2xx
,http_3xx
,http_4xx
andhttp_5xx
. NOTE:health_check_http_code
takes effect only ifhealth_check
is set toon
. - health_
check_ intinterval - The interval between two consecutive health checks. Unit: seconds. Default value:
2
. Valid values:1
to50
. NOTE:health_check_interval
takes effect only ifhealth_check
is set toon
. - health_
check_ strmethod - The health check method used in HTTP health checks. Valid values:
head
,get
. NOTE:health_check_method
takes effect only ifhealth_check
is set toon
. - health_
check_ inttimeout - The timeout period of a health check response. Unit: seconds. Default value:
5
. Valid values:1
to300
. NOTE: Ifhealth_check_timeout
<health_check_interval
,health_check_timeout
will be replaced byhealth_check_interval
.health_check_timeout
takes effect only ifhealth_check
is set toon
. - health_
check_ strtype - The type of health checks. Default value:
tcp
. Valid values:tcp
,http
. - health_
check_ struri - The URI that is used for health checks. The
health_check_uri
must be1
to80
characters in length, and can contain letters, digits, hyphens (-), forward slashes (/), periods (.), percent signs (%), question marks (?), number signs (#), and ampersands (&). The URI must start with a forward slash (/) but cannot be a single forward slash (/). NOTE:health_check_uri
takes effect only ifhealth_check
is set toon
. - healthy_
threshold int - The number of times that an unhealthy backend server must consecutively pass health checks before it is declared healthy. Default value:
3
. Valid values:2
to10
. NOTE:healthy_threshold
takes effect only ifhealth_check
is set toon
. - idle_
timeout int - The timeout period of an idle connection. Unit: seconds. Default value:
15
. Valid values:1
to60
. - lb_
port int - lb_
protocol str - listener_
forward str - Specifies whether to enable HTTP-to-HTTPS redirection. Default value:
off
. Valid values:on
,off
. - load_
balancer_ strid - The Load Balancer ID which is used to launch a new listener.
- master_
slave_ strserver_ group_ id - The ID of the primary/secondary server group. NOTE: You cannot set both
server_group_id
andmaster_slave_server_group_id
. - persistence_
timeout int - The timeout period of session persistence. Unit: seconds. Default value:
0
. Valid values:0
to3600
. - protocol str
- The protocol to listen on. Valid values:
http
. - proxy_
protocol_ boolv2_ enabled - Specifies whether to use the Proxy protocol to pass client IP addresses to backend servers. Default value:
false
. Valid values:true
,false
. - request_
timeout int - The timeout period of a request. Unit: seconds. Default value:
60
. Valid values:1
to180
. - scheduler str
- The scheduling algorithm. Default value:
wrr
. Valid values: - server_
certificate_ strid - The ID of the server certificate. NOTE:
server_certificate_id
is also required when the value of thessl_certificate_id
is Empty. - server_
group_ strid - The ID of the vServer group. It's the ID of resource
alicloud.slb.ServerGroup
. - ssl_
certificate_ strid - The ID of the server certificate. NOTE: Field
ssl_certificate_id
has been deprecated from provider version 1.59.0. New fieldserver_certificate_id
instead. - sticky_
session str - Specifies whether to enable session persistence. Default value:
off
. Valid values:on
,off
. - sticky_
session_ strtype - The method that is used to handle a cookie. Valid values:
insert
,server
. NOTE: Ifsticky_session
is set toon
,sticky_session_type
is required. Otherwise, it will be ignored. - tls_
cipher_ strpolicy - The Transport Layer Security (TLS) security policy. Default value:
tls_cipher_policy_1_0
. Valid values:tls_cipher_policy_1_0
,tls_cipher_policy_1_1
,tls_cipher_policy_1_2
,tls_cipher_policy_1_2_strict
. - unhealthy_
threshold int - The number of times that a healthy backend server must consecutively fail health checks before it is declared unhealthy. Default value:
3
. Valid values:2
to10
. NOTE:unhealthy_threshold
takes effect only ifhealth_check
is set toon
. - x_
forwarded_ Listenerfor XForwarded For Args - Whether to set additional HTTP Header field "X-Forwarded-For". See
x_forwarded_for
below.
- acl
Id String - The ID of the network ACL that is associated with the listener. NOTE: If
acl_status
is set toon
,acl_id
is required. Otherwise, it will be ignored. - acl
Status String - Specifies whether to enable access control. Default value:
off
. Valid values:on
,off
. - acl
Type String - The type of the network ACL. Valid values:
black
,white
. NOTE: Ifacl_status
is set toon
,acl_type
is required. Otherwise, it will be ignored. - backend
Port Number - The backend port that is used by the CLB instance. Valid values:
1
to65535
. NOTE: Ifserver_group_id
is not set,backend_port
is required. - bandwidth Number
- The maximum bandwidth of the listener. Unit: Mbit/s. Valid values:
-1
: If you setbandwidth
to-1
, the bandwidth of the listener is unlimited.
- ca
Certificate StringId - The ID of the certification authority (CA) certificate.
- String
- The cookie that is configured on the server. The
cookie
must be1
to200
characters in length and can contain only ASCII characters and digits. It cannot contain commas (,), semicolons (;), or space characters. It cannot start with a dollar sign ($). NOTE: Ifsticky_session
is set toon
, andsticky_session_type
is set toserver
,cookie
is required. Otherwise, it will be ignored. - Number
- The timeout period of a cookie. Unit: seconds. Valid values:
1
to86400
. NOTE: Ifsticky_session
is set toon
, andsticky_session_type
is set toinsert
,cookie_timeout
is required. Otherwise, it will be ignored. - 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 value:
false
. - description String
- The name of the listener. The name must be 1 to 256 characters in length, and can contain letters, digits, hyphens (-), forward slashes (/), periods (.), and underscores (_).
- enable
Http2 String - Specifies whether to enable HTTP/2. Default value:
on
. Valid values:on
,off
. - established
Timeout Number - The timeout period of a connection. Unit: seconds. Default value:
900
. Valid values:10
to900
. - forward
Port Number - The listening port that is used to redirect HTTP requests to HTTPS.
- frontend
Port Number - The frontend port that is used by the CLB instance. Valid values:
1
to65535
. - gzip Boolean
- Specifies whether to enable GZIP compression to compress specific types of files. Default value:
true
. Valid values:true
,false
. - health
Check String - Specifies whether to enable the health check feature. Default value:
on
. Valid values:on
,off
. NOTE:TCP
andUDP
listener's HealthCheck is always on, so it will be ignored when launchingTCP
orUDP
listener. - health
Check NumberConnect Port - The backend port that is used for health checks. Valid values:
0
to65535
. NOTE:health_check_connect_port
takes effect only ifhealth_check
is set toon
. - health
Check StringDomain - The domain name that is used for health checks. NOTE:
health_check_domain
takes effect only ifhealth_check
is set toon
. - health
Check StringHttp Code - The HTTP status code for a successful health check. Separate multiple HTTP status codes with commas (
,
). Default value:http_2xx
. Valid values:http_2xx
,http_3xx
,http_4xx
andhttp_5xx
. NOTE:health_check_http_code
takes effect only ifhealth_check
is set toon
. - health
Check NumberInterval - The interval between two consecutive health checks. Unit: seconds. Default value:
2
. Valid values:1
to50
. NOTE:health_check_interval
takes effect only ifhealth_check
is set toon
. - health
Check StringMethod - The health check method used in HTTP health checks. Valid values:
head
,get
. NOTE:health_check_method
takes effect only ifhealth_check
is set toon
. - health
Check NumberTimeout - The timeout period of a health check response. Unit: seconds. Default value:
5
. Valid values:1
to300
. NOTE: Ifhealth_check_timeout
<health_check_interval
,health_check_timeout
will be replaced byhealth_check_interval
.health_check_timeout
takes effect only ifhealth_check
is set toon
. - health
Check StringType - The type of health checks. Default value:
tcp
. Valid values:tcp
,http
. - health
Check StringUri - The URI that is used for health checks. The
health_check_uri
must be1
to80
characters in length, and can contain letters, digits, hyphens (-), forward slashes (/), periods (.), percent signs (%), question marks (?), number signs (#), and ampersands (&). The URI must start with a forward slash (/) but cannot be a single forward slash (/). NOTE:health_check_uri
takes effect only ifhealth_check
is set toon
. - healthy
Threshold Number - The number of times that an unhealthy backend server must consecutively pass health checks before it is declared healthy. Default value:
3
. Valid values:2
to10
. NOTE:healthy_threshold
takes effect only ifhealth_check
is set toon
. - idle
Timeout Number - The timeout period of an idle connection. Unit: seconds. Default value:
15
. Valid values:1
to60
. - lb
Port Number - lb
Protocol String - listener
Forward String - Specifies whether to enable HTTP-to-HTTPS redirection. Default value:
off
. Valid values:on
,off
. - load
Balancer StringId - The Load Balancer ID which is used to launch a new listener.
- master
Slave StringServer Group Id - The ID of the primary/secondary server group. NOTE: You cannot set both
server_group_id
andmaster_slave_server_group_id
. - persistence
Timeout Number - The timeout period of session persistence. Unit: seconds. Default value:
0
. Valid values:0
to3600
. - protocol String
- The protocol to listen on. Valid values:
http
. - proxy
Protocol BooleanV2Enabled - Specifies whether to use the Proxy protocol to pass client IP addresses to backend servers. Default value:
false
. Valid values:true
,false
. - request
Timeout Number - The timeout period of a request. Unit: seconds. Default value:
60
. Valid values:1
to180
. - scheduler String
- The scheduling algorithm. Default value:
wrr
. Valid values: - server
Certificate StringId - The ID of the server certificate. NOTE:
server_certificate_id
is also required when the value of thessl_certificate_id
is Empty. - server
Group StringId - The ID of the vServer group. It's the ID of resource
alicloud.slb.ServerGroup
. - ssl
Certificate StringId - The ID of the server certificate. NOTE: Field
ssl_certificate_id
has been deprecated from provider version 1.59.0. New fieldserver_certificate_id
instead. - sticky
Session String - Specifies whether to enable session persistence. Default value:
off
. Valid values:on
,off
. - sticky
Session StringType - The method that is used to handle a cookie. Valid values:
insert
,server
. NOTE: Ifsticky_session
is set toon
,sticky_session_type
is required. Otherwise, it will be ignored. - tls
Cipher StringPolicy - The Transport Layer Security (TLS) security policy. Default value:
tls_cipher_policy_1_0
. Valid values:tls_cipher_policy_1_0
,tls_cipher_policy_1_1
,tls_cipher_policy_1_2
,tls_cipher_policy_1_2_strict
. - unhealthy
Threshold Number - The number of times that a healthy backend server must consecutively fail health checks before it is declared unhealthy. Default value:
3
. Valid values:2
to10
. NOTE:unhealthy_threshold
takes effect only ifhealth_check
is set toon
. - x
Forwarded Property MapFor - Whether to set additional HTTP Header field "X-Forwarded-For". See
x_forwarded_for
below.
Supporting Types
ListenerXForwardedFor, ListenerXForwardedForArgs
- Retrive
Client boolIp - Whether to retrieve the client ip.
- Retrive
Slb boolId - Indicates whether the SLB-ID header is used to retrieve the ID of the CLB instance. Default value:
false
. Valid values:true
,false
. - Retrive
Slb boolIp - Indicates whether the SLB-IP header is used to retrieve the virtual IP address (VIP) requested by the client. Default value:
false
. Valid values:true
,false
. - Retrive
Slb boolProto - Specifies whether to use the X-Forwarded-Proto header to retrieve the listener protocol. Default value:
false
. Valid values:true
,false
.
- Retrive
Client boolIp - Whether to retrieve the client ip.
- Retrive
Slb boolId - Indicates whether the SLB-ID header is used to retrieve the ID of the CLB instance. Default value:
false
. Valid values:true
,false
. - Retrive
Slb boolIp - Indicates whether the SLB-IP header is used to retrieve the virtual IP address (VIP) requested by the client. Default value:
false
. Valid values:true
,false
. - Retrive
Slb boolProto - Specifies whether to use the X-Forwarded-Proto header to retrieve the listener protocol. Default value:
false
. Valid values:true
,false
.
- retrive
Client BooleanIp - Whether to retrieve the client ip.
- retrive
Slb BooleanId - Indicates whether the SLB-ID header is used to retrieve the ID of the CLB instance. Default value:
false
. Valid values:true
,false
. - retrive
Slb BooleanIp - Indicates whether the SLB-IP header is used to retrieve the virtual IP address (VIP) requested by the client. Default value:
false
. Valid values:true
,false
. - retrive
Slb BooleanProto - Specifies whether to use the X-Forwarded-Proto header to retrieve the listener protocol. Default value:
false
. Valid values:true
,false
.
- retrive
Client booleanIp - Whether to retrieve the client ip.
- retrive
Slb booleanId - Indicates whether the SLB-ID header is used to retrieve the ID of the CLB instance. Default value:
false
. Valid values:true
,false
. - retrive
Slb booleanIp - Indicates whether the SLB-IP header is used to retrieve the virtual IP address (VIP) requested by the client. Default value:
false
. Valid values:true
,false
. - retrive
Slb booleanProto - Specifies whether to use the X-Forwarded-Proto header to retrieve the listener protocol. Default value:
false
. Valid values:true
,false
.
- retrive_
client_ boolip - Whether to retrieve the client ip.
- retrive_
slb_ boolid - Indicates whether the SLB-ID header is used to retrieve the ID of the CLB instance. Default value:
false
. Valid values:true
,false
. - retrive_
slb_ boolip - Indicates whether the SLB-IP header is used to retrieve the virtual IP address (VIP) requested by the client. Default value:
false
. Valid values:true
,false
. - retrive_
slb_ boolproto - Specifies whether to use the X-Forwarded-Proto header to retrieve the listener protocol. Default value:
false
. Valid values:true
,false
.
- retrive
Client BooleanIp - Whether to retrieve the client ip.
- retrive
Slb BooleanId - Indicates whether the SLB-ID header is used to retrieve the ID of the CLB instance. Default value:
false
. Valid values:true
,false
. - retrive
Slb BooleanIp - Indicates whether the SLB-IP header is used to retrieve the virtual IP address (VIP) requested by the client. Default value:
false
. Valid values:true
,false
. - retrive
Slb BooleanProto - Specifies whether to use the X-Forwarded-Proto header to retrieve the listener protocol. Default value:
false
. Valid values:true
,false
.
Import
Classic Load Balancer (SLB) Load Balancer Listener can be imported using the id, e.g.
$ pulumi import alicloud:slb/listener:Listener example <load_balancer_id>:<protocol>:<frontend_port>
$ pulumi import alicloud:slb/listener:Listener example <load_balancer_id>:<frontend_port>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.