Associates a network access control list (ACL) with a vSwitch.
Syntax
{
"Type": "ALIYUN::VPC::NetworkAclAssociation",
"Properties": {
"NetworkAclId": String,
"Resources": List
}
}
Properties
| Property | Type | Required | Update allowed | Description | Constraints |
| NetworkAclId | String | Yes | No | The ID of the network ACL. | None |
| Resources | List | Yes | No | The resources to associate with the network ACL. | You can associate a maximum of 20 resources. For more information, see Resources properties. |
Resources syntax
"Resources": [
{
"ResourceId": String,
"ResourceType": String
}
]
Resources properties
| Property Name | Type | Required | Update allowed | Description | Constraints |
| ResourceId | String | Yes | No | The ID of the resource. | None |
| ResourceType | String | No | No | The type of the resource. | Valid value: vSwitch, which specifies a vSwitch resource. |
Return value
Fn::GetAtt
NetworkAclId: The ID of the network ACL.
Examples
-
JSONformat{ "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" ] } } } }