Modifies the attributes of a NAT gateway.
Operation description
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:ModifyNatGatewayAttribute | update |
|
| 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 query the most recent region list. | cn-hangzhou |
NatGatewayId | string | Yes | The ID of the NAT gateway. | ngw-2ze0dcn4mq31qx2jc**** |
Name | string | No | The name of the NAT gateway. The name must be 1 to 128 characters in length and cannot start with | nat123 |
Description | string | No | The description of the NAT gateway. The description must be 1 to 128 characters in length, and cannot start with | Description |
IcmpReplyEnabled | boolean | No | Specifies whether to enable the Internet Control Message Protocol (ICMP) non-retrieval feature. Valid values:
| false |
EipBindMode | string | No | The mode in which the NAT gateway is associated with an elastic IP address (EIP). You can leave this parameter empty. If you want to specify a value for this parameter, set the value to NAT, which indicates that the NAT gateway is associated with the EIP in NAT mode. ** Description
| NAT |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "AB5F62CF-2B60-4458-A756-42C9DFE108D1"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | UnsupportedFeature.PrivateLinkMode | The feature of %s is not supported. | The feature of reverse access is not supported. |
400 | IncorrectStatus.NATGW | NATGW status is invalid. | The NAT gateway is in an invalid state. |
400 | ExclusiveParam.%sAnd%s | The param of %s and %s are mutually exclusive. | You cannot specify %s and %s at the same time. |
400 | IncorrectStatus.NatGateway | The status of natgateway is incorrect. | The status of the NAT gateway is invalid. |
400 | DependencyViolation.PrivateLinkMode | The specified resource of %s depends on %s, so the operation cannot be completed. | The %s resource depends on %s. |
400 | UnsupportedFeature.IcmpReplyEnabled | The feature of IcmpReplyEnabled is not supported. | The value of IcmpReplyEnabled cannot be modified. |
400 | InvalidParams.NotNull | The parameter must not be null, name or description or icmpReplyEnabled | The name, description, and ICMP proxy cannot be empty at the same time. |
400 | InvalidParameter.Name.Malformed | The specified Name is not valid. | The specified name format is invalid. Enter the name in the valid format. |
400 | InvalidParameter.Description.Malformed | The specified Description is not valid. | The specified description is invalid. |
400 | UnsupportedFeature.IndirectConvertForVpcNat | The VPC NAT gateway is not support to change EIP bond type. | The error message returned because the value of the EipBindMode parameter cannot be modified for a VPC NAT gateway. |
400 | UnsupportedFeature.NormalNatModifyEipBindMode | The normal NAT gateway is not support to change EIP bond type. | The value of EipBindMode cannot be modified for a standard NAT gateway. |
400 | OperationDenied.EipBondTypeIsAlreadyNAT | The EIP bond type is already NAT type. | EipBindMode is already set to NAT. |
400 | UnsupportedFeature.IndirectConvertForFwNat | The security protection enabled NAT gateway is not support change EIP bond type. | The value of EipBindMode cannot be modified for an Internet NAT gateway for which the security protection feature is enabled. |
400 | QuotaExceeded.EipNumForModifyEipBondType | The quota of %s is exceeded, binded: %s, quota: %s. | The number of allowed EIPs reaches the upper limit when you modify the EIP association type. |
400 | ResourceNotEnough.SwitchAvailableIps | The available private Ip number is not enough in your subnet. | The number of private IP addresses in the subnet is insufficient. |
400 | UnsupportedFeature.VpcNatSecurityProtectionEnabled | The VPC NAT gateway is not supported to enable security protection. | You cannot enable security protection for the VPC NAT gateway. |
400 | OperationDenied.NatGatewayStatusInvalid | The NAT gateway status is invalid. | The status of the NAT gateway does not support the operation. |
400 | OperationDenied.EipStatusInvalid | The NAT gateway has EIP in invalid status. | The EIP associated with the NAT gateway is in an invalid state. |
400 | OperationDenied.SnatEntryStatusInvalid | The NAT gateway has SNAT entry in invalid status. | The SNAT entry associated with the NAT gateway is in an invalid state. |
400 | OperationDenied.DnatEntryStatusInvalid | The NAT gateway has DNAT entry in invalid status. | The DNAT entry associated with the NAT gateway is in an invalid state. |
400 | UnsupportedFeature.MutilBindedTypeNatEnableFw | The NAT with Mutil-Binded Eip bind type is not support enable firewall. | You cannot enable firewall for the NAT gateway because EIPs are associated with the NAT gateway in Multi-Binded mode. |
403 | Forbidden.ModifyEipBondType | Authentication is failed for modify EIP bond type. | The value of EipBindMode cannot be modified. |
404 | InvalidRegionId.NotFound | The specified RegionId does not exist in our records. | The specified region ID does not exist. |
404 | InvalidNatGatewayId.NotFound | The specified NatGatewayId does not exist in our records. | The value of the NatGatewayId parameter is invalid. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-05-17 | The Error code has changed | View Change Details |
2024-05-07 | 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 |
2022-10-13 | The Error code has changed. The request parameters of the API has changed | View Change Details |