You can invoke the DescribeNetworkAcls API to query created network ACLs.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ens:DescribeNetworkAcls |
list |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| NetworkAclId |
string |
No |
The ID of the network ACL. |
nacl-bp1lhl0taikrbgnh**** |
| NetworkAclName |
string |
No |
The name of the network ACL. |
acl-1 |
| ResourceId |
string |
No |
The ID of the associated instance. |
n-5**** |
| PageNumber |
string |
No |
The page number. Pages start from page 1. Default value: 1. |
1 |
| PageSize |
string |
No |
The number of entries per page. Maximum value: 50. Default value: 10. |
10 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| RequestId |
string |
The ID of the request. |
A1707FC0-430C-423A-B624-284046B20399 |
| TotalCount |
string |
The total number of entries returned. |
3 |
| PageSize |
string |
The number of entries per page. |
2 |
| PageNumber |
string |
The page number. |
1 |
| NetworkAcls |
array<object> |
Details of the network ACLs. |
|
|
array<object> |
|||
| Status |
string |
The status of the network ACL. Valid values:
|
Available |
| CreationTime |
string |
The time when the network ACL was created. The time follows the ISO 8601 standard in the |
2019-11-01T06:08:46Z |
| Description |
string |
The description of the network ACL. |
This is my NetworkAcl. |
| NetworkAclId |
string |
The ID of the network ACL. |
nacl-a2do9e413e0spxscd**** |
| NetworkAclName |
string |
The name of the network ACL. |
acl-8 |
| IngressAclEntries |
array<object> |
Details of the inbound rules. |
|
|
object |
|||
| Policy |
string |
The action that is performed on network traffic that matches the rule. Valid values:
|
accept |
| NetworkAclEntryId |
string |
The ID of the inbound rule. |
nae-5dk86arlydmezasw**** |
| NetworkAclEntryName |
string |
The name of the inbound rule. |
acl-3 |
| CidrBlock |
string |
The source CIDR block. |
10.0.0.0/24 |
| Protocol |
string |
The protocol type. Valid values:
|
all |
| PortRange |
string |
The destination port range of the inbound rule.
|
-1/-1 |
| Priority |
integer |
The priority of the rule. Valid values: 1 to 100. Default value: 1. |
1 |
| Type |
string |
The type of the rule. Valid values:
|
system |
| Description |
string |
The description of the inbound rule. |
This is IngressAclEntries. |
| DestinationCidrBlock |
string |
The destination network. |
10.0.0.0/24 |
| EgressAclEntries |
array<object> |
Details of the outbound rules. |
|
|
object |
|||
| Policy |
string |
The action that is performed on network traffic that matches the rule. Valid values:
|
accept |
| NetworkAclEntryId |
string |
The ID of the outbound rule. |
nae-a2d447uw4tillfvgb**** |
| NetworkAclEntryName |
string |
The name of the outbound rule. |
acl-2 |
| CidrBlock |
string |
The destination CIDR block. |
10.0.0.0/24 |
| Protocol |
string |
The protocol type. Valid values:
|
all |
| PortRange |
string |
The destination port range of the outbound rule.
|
-1/-1 |
| Priority |
integer |
The priority of the rule. Valid values: 1 to 100. Default value: 1. |
1 |
| Type |
string |
The type of the rule. Valid values:
|
system |
| Description |
string |
The description of the outbound rule. |
This is EgressAclEntries. |
| Resources |
array<object> |
Details of the associated resources. |
|
|
object |
|||
| Status |
string |
The association status of the resource. Valid values:
|
BINDING |
| ResourceType |
string |
The type of the associated resource. |
Network |
| ResourceId |
string |
The ID of the associated resource. |
n-**** |
| EnsRegionId |
string |
The ID of the edge node. |
cn-fuzhou-telecom |
Examples
Success response
JSON format
{
"RequestId": "A1707FC0-430C-423A-B624-284046B20399",
"TotalCount": "3",
"PageSize": "2",
"PageNumber": "1",
"NetworkAcls": [
{
"Status": "Available",
"CreationTime": "2019-11-01T06:08:46Z",
"Description": "This is my NetworkAcl.",
"NetworkAclId": "nacl-a2do9e413e0spxscd****",
"NetworkAclName": "acl-8",
"IngressAclEntries": [
{
"Policy": "accept",
"NetworkAclEntryId": "nae-5dk86arlydmezasw****",
"NetworkAclEntryName": "acl-3",
"CidrBlock": "10.0.0.0/24",
"Protocol": "all",
"PortRange": "-1/-1",
"Priority": 1,
"Type": "system",
"Description": "This is IngressAclEntries.",
"DestinationCidrBlock": "10.0.0.0/24"
}
],
"EgressAclEntries": [
{
"Policy": "accept",
"NetworkAclEntryId": "nae-a2d447uw4tillfvgb****",
"NetworkAclEntryName": "acl-2",
"CidrBlock": "10.0.0.0/24",
"Protocol": "all",
"PortRange": "-1/-1",
"Priority": 1,
"Type": "system",
"Description": "This is EgressAclEntries."
}
],
"Resources": [
{
"Status": "BINDING",
"ResourceType": "Network",
"ResourceId": "n-****",
"EnsRegionId": "cn-fuzhou-telecom"
}
]
}
]
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | NoPermission | Permission denied. | |
| 400 | ens.interface.error | Failed to call API. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.