Modifies an SNAT entry.
Operation description
ModifySnatEntry 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 DescribeSnatTableEntries operation to query the status of the task.
- Pending: indicates that the system is modifying the SNAT entry. You can only query the status of the SNAT entry, but cannot perform other operations.
- Available: indicates that the SNAT entry is modified.
You cannot repeatedly call the ModifySnatEntry operation to modify an SNAT entry within a specific 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:ModifySnatEntry | update | *SnatTable acs:vpc:{#regionId}:{#accountId}:snattable/{#SnatTableId} |
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
RegionId | string | Yes | The region ID of the NAT gateway. You can call the DescribeRegions operation to obtain the region ID. | cn-hangzhou |
SnatTableId | string | Yes | The ID of the SNAT table to which the SNAT entry belongs. | stb-8vbczigrhop8x5u3t**** |
SnatEntryId | string | Yes | The ID of the SNAT entry that you want to modify. | snat-bp1vcgcf8tm0plqcg**** |
SnatIp | string | No |
| 47.98.XX.XX |
SnatEntryName | string | No | The name of the SNAT entry. The name must be 2 to 128 characters in length. It must start with a letter but cannot start with | SnatEntry-1 |
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.
| 02fb3da4-130e-11e9-8e44-001**** |
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 | InvalidSnatIp.Malformed | The specified SnatIp is not a valid IP address. | The specified EIP is invalid. |
400 | Forbidden.SourceVSwitchId.Duplicated | The specified SourceCIDRis duplicated. | An SNAT entry is already created for the specified vSwitch. |
400 | Forbidden.IpUsedInForwardTable | The specified SnatIp already used in forward table | The specified EIP is already used by a DNAT entry. Select another EIP or delete the DNAT rule that uses the specified EIP. |
400 | OperationUnsupported.EipForSnatPool | The Eip cannot support snat pool | - |
400 | InvalidParameter.Name.Malformed | The specified Name is not valid. | The specified name format is invalid. Enter the name in the valid format. |
400 | IncorretSnatEntryStatus | The Specified SnatEntry is not stable status, can not operation | - |
400 | OperationFailed.SnatIpsCheck | %s | - |
400 | OperationFailed.SnatIpPoolCbwpRules | %s | - |
400 | EIP_NOT_IN_GATEWAY | The Eip not in nat gateway | - |
400 | InvalidParameter.SnatIp | Error public ip must in same bandwidth package. | - |
400 | QuotaExceeded.SnatIp | Public ip number exceeds quota. | - |
400 | InvalidSnatEntryId.NotFound | Specified SNAT entry does not exist. | The specified SNAT entry does not exist. Check whether the SNAT entry is valid. |
400 | OperationFailed.SnatIpPoolBwpRules | %s | - |
400 | IncorrectStatus.SnatEntry | The Specified SnatEntry is not stable status, can not operation | The specified SNAT entries are not in a stable state and cannot be operated. |
400 | OperationFailed.SnatIpsTooMany | %s | - |
400 | OperationFailed.CanNotUseEipInDnat | Operation failed because the eip can not used by forward entry. | - |
400 | OperationUnsupported.EipNatGWCheck | Operation unsupported because the relation check of eip and nat gateway is failed. | - |
400 | ResourceNotFound.SnatEntry | Specified SNAT entry does not exist. | The specified SNAT entry does not exist. |
400 | IncorrectStatus.NatIp | Specified NatIp does not exist. | - |
400 | OperationFailed.CanNotUseNatIpInDnat | Operation failed because the NatIp can not used by forward entry. | - |
400 | IncorrectStatus.NATGW | NATGW status is invalid. | The NAT gateway is in an invalid state. |
404 | InvalidRegionId.NotFound | The specified RegionId does not exist in our records. | The specified region ID does not exist. |
404 | InvalidSnatTableId.NotFound | Specified SNAT table does not exist. | The specified SNAT table does not exist. |
404 | InvalidSnatIp.NotFound | Specified SnatIp does not found on the NAT Gateway | The public IP address does not exist in the NAT gateway. |
404 | ResourceNotFound.NatIp | Specified NatIp does not found on the NAT Gateway | - |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-12-03 | The Error code has changed. The request parameters of the API has changed | View Change Details |
2024-08-09 | The Error code has changed. The request parameters of the API has changed | View Change Details |
2024-05-06 | The Error code has changed. The request parameters of the API has changed | View Change Details |
2024-01-18 | API Description Update. The Error code has changed | View Change Details |
2023-03-01 | The Error code has changed | View Change Details |