Updates one or more rules of a network ACL.

Make the API call

You can use OpenAPI Explorer to make API calls, search for API calls, perform debugging, and generate SDK example code.

Request parameters

Parameter Type Required? Example value Description
Action String  Yes UpdateNetworkAclEntries

The name of this action. Valid value: UpdateNetworkAclEntries.

NetworkAclId String  Yes nacl-bp1lhl0taikrzxsc****

The ID of the network ACL.

RegionId String  Yes cn-hangzhou

The region of the network ACL. To query the region ID, call DescribeRegions.

IngressAclEntries.N.NetworkAclEntryName String No acl-3

The name of the inbound rule entry.

IngressAclEntries.N.NetworkAclEntryId String No nae-2zepn32de59j8m4****

The ID of the inbound rule entry.

IngressAclEntries.N.Policy String No accept

The authorization policy of the rule. Values:

  • accept: Allow the specified traffic.
  • drop: Deny the specified traffic.
IngressAclEntries.N.Protocol String No all

The transport layer protocol. Valid values:

  • ICMP
  • GRE
  • TCP
  • UDP
  • all: All protocols are supported.
IngressAclEntries.N.SourceCidrIp String No 10.0.0.0/24

The source IP address range.

IngressAclEntries.N.Port String No -1/-1

The source port range.

IngressAclEntries.N.EntryType String No custom

The rule type. Values:

  • custom (default): Custom rule.
  • system: System rule.
IngressAclEntries.N.Description String No This is IngressAclEntries.

The description of the inbound rule.

EgressAclEntries.N.NetworkAclEntryName String No acl-2

The name of the outbound rule.

EgressAclEntries.N.NetworkAclEntryId String No nae-2zecs97e0brcge46****

The ID of the outbound rule entry.

EgressAclEntries.N.Policy String No accept

The authorization policy of the rule. Values:

  • accept: Allow the specified traffic.
  • drop: Deny the specified traffic.
EgressAclEntries.N.Protocol String No all

The transport layer protocol. Valid values:

  • ICMP
  • GRE
  • TCP
  • UDP
  • all: All protocols are supported.
EgressAclEntries.N.DestinationCidrIp String No 10.0.0.0/24

The destination IP address range.

EgressAclEntries.N.Port String No -1/-1

The destination port range.

EgressAclEntries.N.EntryType String No custom

The rule type. Valid values:

  • custom (default): Custom rule.
  • system: System rule.
EgressAclEntries.N.Description String No This is EgressAclEntries.

The description of the outbound rule.

UpdateIngressAclEntries Boolean No false

Indicates whether to update the inbound rule. Valid values:

  • true: Update.
  • false (default): Do not update.
UpdateEgressAclEntries Boolean No false

Indicates whether to update the outbound rule. Valid values:

  • true: Update.
  • false (default): Do not update.
ClientToken String No 0c593ea1-3bea-11e9-b96b-88e9fe637760

The client token that guarantees the idempotence of the request. The value of this parameter is generated by the client and is unique among different requests. Only ASCII characters are allowed. It can contain a maximum of 64 ASCII characters.

Response parameters

Parameter Type Example value Description
RequestId String 1170A5A0-E760-4331-9133-A7D38D973215

The ID of the request.

Examples

Request example

http(s)://vpc.aliyuncs.com/? Action=UpdateNetworkAclEntries
&NetworkAclId=nacl-bp1lhl0taikrzxsc****
&RegionId=cn-hangzhou
&<Common request parameters>

Response example

XML format

<UpdateNetworkAclEntriesResponse>
     <RequestId>1170A5A0-E760-4331-9133-A7D38D973215</RequestId>
</UpdateNetworkAclEntriesResponse>

JSON format

{
    "RequestId": "1170A5A0-E760-4331-9133-A7D38D973215"
}

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.