The ALIYUN::SAE::NlbBinding resource binds a Network Load Balancer (NLB) to an application.
Syntax
{
"Type": "ALIYUN::SAE::NlbBinding",
"Properties": {
"AppId": String,
"Listeners": List,
"NlbId": String
}
}Properties
Parameter | Type | Required | Update allowed | Description | Constraints |
AppId | String | Yes | No | The ID of the SAE application. | None |
Listeners | List | Yes | No | The listeners of the NLB. | The maximum length is 1. For more information, see Listeners properties. |
NlbId | String | Yes | No | The ID of the Network Load Balancer (NLB) instance. | None |
Listeners syntax
"Listeners": [
{
"TargetPort": Integer,
"CertIds": String,
"Port": Integer,
"Protocol": String
}
]Listeners properties
Parameter | Type | Required | Update allowed | Description | Constraints |
Port | Integer | Yes | No | The listening port. | Valid values: 0 to 65535. |
Protocol | String | Yes | No | The listener protocol. | Valid values:
|
TargetPort | Integer | Yes | No | The target port. | Valid values: 0 to 65535. |
CertIds | String | No | No | The listener's certificate ID. | None |
Return values
Fn::GetAtt
NlbId: The ID of the Network Load Balancer (NLB) instance.
Examples
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
AppId:
Type: String
Description:
en: The ID of the SAE application.
Required: true
NlbId:
Type: String
Description:
en: The ID of the Network Load Balancer (NLB).
Required: true
Listeners:
Description:
en: The listeners of the NLB.
Required: true
Type: Json
MaxLength: 1
AssociationProperty: List[Parameters]
AssociationPropertyMetadata:
Parameters:
Port:
Type: Number
Description:
en: The port of the listener.
MinValue: 0
MaxValue: 65535
Required: true
TargetPort:
Type: Number
Description:
en: The target port of the listener.
MinValue: 0
MaxValue: 65535
Required: true
Protocol:
Type: String
Description:
en: The protocol of the listener.
AllowedValues:
- TCP
- UDP
- TCPSSL
Required: true
CertIds:
Type: String
Description:
en: The certificate ID of the listener.
Default: Null
Required: false
Resources:
NlbBinding:
Type: ALIYUN::SAE::NlbBinding
Properties:
AppId:
Ref: AppId
NlbId:
Ref: NlbId
Listeners:
Ref: Listeners
Outputs:
NlbId:
Value:
Fn::GetAtt:
- NlbBinding
- NlbId
Description: The ID of the Network Load Balancer (NLB).
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"AppId": {
"Type": "String",
"Description": {
"en": "The ID of the SAE application."
},
"Required": true
},
"NlbId": {
"Type": "String",
"Description": {
"en": "The ID of the Network Load Balancer (NLB)."
},
"Required": true
},
"Listeners": {
"Description": {
"en": "The listeners of the NLB."
},
"Required": true,
"Type": "Json",
"MaxLength": 1,
"AssociationProperty": "List[Parameters]",
"AssociationPropertyMetadata": {
"Parameters": {
"Port": {
"Type": "Number",
"Description": {
"en": "The port of the listener."
},
"MinValue": 0,
"MaxValue": 65535,
"Required": true
},
"TargetPort": {
"Type": "Number",
"Description": {
"en": "The target port of the listener."
},
"MinValue": 0,
"MaxValue": 65535,
"Required": true
},
"Protocol": {
"Type": "String",
"Description": {
"en": "The protocol of the listener."
},
"AllowedValues": [
"TCP",
"UDP",
"TCPSSL"
],
"Required": true
},
"CertIds": {
"Type": "String",
"Description": {
"en": "The certificate ID of the listener."
},
"Default": null,
"Required": false
}
}
}
}
},
"Resources": {
"NlbBinding": {
"Type": "ALIYUN::SAE::NlbBinding",
"Properties": {
"AppId": {
"Ref": "AppId"
},
"NlbId": {
"Ref": "NlbId"
},
"Listeners": {
"Ref": "Listeners"
}
}
}
},
"Outputs": {
"NlbId": {
"Value": {
"Fn::GetAtt": [
"NlbBinding",
"NlbId"
]
},
"Description": "The ID of the Network Load Balancer (NLB)."
}
}
}