ALIYUN::SAE::NlbBinding类型用于为应用绑定NLB。
语法
{
"Type": "ALIYUN::SAE::NlbBinding",
"Properties": {
"AppId": String,
"Listeners": List,
"NlbId": String
}
}
属性
|
属性名称 |
类型 |
必须 |
允许更新 |
描述 |
约束 |
|
AppId |
String |
是 |
否 |
SAE应用的ID。 |
无 |
|
Listeners |
List |
是 |
否 |
NLB的监听器。 |
长度最大值为1。更多信息,请参考Listeners属性。 |
|
NlbId |
String |
是 |
否 |
网络型负载均衡(NLB)实例的ID。 |
无 |
Listeners语法
"Listeners": [
{
"TargetPort": Integer,
"CertIds": String,
"Port": Integer,
"Protocol": String
}
]
Listeners属性
|
属性名称 |
类型 |
必须 |
允许更新 |
描述 |
约束 |
|
Port |
Integer |
是 |
否 |
监听器的端口。 |
取值范围:0到65535。 |
|
Protocol |
String |
是 |
否 |
监听器的协议。 |
取值:
|
|
TargetPort |
Integer |
是 |
否 |
监听器的目标端口。 |
取值范围:0到65535。 |
|
CertIds |
String |
否 |
否 |
监听器的证书ID。 |
无 |
返回值
Fn::GetAtt
NlbId:网络型负载均衡(NLB)的ID。
示例
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)."
}
}
}该文章对您有帮助吗?