DescribeNetworkAcls#

Description#

Describes one or more of your network ACLs. It is possible to use one or more filters.

Request Parameters#

  • Filter.N — One or more filters.

    • Type: Filter object

    • Required: No

  • NetworkAclId.N — The IDs of the Network ACLs. If the parameter isn’t specified, list of all available Network ACLs is returned.

    • Type: Array of strings

    • Required: No

Supported Filters#

  • association.association-id — The ID of the association of the network ACL and the subnet.

  • association.subnet-id — The ID of the subnet that is associated with the ACL.

  • entry.cidr — The IPv4 address range in CIDR notation.

  • entry.egress — Indicates whether the rule is an outbound rule. If the parameter is not specified, all rules are returned.

  • entry.port-range.from — The start of the port range to which the rule applies. For TCP and UDP only.

  • entry.port-range.to — The end of the port range to which the rule applies. For TCP and UDP only.

  • entry.icmp.code — The ICMP message type.

  • entry.icmp.type — The ICMP message code.

  • entry.protocol — The protocol. The value -1 denotes all protocols.

  • entry.rule-action — Indicates whether to allow or deny the traffic that matches the rule (allow | deny).

  • entry.rule-number — The rule number.

  • default — The default network ACL.

  • network-acl-id — The ID of the network ACL.

  • tag-key — The tag key. Such a filter allows you to get resources with the specified key and any value.

  • tag:<tag-key> — The key/value a pair of a tag. The tag key is passed in the filter name, while the tag value is used as the filter value.

  • vpc-id — The ID of the VPC.

Response Elements#

  • networkAclSet — Information about one or more network ACLs.

  • requestId — The request ID.

    • Type: String

Examples#

c2-ec2 DescribeNetworkAcls
c2-ec2 DescribeNetworkAcls NetworkAclId.1 <network_acl_id_1> NetworkAclId.2 <network_acl_id_2>
c2-ec2 DescribeNetworkAcls Filter.1.Name vpc-id Filter.1.Value <vpc_id>\
                           Filter.2.Name association.association-id\
                           Filter.2.Value <association-id>
c2-ec2 DescribeNetworkAcls NetworkAclId.1 <network_acl_id>\
                           Filter.1.Name vpc-id Filter.1.Value <vpc_id>

c2-ec2 DescribeNetworkAcls Filter.1.Name tag:<tag-key> Filter.1.Value <tag-value>

c2-ec2 DescribeNetworkAcls Filter.1.Name tag-key Filter.1.Value <tag-key>