Modifies a DNAT entry.

Note If any DNAT entry in the DNAT table is in the Pending or Modifying state, you cannot modify any DNAT entries.

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 ModifyForwardEntry

The name of this action.

Value: ModifyForwardEntry

ForwardEntryId String Yes fwd-8vbn3bc8roygjp0gy3xk7

The ID of the DNAT entry to be modified.

ForwardTableId String Yes ftb-8vbx8xu2lqj9qb334h0ow

The ID of the DNAT table.

RegionId String Yes cn-hangzhou

The ID of the region to which the NAT Gateway belongs. To query the region ID, call DescribeRegions.

ExternalIp String No

The public IP address.

ExternalPort String No 80

The public port. Value range: 1 to 65535

InternalIp String No

The destination private IP address.

InternalPort String No 80

The destination private port. Value range: 1 to 65535

IpProtocol String No TCP

The protocol type. Valid values:

  • TCP: Forward TCP packets.
  • UDP: Forward UDP packets.
  • Any: Forward all packets.

Response parameters

Parameter Type Example value Description
RequestId String 24CC85DC-7700-4F09-9624-99E988C7DD03

The ID of the request.


Request example
&RegionId= cn-hangzhou

Response example

XML format


JSON format



HTTP status code Error code Error message Description
404 InvalidRegionId.NotFound The specified RegionId does not exist in our records. The specified region ID does not exist.
400 InvalidExternalIp.Malformed The specified ExternalIp is not a valid IP address. The specified public IP address is invalid.
400 InvalidInternalIp.Malformed The specified InternalIp is not a valid IP address. The specified destination private IP address is invalid.
400 InvalidExternalPort.Malformed The specified ExternalPort is not a valid port. The specified public port is invalid.
400 InvalidInternalPort.Malformed The specified InternalPort is not a valid port. The specified private port is invalid.
400 Forbidden.DestnationIpOutOfVpcCIDR The specified Destination Ip is Out of VPC CIDR. The specified private IP address is not in the CIDR block of the VPC.
400 InvalidProtocal.ValueNotSupported The specified IpProtocol does not support. The specified protocol type is not supported.
400 IncorretForwardEntryStatus Some Forward entry status blocked this operation. You cannot perform this operation because one or more DNAT entries in the DNAT table are in the Pending or Modifying state.
400 QuotaExceeded Forward entry quota exceeded in this route table. The quota for custom route entries in the route table has been reached. To increase the quota, open a ticket.
404 InvalidForwardEntryId.NotFound Specified forward entry ID does not exist The specified DNAT entry does not exist.
404 InvalidExternalIp.NotFound Specified External Ip address does not found on the VRouter The specified public IP address does not exist.
404 InvalidForwardTableId.NotFound Specified forward table does not exist. The specified DNAT table does not exist.
400 Forbidden.ExternalIp.UsedInSnatTable The specified ExternalIp is already used in SnatTable This specified public IP address is being used by an SNAT rule. Select a different IP address or delete the SNAT rule that uses this IP address.
400 Forbidden.Already.Bounded The specified instance already bounded The specified instance is already associated.

For a list of error codes, visit the API Error Center.