ALIYUN::VPC::NetworkAclAssociation is used to associate a network access control list (ACL) with a vSwitch.
Syntax
{
"Type": "ALIYUN::VPC::NetworkAclAssociation",
"Properties": {
"NetworkAclId": String,
"Resources": List
}
}
Properties
Property | Type | Required | Editable | Description | Constraint |
---|---|---|---|---|---|
NetworkAclId | String | Yes | No | The description of the network ACL. | None |
Resources | List | Yes | No | The resources associated with the network ACL. | A maximum of 20 resources can be associated. For more information, see Resources properties. |
Resources syntax
"Resources": [
{
"ResourceId": String,
"ResourceType": String
}
]
Resources properties
Property | Type | Required | Editable | Description | Constraint |
---|---|---|---|---|---|
ResourceId | String | Yes | No | The ID of the resource. | None |
ResourceType | String | No | No | The type of the resource. | Set the value to vSwitch. |
Response parameters
Fn::GetAtt
NetworkAclId: the ID of the network ACL.
Examples
JSON
format{ "ROSTemplateFormatVersion": "2015-09-01", "Parameters": { "NetworkAclId": { "Type": "String", "Description": "The ID of the network ACL." }, "VSwitchId": { "Type": "String", "AssociationProperty": "ALIYUN::ECS::VSwitch::VSwitchId" } }, "Resources": { "NetworkAclAssociation": { "Type": "ALIYUN::VPC::NetworkAclAssociation", "Properties": { "NetworkAclId": { "Ref": "NetworkAclId" }, "Resources": [ { "ResourceId": { "Ref": "VSwitchId" }, "ResourceType": "VSwitch" } ] } } }, "Outputs": { "NetworkAclId": { "Description": "The ID of the network ACL.", "Value": { "Fn::GetAtt": [ "NetworkAclAssociation", "NetworkAclId" ] } } } }