ALIYUN::ENS::NetworkAclAssociation类型用于绑定网络ACL至网络。
语法
{
"Type": "ALIYUN::ENS::NetworkAclAssociation",
"Properties": {
"NetworkAclId": String,
"NetworkIds": List
}
}
属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
NetworkAclId | String | 是 | 否 | ACL ID。 | 无 |
NetworkIds | List | 是 | 否 | 需要关联的网络ID | 最多支持30个资源。 |
返回值
Fn::GetAtt
NetworkAclId:ACL ID。
示例
YAML
格式
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
NetworkAclId:
Type: String
Description:
en: The ID of the network ACL.
Required: true
NetworkIds:
AssociationPropertyMetadata:
Parameter:
Type: String
Required: false
AssociationProperty: List[Parameter]
Type: Json
Description:
en: The network id which you want to associate the network ACL.
Required: true
MinLength: 1
MaxLength: 30
Resources:
NetworkAclAssociation:
Type: ALIYUN::ENS::NetworkAclAssociation
Properties:
NetworkAclId:
Ref: NetworkAclId
NetworkIds:
Ref: NetworkIds
Outputs:
NetworkAclId:
Description: The network acl id to associate.
Value:
Fn::GetAtt:
- NetworkAclAssociation
- NetworkAclId
JSON
格式
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"NetworkAclId": {
"Type": "String",
"Description": {
"en": "The ID of the network ACL."
},
"Required": true
},
"NetworkIds": {
"AssociationPropertyMetadata": {
"Parameter": {
"Type": "String",
"Required": false
}
},
"AssociationProperty": "List[Parameter]",
"Type": "Json",
"Description": {
"en": "The network id which you want to associate the network ACL."
},
"Required": true,
"MinLength": 1,
"MaxLength": 30
}
},
"Resources": {
"NetworkAclAssociation": {
"Type": "ALIYUN::ENS::NetworkAclAssociation",
"Properties": {
"NetworkAclId": {
"Ref": "NetworkAclId"
},
"NetworkIds": {
"Ref": "NetworkIds"
}
}
}
},
"Outputs": {
"NetworkAclId": {
"Description": "The network acl id to associate.",
"Value": {
"Fn::GetAtt": [
"NetworkAclAssociation",
"NetworkAclId"
]
}
}
}
}
文档内容是否对您有帮助?