ALIYUN::NLB::Listener is a resource type that creates a listener for a Network Load Balancer (NLB) instance.
Syntax
{
"Type": "ALIYUN::NLB::Listener",
"Properties": {
"CaEnabled": Boolean,
"ListenerPort": Integer,
"StartPort": Integer,
"Cps": Integer,
"ServerGroupId": String,
"IdleTimeout": Integer,
"LoadBalancerId": String,
"Mss": Integer,
"ListenerProtocol": String,
"SecurityPolicyId": String,
"ListenerDescription": String,
"AlpnPolicy": String,
"CaCertificateIds": List,
"EndPort": Integer,
"ProxyProtocolEnabled": Boolean,
"CertificateIds": List,
"SecSensorEnabled": Boolean,
"Enable": Boolean,
"AlpnEnabled": Boolean,
"Tags": List,
"ServerGroupTuples": List,
"ProxyProtocolV2Config": Map
}
}
Properties
|
Property name |
Type |
Required |
Update allowed |
Description |
Constraints |
|
ListenerPort |
Integer |
Yes |
No |
The frontend port that is used by the Server Load Balancer (SLB) instance. |
The value must be in the range of 1 to 65535. |
|
ListenerProtocol |
String |
Yes |
No |
The frontend protocol that is used by the SLB instance. |
Valid values:
|
|
LoadBalancerId |
String |
Yes |
No |
The ID of the SLB instance. |
None |
|
AlpnEnabled |
Boolean |
No |
Yes |
Whether to enable Application-Layer Protocol Negotiation (ALPN). |
Valid values:
|
|
AlpnPolicy |
String |
No |
Yes |
Application-Layer Protocol Negotiation (ALPN) agent. |
None |
|
CaCertificateIds |
List |
No |
No |
The ID of the Certificate Authority (CA) certificate. |
None |
|
CaEnabled |
Boolean |
No |
Yes |
Whether to enable mutual authentication. |
Valid values:
|
|
CertificateIds |
List |
No |
Yes |
The ID of the signing certificate. |
None |
|
Cps |
Integer |
No |
Yes |
The number of new connections per second. |
The value must be 3000. |
|
Enable |
Boolean |
No |
No |
Whether to enable the listener. |
Valid values:
|
|
EndPort |
Integer |
No |
No |
The last port in the listener port range. |
The value must be 65535. |
|
IdleTimeout |
Integer |
No |
Yes |
The timeout period for idle connections. |
The value must be in the range of 1 to 60. Unit: seconds. |
|
ListenerDescription |
String |
No |
Yes |
The description of the listener. |
The description must be 2 to 256 characters in length. It can contain letters, digits, hyphens (-), forward slashes (/), periods (.), and underscores (_). |
|
Mss |
Integer |
No |
Yes |
MSS autonegotiation |
None |
|
ProxyProtocolEnabled |
Boolean |
No |
Yes |
Whether to enable Proxy Protocol v2. |
Valid values:
|
|
ProxyProtocolV2Config |
Map |
No |
Yes |
The configuration for using the Proxy Protocol to pass client information, such as VpcId, PrivateLinkEpId, and PrivateLinkEpsId, to backend servers. |
For more information, see ProxyProtocolV2Config properties. |
|
SecSensorEnabled |
Boolean |
No |
Yes |
Whether to enable secondary monitoring. |
Valid values:
|
|
SecurityPolicyId |
String |
No |
Yes |
The ID of the security policy. |
None |
|
ServerGroupId |
String |
No |
Yes |
The ID of the server group to which requests are forwarded. |
None |
|
ServerGroupTuples |
List |
No |
Yes |
The list of destination server groups to which requests are forwarded. |
A list of destination server group IDs and their weights. For more information, see ServerGroupTuples properties. |
|
StartPort |
Integer |
No |
No |
The first port in the listener port range. |
The value must be 1. |
|
Tags |
List |
No |
Yes |
The list of tags. |
For more information, see Tags properties. |
ServerGroupTuples syntax
"ServerGroupTuples": [{
"ServerGroupId": String,
"Weight": Integer
}]
ServerGroupTuples properties
|
Property name |
Type |
Required |
Update allowed |
Description |
Constraints |
|
ServerGroupId |
String |
No |
Yes |
The ID of the destination server group to which requests are forwarded. |
None |
|
Weight |
Integer |
No |
Yes |
The weight. |
A larger value indicates a higher weight. A server group with a higher weight receives more requests. The value must be in the range of 0 to 100. |
ProxyProtocolV2Config syntax
"ProxyProtocolV2Config": {
"Ppv2PrivateLinkEpIdEnabled": Boolean,
"Ppv2PrivateLinkEpsIdEnabled": Boolean,
"Ppv2VpcIdEnabled": Boolean
}
ProxyProtocolV2Config properties
|
Property name |
Type |
Required |
Update allowed |
Description |
Constraints |
|
Ppv2PrivateLinkEpIdEnabled |
Boolean |
No |
Yes |
Whether to use the Proxy Protocol to pass the PrivateLinkEpId to backend servers. |
Valid values:
|
|
Ppv2PrivateLinkEpsIdEnabled |
Boolean |
No |
Yes |
Whether to use the Proxy Protocol to pass the PrivateLinkEpsId to backend servers. |
Valid values:
|
|
Ppv2VpcIdEnabled |
Boolean |
No |
Yes |
Whether to use the Proxy Protocol to pass the VpcId to backend servers. |
Valid values:
|
Tags syntax
"Tags": [
{
"Key": String,
"Value": String
}
]
Tags properties
|
Property name |
Type |
Required |
Update allowed |
Description |
Constraints |
|
Key |
String |
Yes |
No |
The tag key. |
None |
|
Value |
String |
No |
No |
The tag value. |
None |
Return value
Fn::GetAtt
-
ListenerPort: The frontend port used by the SLB instance.
-
ListenerId: The ID of the listener.
Examples
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
ServerGroupId:
Type: String
Description: ID of the ServerGroup
LoadBalancerId:
Type: String
Description: ID of the LoadBalancer
ListenerProtocol:
Type: String
AllowedValues:
- TCP
- UDP
- TCPSSL
Resources:
ExtensionResource:
Type: ALIYUN::NLB::Listener
Properties:
ServerGroupId:
Ref: ServerGroupId
LoadBalancerId:
Ref: LoadBalancerId
ListenerProtocol:
Ref: ListenerProtocol
Outputs:
ListenerPort:
Description: ListenerPort of created Listener
Value:
Fn::GetAtt:
- ExtensionResource
- ListenerPort
ListenerId:
Description: Id of created Listener
Value:
Fn::GetAtt:
- ExtensionResource
- ListenerId
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"ServerGroupId": {
"Type": "String",
"Description": "ID of the ServerGroup"
},
"LoadBalancerId": {
"Type": "String",
"Description": "ID of the LoadBalancer"
},
"ListenerProtocol": {
"Type": "String",
"AllowedValues": [
"TCP",
"UDP",
"TCPSSL"
]
}
},
"Resources": {
"ExtensionResource": {
"Type": "ALIYUN::NLB::Listener",
"Properties": {
"ServerGroupId": {
"Ref": "ServerGroupId"
},
"LoadBalancerId": {
"Ref": "LoadBalancerId"
},
"ListenerProtocol": {
"Ref": "ListenerProtocol"
}
}
}
},
"Outputs": {
"ListenerPort": {
"Description": "ListenerPort of created Listener",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"ListenerPort"
]
}
},
"ListenerId": {
"Description": "Id of created Listener",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"ListenerId"
]
}
}
}
}