Skip to content

ListenerProps

Properties for defining a Listener.

See https://www.alibabacloud.com/help/ros/developer-reference/aliyun-slb-listener

Initializer

using AlibabaCloud.SDK.ROS.CDK.Slb;
new ListenerProps {
    object Bandwidth,
    object ListenerPort,
    object LoadBalancerId,
    object Protocol,
    object AclId = null,
    object AclIds = null,
    object AclStatus = null,
    object AclType = null,
    object BackendServerPort = null,
    object CaCertificateId = null,
    object ConnectionDrain = null,
    object ConnectionDrainTimeout = null,
    object Description = null,
    object EnableHttp2 = null,
    object Gzip = null,
    object HealthCheck = null,
    object HttpConfig = null,
    object IdleTimeout = null,
    object MasterSlaveServerGroupId = null,
    object Persistence = null,
    object PortRange = null,
    object ProxyProtocolV2Enabled = null,
    object RequestTimeout = null,
    object Scheduler = null,
    object ServerCertificateId = null,
    object StartListener = null,
    TagsProperty[] Tags = null,
    object TlsCipherPolicy = null,
    object VServerGroupId = null
};

Properties

Name Type Description
Bandwidth object Property bandwidth: The bandwidth of network, unit in Mbps(Million bits per second).
ListenerPort object Property listenerPort: Port for front listener.
LoadBalancerId object Property loadBalancerId: The id of load balancer to create listener.
Protocol object Property protocol: The load balancer transport protocol to use for routing: http, https, tcp, or udp.
AclId object Property aclId: The ID of the access control associated with the listener to be created.
AclIds object Property aclIds: The ID list of the access controls associated with the listener to be created.
AclStatus object Property aclStatus: Indicates whether to enable access control.
AclType object Property aclType: The access control type: * white: Indicates a whitelist.
BackendServerPort object Property backendServerPort: Backend server can listen on ports from 1 to 65535.
CaCertificateId object Property caCertificateId: CA server certificate id, for https listener only.
ConnectionDrain object Property connectionDrain: Whether to enable graceful connection interruption.
ConnectionDrainTimeout object Property connectionDrainTimeout: Set the connection graceful interruption timeout.
Description object Property description: The description of the listener.It must be 1 to 80 characters in length and can contain letters, digits, hyphens (-), forward slashes (\/), periods (.), and underscores (_). Chinese characters are supported.
EnableHttp2 object Property enableHttp2: Specifies whether to use HTTP\/2.
Gzip object Property gzip: Specifies whether to enable Gzip compression to compress specific types of files.
HealthCheck object Property healthCheck: The properties of health checking setting.
HttpConfig object Property httpConfig: Config for http protocol.
IdleTimeout object Property idleTimeout: Specify the idle connection timeout in seconds.
MasterSlaveServerGroupId object Property masterSlaveServerGroupId: The id of the MasterSlaveServerGroup which use in listener.
Persistence object Property persistence: The properties of persistence.
PortRange object Property portRange: Port range, only supports TCP or UDP listener.
ProxyProtocolV2Enabled object Property proxyProtocolV2Enabled: Whether to support carrying the client source address to the backend server through the Proxy Protocol.
RequestTimeout object Property requestTimeout: Specify the request timeout in seconds.
Scheduler object Property scheduler: The scheduling algorithm.
ServerCertificateId object Property serverCertificateId: Server certificate id, for https listener only, this properties is required.
StartListener object Property startListener: Whether start listener after listener created.
Tags TagsProperty[] Property tags: Tags to attach to instance.
TlsCipherPolicy object Property tlsCipherPolicy: The Transport Layer Security (TLS) security policy.
VServerGroupId object Property vServerGroupId: The id of the VServerGroup which use in listener.

BandwidthRequired

public object Bandwidth { get; set; }
  • Type: object

Property bandwidth: The bandwidth of network, unit in Mbps(Million bits per second).

If the specified load balancer with "LOAD_BALANCE_ID" is charged by "paybybandwidth" and is created in classic network, each Listener's bandwidth must be greater than 0 and the sum of all of its Listeners' bandwidth can't be greater than the bandwidth of the load balancer.


ListenerPortRequired

public object ListenerPort { get; set; }
  • Type: object

Property listenerPort: Port for front listener.

Range from 0 to 65535.


LoadBalancerIdRequired

public object LoadBalancerId { get; set; }
  • Type: object

Property loadBalancerId: The id of load balancer to create listener.


ProtocolRequired

public object Protocol { get; set; }
  • Type: object

Property protocol: The load balancer transport protocol to use for routing: http, https, tcp, or udp.


AclIdOptional

public object AclId { get; set; }
  • Type: object

Property aclId: The ID of the access control associated with the listener to be created.

If the value of the AclStatus parameter is on, this parameter is required.


AclIdsOptional

public object AclIds { get; set; }
  • Type: object

Property aclIds: The ID list of the access controls associated with the listener to be created.

If the value of the AclStatus parameter is on, this parameter is required.AclIds have higher priority than AclId.


AclStatusOptional

public object AclStatus { get; set; }
  • Type: object

Property aclStatus: Indicates whether to enable access control.

Valid values: on | off. Default value: off


AclTypeOptional

public object AclType { get; set; }
  • Type: object

Property aclType: The access control type: * white: Indicates a whitelist.

Only requests from IP addresses or CIDR blocks in the selected access control lists are forwarded. This applies to scenarios in which an application only allows access from specific IP addresses. Enabling a whitelist poses some risks to your services. After a whitelist is enabled, only the IP addresses in the list can access the listener. If you enable a whitelist without adding any IP addresses in the list, no requests are forwarded.

  • black: Indicates a blacklist. Requests from IP addresses or CIDR blocks in the selected access control lists are not forwarded (that is, they are blocked). This applies to scenarios in which an application only denies access from specific IP addresses. If you enable a blacklist without adding any IP addresses in the list, all requests are forwarded.

If the value of the AclStatus parameter is on, this parameter is required.


BackendServerPortOptional

public object BackendServerPort { get; set; }
  • Type: object

Property backendServerPort: Backend server can listen on ports from 1 to 65535.


CaCertificateIdOptional

public object CaCertificateId { get; set; }
  • Type: object

Property caCertificateId: CA server certificate id, for https listener only.


ConnectionDrainOptional

public object ConnectionDrain { get; set; }
  • Type: object

Property connectionDrain: Whether to enable graceful connection interruption.

Value:on: turn on off: Not turned on Note: Only effective TCP listener.


ConnectionDrainTimeoutOptional

public object ConnectionDrainTimeout { get; set; }
  • Type: object

Property connectionDrainTimeout: Set the connection graceful interruption timeout.

Unit: seconds. Value range: 10-900. Note: Only effective for TCP listener. When ConnectionDrain is on, this option is required.


DescriptionOptional

public object Description { get; set; }
  • Type: object

Property description: The description of the listener.It must be 1 to 80 characters in length and can contain letters, digits, hyphens (-), forward slashes (\/), periods (.), and underscores (_). Chinese characters are supported.


EnableHttp2Optional

public object EnableHttp2 { get; set; }
  • Type: object

Property enableHttp2: Specifies whether to use HTTP\/2.

It takes effect when Protocol=https. Valid values: on: yes off: no


GzipOptional

public object Gzip { get; set; }
  • Type: object

Property gzip: Specifies whether to enable Gzip compression to compress specific types of files.

Valid values: on (default): yes off: no


HealthCheckOptional

public object HealthCheck { get; set; }
  • Type: object

Property healthCheck: The properties of health checking setting.


HttpConfigOptional

public object HttpConfig { get; set; }
  • Type: object

Property httpConfig: Config for http protocol.


IdleTimeoutOptional

public object IdleTimeout { get; set; }
  • Type: object

Property idleTimeout: Specify the idle connection timeout in seconds.

Valid value: 1-60 If no request is received during the specified timeout period, Server Load Balancer will temporarily terminate the connection and restart the connection when the next request comes.


MasterSlaveServerGroupIdOptional

public object MasterSlaveServerGroupId { get; set; }
  • Type: object

Property masterSlaveServerGroupId: The id of the MasterSlaveServerGroup which use in listener.


PersistenceOptional

public object Persistence { get; set; }
  • Type: object

Property persistence: The properties of persistence.


PortRangeOptional

public object PortRange { get; set; }
  • Type: object

Property portRange: Port range, only supports TCP or UDP listener.

ListenerPort should be 0 when PortRange is specified.


ProxyProtocolV2EnabledOptional

public object ProxyProtocolV2Enabled { get; set; }
  • Type: object

Property proxyProtocolV2Enabled: Whether to support carrying the client source address to the backend server through the Proxy Protocol.

Value: true: Yes false (default): No Note: Only effective TCP or UDP listener.


RequestTimeoutOptional

public object RequestTimeout { get; set; }
  • Type: object

Property requestTimeout: Specify the request timeout in seconds.

Valid value: 1-180 If no response is received from the backend server during the specified timeout period, Server Load Balancer will stop waiting and send an HTTP 504 error to the client.


SchedulerOptional

public object Scheduler { get; set; }
  • Type: object

Property scheduler: The scheduling algorithm.

Valid values: wrr: Backend servers that have higher weights receive more requests than those that have lower weights. wlc: Requests are distributed based on the combination of the weights and connections to backend servers. If two backend servers have the same weight, the backend server that has fewer connections receives more requests. rr: Requests are distributed to backend servers in sequence. sch: specifies consistent hashing that is based on source IP addresses. Requests from the same source IP address are distributed to the same backend server. tch: specifies consistent hashing that is based on four factors: source IP address, destination IP address, source port number, and destination port number. Requests that contain the same preceding information are distributed to the same backend server. Default: wrr


ServerCertificateIdOptional

public object ServerCertificateId { get; set; }
  • Type: object

Property serverCertificateId: Server certificate id, for https listener only, this properties is required.


StartListenerOptional

public object StartListener { get; set; }
  • Type: object

Property startListener: Whether start listener after listener created.

Default True.


TagsOptional

public TagsProperty[] Tags { get; set; }

Property tags: Tags to attach to instance.

Max support 20 tags to add during create instance. Each tag with two properties Key and Value, and Key is required.


TlsCipherPolicyOptional

public object TlsCipherPolicy { get; set; }
  • Type: object

Property tlsCipherPolicy: The Transport Layer Security (TLS) security policy.

Each security policy contains TLS protocol versions and cipher suites available for HTTPS. It takes effect when Protocol=https.


VServerGroupIdOptional

public object VServerGroupId { get; set; }
  • Type: object

Property vServerGroupId: The id of the VServerGroup which use in listener.