You can invoke the CreateNetworkAclEntry API to create a network ACL rule.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ens:CreateNetworkAclEntry |
create |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| NetworkAclId |
string |
Yes |
The ID of the network ACL. |
nacl-bp1lhl0taikrbgnh**** |
| NetworkAclEntryName |
string |
No |
The name of the rule. The name must be 1 to 128 characters in length and cannot start with http:// or https://. |
acl-1 |
| Description |
string |
No |
The description of the network ACL. The description must be 1 to 256 characters in length and cannot start with http:// or https://. |
This is my NetworkAcl. |
| Direction |
string |
Yes |
The direction in which the rule is applied. Valid values:
|
ingress |
| Policy |
string |
Yes |
The action that is performed on network traffic that matches the rule. Valid values:
|
accept |
| CidrBlock |
string |
Yes |
The source CIDR block. |
10.0.0.0/24 |
| Protocol |
string |
Yes |
The type of the protocol. Valid values:
|
all |
| PortRange |
string |
Yes |
The port range.
|
-1/-1 |
| Priority |
integer |
Yes |
The priority of the rule. Valid values: 1 to 100. Default value: 1. |
1 |
| DestinationCidrBlock |
string |
No |
The destination network. |
10.130.220.0/24 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| RequestId |
string |
The ID of the request. |
CEF72CEB-54B6-4AE8-B225-F876FF7BA984 |
| NetworkAclEntryId |
string |
The ID of the network ACL. |
nae-5**** |
Examples
Success response
JSON format
{
"RequestId": "CEF72CEB-54B6-4AE8-B225-F876FF7BA984",
"NetworkAclEntryId": "nae-5****"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | Invalid%s | The specified parameter %s is invalid. | |
| 400 | Missing%s | You must specify the parameter %s. | |
| 400 | InvalidParam.DuplicateRule | This rule already exists | |
| 400 | RuleLimitExceed | The maximum number of network acl rule is reached. | |
| 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.