Modifies a DNAT entry.
Operation description
-
ModifyForwardEntry is an asynchronous operation. After a request is sent, the system returns a request ID and runs the task in the background. You can call the DescribeForwardTableEntries operation to query the status of the task.
- 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.
-
You cannot repeatedly call the ModifyForwardEntry operation to modify a DNAT entry within the specified period of time.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
vpc:ModifyForwardEntry | update | *ForwardTable acs:vpc:{#regionId}:{#accountId}:forwardtable/{#ForwardTableId} |
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
ForwardTableId | string | Yes | The ID of the DNAT table to which the DNAT entry belongs. | ftb-8vbx8xu2lqj9qb334**** |
ForwardEntryId | string | Yes | The ID of the DNAT entry. | fwd-8vbn3bc8roygjp0gy**** |
ExternalIp | string | No |
| 116.85.XX.XX |
ExternalPort | string | No |
| 80 |
InternalIp | string | No |
| 10.0.0.78 |
InternalPort | string | No |
| 80 |
IpProtocol | string | No | The protocol. Valid values:
| TCP |
ForwardEntryName | string | No | The new name of the DNAT entry. The name must be 2 to 128 characters in length. It must start with a letter but cannot start with | test |
RegionId | string | Yes | The region ID of the NAT gateway. You can call the DescribeRegions operation to query the most recent region list. | cn-hangzhou |
ClientToken | string | No | The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The client token can contain only ASCII characters. Note
If you do not specify this parameter, the system automatically uses the request ID as the client token. The request ID may be different for each request.
| 123e4567-e89b-12d3-a456-426655440000 |
PortBreak | boolean | No | Specifies whether to remove limits on the port range. Valid values:
| false |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "2315DEB7-5E92-423A-91F7-4C1EC9AD97C3"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | UnsupportedFeature.PortSegment | The feature of PortSegment is not supported. | - |
400 | ExclusiveParam.%sAnd%s | The param of %s and %s are mutually exclusive. | You cannot specify %s and %s at the same time. |
400 | InvalidIp.NotInNatgw | The specified Ip not belong to natgateway. | The specified EIP is not associated with the NAT gateway. |
400 | DuplicatedParam.InternalPort | The param of %s is duplicated. | Duplicate or occupied InternalPort parameter |
400 | DuplicatedParam.ExternalPort | The param of %s is duplicated. | Duplicate parameters are specified for %s. |
400 | OperationFailed.AnyPortConfig | Operation failed because any port correspondence any protocol | The operation failed. There is a conflict with another entry, any port or any protocol type. |
400 | OperationUnsupported.ForwardEntry | Duplicated destination ip port is unsupported. | You cannot specify duplicate destination IP addresses or destination ports. |
400 | IncorrectStatus.NatIp | The status of %s [%s] is incorrect. | The status of NatIp is incorrect. |
400 | Forbidden.IpHasBeenUsedInSnat | The source ip can't be used. Because it has been used in snat. | - |
400 | IncorrectStatus.ForwardEntry | The status of %s [%s] is incorrect. | The DNAT entry to be deleted is in an invalid state. |
400 | InvalidExternalIp.Malformed | The specified ExternalIp is not a valid IP address. | The specified EIP 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 does not fall within the CIDR block of the VPC. Enter a private IP address that falls within the CIDR block of the VPC. |
400 | Forbidden.DestinationIpOutOfVswitchCIDR | The specified Internal Ip is Out of VSwitch CIDR. | - |
400 | InvalidProtocal.ValueNotSupported | The specified IpProtocol does not support. | The specified protocol is not supported. |
400 | IncorretForwardEntryStatus | Some Forward entry status blocked this operation.. | The operation is not supported 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. | A route table can only have 200 custom route entries at most. |
400 | ForwardEntry.Duplicated | The specified ExternalIp, IpProtocol, ExternalPort,InternalIp, InternalPort is duplicated | - |
400 | Forbidden.ExternalIp.UsedInSnatTable | The specified ExternalIp is already used in SnatTable | The specified EIP is already used by an SNAT entry. Select a different EIP or delete the SNAT entry. |
400 | Forbidden.Already.Bounded | The specified instance already bounded | The specified instance is associated. |
400 | InvalidIp.NotFound | The specified ip does not exist. | - |
400 | InvalidParameter.Name.Malformed | The specified Name is not valid. | The specified name format is invalid. Enter the name in the valid format. |
400 | IncorretForwardEntryStatus | The Specified forwardEntry is not stable status, can not operation | - |
400 | IncorretStatus.ForwardEntry | The Specified forwardEntry is not stable status, can not operation | - |
400 | IllegalParam.AnyPortNotZero | Any port port must be zero. | You must set the destination port and source port to 0 when IpProtocol is set to Any. |
400 | Duplicated.DestinationPort | The specified param DestinationPort is duplicated. | - |
400 | InvalidForwardEntryId.NotFound | Specified forward entry ID does not exist | The specified DNAT entry does not exist. |
400 | OperationUnsupported.EipInBinding | Create snat entry with eip in associating status is unsupported. | You cannot use an associated EIP when you create an SNAT entry. |
400 | QuotaExceeded.ForwardEntrySessionManytoOne | The dnat session quota is exceed. | The number of DNAT sessions exceeds the upper limit. |
404 | ResourceNotFound.NatIp | The specified resource of %s is not found. | The specified NatIp parameter is not found. |
404 | ResourceNotFound.ForwardEntry | The specified resource of %s is not found. | The specified %s resource does not exist. |
404 | InvalidRegionId.NotFound | The specified RegionId does not exist in our records. | The specified region ID does not exist. |
404 | InvalidExternalIp.NotFound | Specified External Ip address does not found on the VRouter | The specified EIP does not exist. |
404 | InvalidForwardTableId.NotFound | Specified forward table does not exist. | The specified DNAT table does not exist. Check the parameter and try again. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-10-23 | The Error code has changed | View Change Details |
2023-03-01 | The Error code has changed | View Change Details |