ALIYUN::ALB::SecurityGroupAttachment
更新時間:
ALIYUN::ALB::SecurityGroupAttachment類型用于為應(yīng)用型負(fù)載均衡實例綁定已創(chuàng)建的安全組。
語法
{
"Type": "ALIYUN::ALB::SecurityGroupAttachment",
"Properties": {
"LoadBalancerId": String,
"SecurityGroupIds": List
}
}
屬性
屬性名稱 | 類型 | 必須 | 允許更新 | 描述 | 約束 |
LoadBalancerId | String | 是 | 否 | 應(yīng)用型負(fù)載均衡實例 ID。 | 無 |
SecurityGroupIds | List | 否 | 是 | 安全組 ID 集合。 | 最多支持添加4個安全組。 |
返回值
Fn::GetAtt
無
示例
YAML
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
LoadBalancerId:
Type: String
Description:
en: The ID of ALB instance.
Required: true
SecurityGroupIds:
AssociationPropertyMetadata:
Parameter:
AssociationProperty: ALIYUN::ECS::SecurityGroup::SecurityGroupId
Type: String
Required: true
AssociationProperty: List[Parameter]
Type: Json
Description:
en: The IDs of the security group to which the ALB instance join.
Required: false
MinLength: 0
MaxLength: 4
Resources:
SecurityGroupAttachment:
Type: ALIYUN::ALB::SecurityGroupAttachment
Properties:
LoadBalancerId:
Ref: LoadBalancerId
SecurityGroupIds:
Ref: SecurityGroupIds
JSON
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"LoadBalancerId": {
"Type": "String",
"Description": {
"en": "The ID of ALB instance."
},
"Required": true
},
"SecurityGroupIds": {
"AssociationPropertyMetadata": {
"Parameter": {
"AssociationProperty": "ALIYUN::ECS::SecurityGroup::SecurityGroupId",
"Type": "String",
"Required": true
}
},
"AssociationProperty": "List[Parameter]",
"Type": "Json",
"Description": {
"en": "The IDs of the security group to which the ALB instance join."
},
"Required": false,
"MinLength": 0,
"MaxLength": 4
}
},
"Resources": {
"SecurityGroupAttachment": {
"Type": "ALIYUN::ALB::SecurityGroupAttachment",
"Properties": {
"LoadBalancerId": {
"Ref": "LoadBalancerId"
},
"SecurityGroupIds": {
"Ref": "SecurityGroupIds"
}
}
}
}
}
文檔內(nèi)容是否對您有幫助?