Queries one or more network ACLs in a region.
Make the API call
Request parameters
Parameter | Type | Required? | Example value | Description |
---|---|---|---|---|
Action | String | Yes | DescribeNetworkAcls |
The name of this action. Valid value: DescribeNetworkAcls. |
RegionId | String | Yes | cn-hangzhou |
The region of the network ACL. To query the region ID, call DescribeRegions. |
NetworkAclId | string | No | nacl-bp1lhl0taikrbgnh**** |
The ID of the network ACL. |
NetworkAclName | String | No | acl-1 |
The name of the network ACL. The name must be 2 to 128 characters in length and can contain letters, numbers, periods
(.), underscores (_), and hyphens (-). The name must start with a letter, but cannot
start with |
VpcId | String | No | vpc-123456 |
The ID of the VPC associated with the network ACL. |
ResourceType | String | No | VSwitch |
The type of the associated instance.
|
ResourceId | String | No | vsw-bp1de348lntdwnhbg**** |
The ID of the associated instance.
|
PageNumber | Integer | No | 1 |
The page number. Default value: 1 |
PageSize | Integer | No | 10 |
The number of entries per page for a paged query. Maximum value: 50. Default value: 10. |
Response parameters
Parameter | Type | Example value | Description |
---|---|---|---|
RequestId | String | F7DDDC17-FA06-4AC2-8F35-59D2470FCFC1 |
The ID of the request. |
TotalCount | String | 2 |
The number of total entries. |
PageNumber | String | 1 |
The current page number. |
PageSize | String | 10 |
The number of entries on the current page. |
NetworkAcls | Array |
A list of network ACLs. |
|
NetworkAclId | String | nacl-a2do9e413e0spxscd**** |
The ID of the network ACL. |
RegionId | String | cn-hangzhou |
The region of the network ACL. |
NetworkAclName | String | acl-8 |
The name of the network ACL. |
Description | String | This is my NetworkAcl. |
The description of the network ACL. |
VpcId | String | vpc-a2d33rfpl72k5defr**** |
The ID of the associated VPC. |
CreationTime | String | 2019-04-25 11:44:17 |
The time when the network ACL was created. |
Status | String | Available |
The status of the network ACL.
|
IngressAclEntries | Array |
The inbound rule information. |
|
NetworkAclEntryId | String | nae-a2dk86arlydmezasw**** |
The ID of the inbound rule entry. |
Policy | String | accept |
The authorization policy of the rule. Values:
|
Protocol | String | all |
The transport layer protocol. Valid values:
|
SourceCidrIp | String | 10.0.0.0/24 |
The source IP address range. |
Port | String | -1/-1 |
The source port range. |
EntryType | String | custom |
The rule type. Values:
|
NetworkAclEntryName | String | acl-3 |
The name of the inbound rule. |
Description | String | This is IngressAclEntries. |
The description of the inbound rule. |
EgressAclEntries | Array |
The outbound rule information. |
|
NetworkAclEntryId | String | nae-a2d447uw4tillfvgb**** |
The ID of the outbound rule entry. |
Policy | String | accept |
The authorization policy of the rule. Values:
|
Protocol | String | all |
The transport layer protocol. Valid values:
|
DestinationCidrIp | String | 10.0.0.0/24 |
The destination IP address range. |
Port | String | -1/-1 |
The destination port range. |
EntryType | String | custom |
The rule type. Values:
|
Description | String | This is EgressAclEntries. |
The description of the outbound rule. |
NetworkAclEntryName | String | acl-2 |
The name of the outbound rule. |
Resources | Array |
The associated resources. |
|
ResourceId | String | vsw-bp1de348lntdwcdf**** |
The ID of the associated resource. |
ResourceType | String | VSwitch |
The type of the associated resource. |
Status | String | BINDED |
The status of the associated resource.
|
Examples
Request example
https://vpc.aliyuncs.com/?Action=DescribeNetworkAcls
&RegionId=cn-hangzhou
&<Common request parameters>
Response example
XML
format
<DescribeNetworkAclsResponse>
<PageNumber>1</PageNumber>
<TotalCount>2</TotalCount>
<PageSize>10</PageSize>
<RequestId>F7DDDC17-FA06-4AC2-8F35-59D2470FCFC1</RequestId>
<NetworkAcls>
<NetworkAcl>
<EgressAclEntries>
<EgressAclEntry>
<Port>-1/-1</Port>
<Policy>accept</Policy>
<NetworkAclEntryId>nae-a2d8hqm2ueaeucdvf****</NetworkAclEntryId>
<DestinationCidrIp>10.0.0.0/24</DestinationCidrIp>
<Protocol>all</Protocol>
</EgressAclEntry>
</EgressAclEntries>
<CreationTime>2019-04-25 11:44:17</CreationTime>
<Status>Available</Status>
<RegionId>cn-hangzhou</RegionId>
<IngressAclEntries>
<IngressAclEntry>
<SourceCidrIp>10.0.0.0/24</SourceCidrIp>
<Port>-1/-1</Port>
<Policy>accept</Policy>
<NetworkAclEntryId>nae-a2dv360rgpczdcdvf****</NetworkAclEntryId>
<Protocol>all</Protocol>
</IngressAclEntry>
</IngressAclEntries>
<VpcId>vpc-a2d33rfpl72k5cdvf****</VpcId>
<NetworkAclId>nacl-a2d504869xhaecdvf****</NetworkAclId>
<Resources>
</Resources>
</NetworkAcl>
<NetworkAcl>
<EgressAclEntries>
<EgressAclEntry>
<Port>-1/-1</Port>
<Policy>accept</Policy>
<NetworkAclEntryId>nae-a2d05l0auxh7icdvf****</NetworkAclEntryId>
<DestinationCidrIp>10.0.0.0/24</DestinationCidrIp>
<Protocol>all</Protocol>
</EgressAclEntry>
</EgressAclEntries>
<CreationTime>2019-04-25 11:44:14</CreationTime>
<Status>Available</Status>
<RegionId>cn-hangzhou</RegionId>
<IngressAclEntries>
<IngressAclEntry>
<SourceCidrIp>10.0.0.0/24</SourceCidrIp>
<Port>-1/-1</Port>
<Policy>accept</Policy>
<NetworkAclEntryId>nae-a2dy2eq7mudblcdvf****</NetworkAclEntryId>
<Protocol>all</Protocol>
</IngressAclEntry>
</IngressAclEntries>
<VpcId>vpc-a2d33rfpl72k5cdvf****</VpcId>
<NetworkAclId>nacl-a2detw6o77x7lcdvf****</NetworkAclId>
<Resources>
</Resources>
</NetworkAcl>
</NetworkAcls>
</DescribeNetworkAclsResponse>
JSON
format
{
"PageNumber": 1,
"TotalCount": 2,
"PageSize": 10,
"RequestId": "F7DDDC17-FA06-4AC2-8F35-59D2470FCFC1",
"NetworkAcls": {"NetworkAcl": [
{
"EgressAclEntries": {"EgressAclEntry": [ {
"Port": "-1/-1",
"Policy": "accept",
"NetworkAclEntryId": "nae-a2d8hqm2ueaeucdvf****",
"DestinationCidrIp": "10.0.0.0/24",
"Protocol": "all"
}]},
"CreationTime": "2019-04-25 11:44:17",
"Status": "Available",
"RegionId": "cn-hangzhou",
"IngressAclEntries": {"IngressAclEntry": [ {
"SourceCidrIp": "10.0.0.0/24",
"Port": "-1/-1",
"Policy": "accept",
"NetworkAclEntryId": "nae-a2dv360rgpczdcdvf****",
"Protocol": "all"
}]},
"VpcId": "vpc-a2d33rfpl72k5cdvf****",
"NetworkAclId": "nacl-a2d504869xhaecdvf****",
"Resources": {"Resource": []}
},
{
"EgressAclEntries": {"EgressAclEntry": [ {
"Port": "-1/-1",
"Policy": "accept",
"NetworkAclEntryId": "nae-a2d05l0auxh7icdvf****",
"DestinationCidrIp": "10.0.0.0/24",
"Protocol": "all"
}]},
"CreationTime": "2019-04-25 11:44:14",
"Status": "Available",
"RegionId": "cn-hangzhou",
"IngressAclEntries": {"IngressAclEntry": [ {
"SourceCidrIp": "10.0.0.0/24",
"Port": "-1/-1",
"Policy": "accept",
"NetworkAclEntryId": "nae-a2dy2eq7mudblcdvf****",
"Protocol": "all"
}]},
"VpcId": "vpc-a2d33rfpl72k5cdvf****",
"NetworkAclId": "nacl-a2detw6o77x7lcdvf****",
"Resources": {"Resource": []}
}
]}
}
Errors
HTTP status code | Error code | Error message | Description |
---|---|---|---|
500 | InternalError | The request processing has failed due to some unknown error. | The request failed to be processed due to unknown errors. |
For a list of error codes, visit the API Error Center.