Modifies a specified Destination Network Address Translation (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 state 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.
Debugging
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 ID of the region where the NAT gateway is deployed. You can call the DescribeRegions operation to query region IDs. |
ExternalIp | String | No | 116.xx.xx.28 |
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.xx.xx.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 forwarding protocol. Valid values:
|
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. Check whether the region ID is valid. |
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 external port is invalid. |
400 | InvalidInternalPort.Malformed | The specified InternalPort is not a valid port. | The error message returned because the specified internal port is invalid. |
400 | Forbidden.DestnationIpOutOfVpcCIDR | The specified Destination Ip is Out of VPC CIDR. | The error message returned because the private IP address is not within the CIDR block of the virtual private cloud (VPC). Enter a private IP address that belongs to the CIDR block of the VPC. |
400 | InvalidProtocal.ValueNotSupported | The specified IpProtocol does not support. | The error message returned because the specified protocol type is not supported. |
400 | IncorretForwardEntryStatus | Some Forward entry status blocked this operation.. | The error message returned because you are not authorized to perform the specified operation. The error message returned 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 error message returned because you can add no more than 48 custom routes to a route table. You can submit a ticket to increase the quota. |
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 used in a SNAT entry. Select a different IP address or delete the SNAT rule that uses the public IP address. |
400 | Forbidden.Already.Bounded | The specified instance already bounded | The error message returned because the specified instance has been associated with another DNAT entry. |
For a list of error codes, visit the API Error Center.