All Products
Search
Document Center

Virtual Private Cloud:DescribeNetworkAclAttributes

Last Updated:Mar 22, 2024

Queries network access control lists (ACLs).

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
vpc:DescribeNetworkAclAttributesRead
  • NetworkAcl
    acs:vpc:{#regionId}:{#accountId}:networkacl/{#NetworkAclId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
NetworkAclIdstringYes

The ID of the network ACL.

nacl-a2do9e413e0spzasx****
RegionIdstringYes

The region ID of the network ACL.

You can call the DescribeRegions operation to query the most recent region list.

cn-hangzhou
ClientTokenstringNo

The client token that is used to ensure the idempotence of the request.

You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters.

Note If you do not specify this parameter, the system automatically uses the request ID as the client token. The request ID may be different for each request.
123e4567-e89b-12d3-a456-426655440000

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The request ID.

F5905F9C-0161-4E72-9CB1-1F3F3CF6268A
NetworkAclAttributeobject

The details of the network ACLs.

Statusstring

The association status of the resource. Valid values:

  • Available
  • Modifying
Available
VpcIdstring

The ID of the VPC to which the network ACL belongs.

vpc-a2d33rfpl72k5defr****
CreationTimestring

The time when the network ACL was created.

2021-12-25 11:33:27
Descriptionstring

The description of the network ACL.

This is my NetworkAcl.
NetworkAclNamestring

The name of the network ACL.

acl-1
NetworkAclIdstring

The ID of the network ACL.

nacl-a2do9e413e0spnhmj****
OwnerIdlong

The ID of the Alibaba Cloud account to which the network ACL belongs.

253460731706911258
RegionIdstring

The region ID of the network ACL.

cn-hangzhou
IngressAclEntriesobject []

The information about the inbound rules of the network ACL.

NetworkAclEntryIdstring

The ID of the inbound rule.

nae-a2dk86arlydmevfbg****
EntryTypestring

The type of the inbound rule.

  • custom

  • system

custom
NetworkAclEntryNamestring

The name of the inbound rule.

acl-3
Policystring

The action to be performed on network traffic that matches the rule. Valid values:

  • accept
  • drop
accept
Descriptionstring

The description of the inbound rule.

This is IngressAclEntries.
SourceCidrIpstring

The source CIDR block.

10.0.0.0/24
IpVersionstring

The IP version. Valid values:

  • IPv4
  • IPv6
IPv4
Protocolstring

The protocol type. Valid values:

  • icmp
  • gre
  • tcp
  • udp
  • all
all
Portstring

The destination port range of the inbound traffic.

  • If the protocol of the inbound rule is set to all, icmp, or gre, the port range is -1/-1, which specifies all ports.
  • If the protocol of the inbound rule is set to tcp or udp, set the port range in the following format: 1/200 or 80/80, which specifies port 1 to port 200 or port 80. Valid ports: 1 to 65535.
-1/-1
EgressAclEntriesobject []

The information about the outbound rules of the network ACL.

NetworkAclEntryIdstring

The ID of the outbound rule.

nae-a2d447uw4tillxdcv****
EntryTypestring

The type of the inbound rule.

  • custom

  • system

custom
NetworkAclEntryNamestring

The name of the outbound rule.

acl-2
Policystring

The action to be performed on network traffic that matches the rule. Valid values:

  • accept
  • drop
accept
Descriptionstring

The description of the outbound rule.

This is EgressAclEntries.
Protocolstring

The protocol type. Valid values:

  • icmp
  • gre
  • tcp
  • udp
  • all
all
DestinationCidrIpstring

The destination CIDR block.

10.0.0.0/24
IpVersionstring

The IP version. Valid values:

  • IPv4
  • IPv6
IPv4
Portstring

The destination port range of the outbound traffic.

  • If the protocol of the outbound rule is set to all, icmp, or gre, the port range is -1/-1, which specified all ports.
  • If the protocol of the outbound rule is set to tcp or udp, set the port range in the following format: 1/200 or 80/80, which specifies port 1 to port 200 or port 80. Valid values for a port: 1 to 65535.
-1/-1
Resourcesobject []

The resources that are associated with the network ACL.

Statusstring

The association status of the resource. Valid values:

  • BINDED
  • BINDING
  • UNBINDING
BINDED
ResourceTypestring

The type of resource with which you want to associate the network ACL. The value is set to VSwitch.

VSwitch
ResourceIdstring

The ID of the associated resource.

vsw-bp1de348lntdwxscd****
Tagsobject []

The information about the tags.

Keystring

The key of tag N added to the resource.

FinanceDept
Valuestring

The value of tag N added to the resource.

FinanceJoshua

Examples

Sample success responses

JSONformat

{
  "RequestId": "F5905F9C-0161-4E72-9CB1-1F3F3CF6268A",
  "NetworkAclAttribute": {
    "Status": "Available",
    "VpcId": "vpc-a2d33rfpl72k5defr****",
    "CreationTime": "2021-12-25 11:33:27",
    "Description": "This is my NetworkAcl.",
    "NetworkAclName": "acl-1",
    "NetworkAclId": "nacl-a2do9e413e0spnhmj****",
    "OwnerId": 253460731706911260,
    "RegionId": "cn-hangzhou",
    "IngressAclEntries": {
      "IngressAclEntry": [
        {
          "NetworkAclEntryId": "nae-a2dk86arlydmevfbg****",
          "EntryType": "custom",
          "NetworkAclEntryName": "acl-3",
          "Policy": "accept",
          "Description": "This is IngressAclEntries.",
          "SourceCidrIp": "10.0.0.0/24",
          "IpVersion": "IPv4",
          "Protocol": "all",
          "Port": "-1/-1"
        }
      ]
    },
    "EgressAclEntries": {
      "EgressAclEntry": [
        {
          "NetworkAclEntryId": "nae-a2d447uw4tillxdcv****",
          "EntryType": "custom",
          "NetworkAclEntryName": "acl-2",
          "Policy": "accept",
          "Description": "This is EgressAclEntries.",
          "Protocol": "all",
          "DestinationCidrIp": "10.0.0.0/24",
          "IpVersion": "IPv4",
          "Port": "-1/-1"
        }
      ]
    },
    "Resources": {
      "Resource": [
        {
          "Status": "BINDED",
          "ResourceType": "VSwitch",
          "ResourceId": "vsw-bp1de348lntdwxscd****"
        }
      ]
    },
    "Tags": {
      "Tag": [
        {
          "Key": "FinanceDept",
          "Value": "FinanceJoshua"
        }
      ]
    }
  }
}

Error codes

HTTP status codeError codeError messageDescription
400ParameterMissing.AliUidParameterMissing.AliUid-
400ParameterMissing.BidParameterMissing.Bid-
400ParameterMissing.RegionIdParameterMissing.RegionId-
400ParameterEmpty.RegionIdParameterEmpty.RegionId-
400ParameterMissing.NetworkAclIdParameterMissing.NetworkAclId-
400ParameterEmpty.NetworkAclIdParameterEmpty.NetworkAclId-
400InvalidNetworkAcl.NotFoundThe special Network Acl is not found.The network ACL is not found.
400NotSupport.NetworkAclNetwork acl is not support now.-
500InternalErrorThe request processing has failed due to some unknown error.An unknown error occurred.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2023-11-24The Error code has changed. The response structure of the API has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 400
    delete Error Codes: 500
Output ParametersThe response structure of the API has changed.