Modifies a specified DNAT entry.

Description

ModifyForwardEntry is an asynchronous operation. After you make a request, the request ID is returned but the specified DNAT entry is not modified. The system modifies the DNAT entry in the background. You can call the DescribeNatGateways operation to query the status of the DNAT entry. The DNAT entry may be in the one of the following states:

  • Pending: indicates that the system is modifying the DNAT entry. You can only query the DNAT entry, but cannot perform other operations.
  • Available: indicates that the DNAT entry is modified.
Note If a DNAT table has DNAT entries in the Pending state, you cannot modify DNAT entries in the DNAT table.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes ModifyForwardEntry

The operation that you want to perform. Set the value to ModifyForwardEntry.

ForwardEntryId String Yes fwd-8vbn3bc8roygjp0gy****

The ID of the DNAT entry.

ForwardTableId String Yes ftb-8vbx8xu2lqj9qb334****

The ID of the DNAT table to which the DNAT entry belongs.

RegionId String Yes cn-hangzhou

The region ID of the NAT gateway to which the DNAT table belongs. You can call the DescribeRegions operation to query the most recent region list.

ExternalIp String No 116.85.XX.XX

The public IP address in the DNAT entry. The public IP address is used by the Elastic Compute Service (ECS) instance to access the Internet.

ExternalPort String No 80

The external port in the DNAT entry.The external port is used by the ECS instance to receive requests from the Internet. Valid values: 1 to 65535.

InternalIp String No 10.0.0.78

The private IP address that is mapped to the public IP address in the DNAT entry.

InternalPort String No 80

The internal port that is mapped to the external port in the DNAT entry. Valid values: 1 to 65535.

IpProtocol String No TCP

The protocol. Valid values:

  • TCP: The NAT gateway forwards TCP packets.
  • UDP: The NAT gateway forwards UDP packets.
  • Any: The NAT gateway forwards packets of all protocols.

Response parameters

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

The ID of the request.

Examples

Sample requests

https://vpc.aliyuncs.com/?Action=ModifyForwardEntry
&ForwardEntryId=fwd-8vbn3bc8roygjp0gy****
&ForwardTableId=ftb-8vbx8xu2lqj9qb334****
&RegionId= cn-hangzhou
&<Common request parameters>

Sample success responses

XML format

<ModifyForwardEntryResponse>
	  <RequestId>2315DEB7-5E92-423A-91F7-4C1EC9AD97C3</RequestId>
</ModifyForwardEntryResponse>

JSON format

{
    "RequestId": "2315DEB7-5E92-423A-91F7-4C1EC9AD97C3"
}

Error codes

HttpCode Error code Error message Description
404 InvalidRegionId.NotFound The specified RegionId does not exist in our records. The error message returned because the specified region ID does not exist.
400 InvalidExternalIp.Malformed The specified ExternalIp is not a valid IP address. The error message returned because the specified public IP address is invalid.
400 InvalidInternalIp.Malformed The specified InternalIp is not a valid IP address. The error message returned because the specified private IP address is invalid.
400 InvalidExternalPort.Malformed The specified ExternalPort is not a valid port. The error message returned because the specified public port is invalid.
400 InvalidInternalPort.Malformed The specified InternalPort is not a valid port. The error message returned because the specified private port is invalid.
400 Forbidden.DestnationIpOutOfVpcCIDR The specified Destination Ip is Out of VPC CIDR. The error message returned because the specified private IP address does not fall within the CIDR block of the virtual private cloud (VPC). Enter a private IP address that falls within the CIDR block of the VPC.
400 InvalidProtocal.ValueNotSupported The specified IpProtocol does not support. The error message returned because the specified protocol is not supported.
400 IncorretForwardEntryStatus Some Forward entry status blocked this operation.. The error message returned because the operation cannot be performed. 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 error message returned because the number of custom route entries in the same route table cannot exceed 200. Go to the Quota Management page to request a quota increase.
404 InvalidForwardEntryId.NotFound Specified forward entry ID does not exist The error message returned because the specified DNAT entry does not exist.
404 InvalidExternalIp.NotFound Specified External Ip address does not found on the VRouter The error message returned because the specified public IP address does not exist.
404 InvalidForwardTableId.NotFound Specified forward table does not exist. The error message returned because the specified DNAT table does not exist. Verify the parameter and try again.
400 Forbidden.ExternalIp.UsedInSnatTable The specified ExternalIp is already used in SnatTable The error message returned because the specified public IP address is already used by an SNAT entry. Select a different IP address or delete the SNAT entry.
400 Forbidden.Already.Bounded The specified instance already bounded The error message returned because the specified instance is associated with another DNAT entry.

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