ALIYUN::NLB::Listener is used to create a listener.
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
}
}
Properties
Property | Type | Required | Editable | Description | Constraint |
---|---|---|---|---|---|
CaEnabled | Boolean | No | No | Specifies whether to enable mutual authentication. | Default value: false. Valid values:
|
ListenerPort | Integer | No | No | The frontend port that you want to use for the NLB instance. | Valid values: 1 to 65535. |
StartPort | Integer | No | No | The start port in the listening port range. | Set the value to 1. |
Cps | Integer | No | No | The number of new connections per second (CPS) on the NLB instance. | Set the value to 3000. |
ServerGroupId | String | Yes | No | The ID of the server group to which the request is forwarded. | None. |
IdleTimeout | Integer | No | No | The timeout period of an idle connection. | Valid values: 1 to 60. Unit: seconds. |
LoadBalancerId | String | Yes | No | The ID of the NLB instance. | None. |
Mss | Integer | No | No | The Maximum Segment Size (MSS) announcement. | None. |
ListenerProtocol | String | Yes | No | The frontend protocol that is used by the NLB instance. | Valid values:
|
SecurityPolicyId | String | No | No | The ID of the security policy. | None. |
ListenerDescription | String | No | No | The description of the listener. | The description must be 2 to 256 characters in length, and can contain letters, digits, hyphens (-), forward slashes (/), periods (.), and underscores (_). |
AlpnPolicy | String | No | No | The Application-Layer Protocol Negotiation (ALPN) policy. | None. |
CaCertificateIds | List | No | No | The IDs of the certificate authority (CA) certificates. | None. |
EndPort | Integer | No | No | The end port in the listening port range. | Set the value to 65535. |
ProxyProtocolEnabled | Boolean | No | No | Specifies whether to enable proxy protocol version 2. | Valid values:
|
CertificateIds | List | No | No | The IDs of the certificates. | None. |
SecSensorEnabled | Boolean | No | No | Specifies whether to enable fine-grained monitoring. | Valid values:
|
Enable | Boolean | No | No | Specifies whether to enable the listener. | Valid values:
|
AlpnEnabled | Boolean | No | No | Specifies whether to enable the ALPN policy. | Valid values:
|
Return values
Fn::GetAtt
- ListenerPort: the frontend port that is used by the NLB instance.
- ListenerId: the ID of the listener.
Examples
JSON
format
{
"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"
]
}
}
}
}