DATASOURCE::VPC::NetworkAcls is used to query created network access control lists (ACLs).

Syntax

{
  "Type": "DATASOURCE::VPC::NetworkAcls",
  "Properties": {
    "NetworkAclId": String,
    "VpcId": String,
    "ResourceId": String,
    "ResourceType": String,
    "NetworkAclName": String
  }
}

Properties

Property Category Required Editable Description Constraint
NetworkAclId String No Yes The ID of the network ACL. None.
VpcId String No Yes The ID of the virtual private cloud (VPC) with which the network ACL is associated. None.
ResourceId String No Yes The ID of the associated resource. You must specify both the ResourceType and ResourceId properties.
ResourceType String No Yes The type of the associated resource. Set the value to VSwitch.

You must specify both the ResourceType and ResourceId properties.

NetworkAclName String No Yes The name of the network ACL. The name must be 2 to 128 characters in length, and can contain digits, underscores (_), and hyphens (-). The name must start with a letter but cannot start with http:// or https://.

Return values (Fn::GetAtt)

  • NetworkAclIds: the IDs of the network ACLs.
  • NetworkAcls: the details of the network ACLs.
Property Type Description Constraint
NetworkAclIds List The IDs of the network ACLs. Example: ['nacl-a2do9e413e0spxscd****', 'nacl-d2do123jss3e0spxscd****'].
NetworkAcls List The details of the network ACLs. None.
Status String The state of the network ACL. Valid values:
  • Available: The network ACL is available.
  • Modifying: The network ACL is being configured.
VpcId String The ID of the VPC with which the network ACL is associated. None.
CreationTime String The time when the network ACL was created. None.
Description String The description of the network ACL. None.
NetworkAclName String The name of the network ACL. None.
NetworkAclId String The ID of the network ACL. None.
OwnerId String The ID of the Alibaba Cloud account to which the network ACL belongs. None.
IngressAclEntries List The configurations of the inbound rules. Example: [ { "Policy": "accept", "Port": "-1/-1", "SourceCidrIp": "0.0.0.0/0", "Protocol": "all", "NetworkAclEntryId": "nae-bp1mtdn8s4nzcbxnx****" }].
EgressAclEntries List The configurations of the outbound rules. Example: [ { "Policy": "accept", "DestinationCidrIp": "0.0.0.0/0", "Port": "-1/-1", "Protocol": "all", "NetworkAclEntryId": "nae-bp1o3ekt2l6ntgpmr****" }].
Resources List The configurations of the resource that is associated with the network ACL. Example: [ { "Status": "BINDED", "ResourceId": "vsw-bp1mq4dvcnvzbyevo****", "ResourceType": "VSwitch" }].

Examples

JSON format

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "NetworkAclName": {
      "Type": "String",
      "Default": "TT",
      "Description": "The name of the network ACL.\nThe name must be 2 to 128 characters in length, and can contain letters, digits, underscores (_), and hyphens (-). The name must start with a letter but cannot start with http:// or https://."
    }
  },
  "Resources": {
    "ExtensionDataSource": {
      "Type": "DATASOURCE::VPC::NetworkAcls",
      "Properties": {
        "NetworkAclName": {
          "Ref": "NetworkAclName"
        }
      }
    }
  },
  "Outputs": {
    "NetworkAcls": {
      "Description": "The list of The network acls.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "NetworkAcls"
        ]
      }
    },
    "NetworkAclIds": {
      "Description": "The list of The network acl ids.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "NetworkAclIds"
        ]
      }
    }
  }
}