Modifies the name and description of a NAT gateway.
Usage notes
You can call this operation to query an Internet NAT gateway or a virtual private cloud (VPC) NAT gateway. The term NAT gateway in this topic refers to both types of NAT gateway.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | ModifyNatGatewayAttribute | The operation that you want to perform. Set the value to ModifyNatGatewayAttribute. |
RegionId | String | Yes | cn-hangzhou | The region ID of the NAT gateway. You can call the DescribeRegions operation to query the most recent region list. |
NatGatewayId | String | Yes | ngw-2ze0dcn4mq31qx2jc**** | The ID of the NAT gateway. |
Name | String | No | nat123 | The name of the NAT gateway. The name must be 1 to 128 characters in length and cannot start with |
Description | String | No | Description | The description of the NAT gateway. The description must be 1 to 128 characters in length, and cannot start with |
IcmpReplyEnabled | Boolean | No | true | Specifies whether to enable ICMP retrieval. Valid values:
|
EipBindMode | String | No | NAT | 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. Note
|
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | AB5F62CF-2B60-4458-A756-42C9DFE108D1 | The request ID. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=ModifyNatGatewayAttribute
&RegionId=cn-hangzhou
&NatGatewayId=ngw-2ze0dcn4mq31qx2jc****
&Name=nat123
&Description=Description
&IcmpReplyEnabled=true
&EipBindMode=NAT
&Common request parameters
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<ModifyNatGatewayAttributeResponse>
<RequestId>AB5F62CF-2B60-4458-A756-42C9DFE108D1</RequestId>
</ModifyNatGatewayAttributeResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"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 error message returned because the reverse access feature is not supported. |
400 | IncorrectStatus.NATGW | NATGW status is invalid. | The error message returned because the status of the NAT gateway is abnormal. |
400 | ExclusiveParam.%sAnd%s | The param of %s and %s are mutually exclusive. | The error message returned because the %s parameter and the %s parameter are mutually exclusive. |
400 | IncorrectStatus.NatGateway | The status of natgateway is incorrect. | The error message returned because the status of the NAT gateway is abnormal. |
400 | DependencyViolation.PrivateLinkMode | The specified resource of %s depends on %s, so the operation cannot be completed. | The error message returned because the operation is not completed. The %s resource depends on %s. |
400 | UnsupportedFeature.IcmpReplyEnabled | The feature of IcmpReplyEnabled is not supported. | The error message returned because the value of the IcmpReplyEnabled parameter cannot be modified. |
400 | InvalidParams.NotNull | The parameter must not be null, name or description or icmpReplyEnabled | The error message returned because the Name, Description, and IcmpReplyEnabled parameters are not configured. Configure at least one of the parameters. |
400 | InvalidParameter.Name.Malformed | The specified Name is not valid. | The error message returned because the format of the specified name is invalid. Specify a name in the valid format. |
400 | InvalidParameter.Description.Malformed | The specified Description is not valid. | The error message returned because 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 error message returned because the value of the EipBindMode parameter cannot be modified for a standard NAT gateway. |
400 | OperationDenied.EipBondTypeIsAlreadyNAT | The EIP bond type is already NAT type. | The error message returned because the EipBindMode parameter is set to NAT. |
400 | UnsupportedFeature.IndirectConvertForFwNat | The security protection enabled NAT gateway is not support change EIP bond type. | The error message returned because the value of the EipBindMode parameter 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 error message returned because the number of EIPs that are associated with the NAT gateway exceeds the upper limit. |
400 | ResourceNotEnough.SwitchAvailableIps | The available private Ip number is not enough in your subnet. | The error message returned because the vSwitch has insufficient private IP addresses. |
400 | UnsupportedFeature.VpcNatSecurityProtectionEnabled | The VPC NAT gateway is not supported to enable security protection. | The error message returned because the security protection feature cannot be enabled for a VPC NAT gateway. |
400 | OperationDenied.NatGatewayStatusInvalid | The NAT gateway status is invalid. | The error message returned because the status of the NAT gateway does not support the operation. |
400 | OperationDenied.EipStatusInvalid | The NAT gateway has EIP in invalid status. | The error message returned because the status of the EIP that is associated with the NAT gateway does not support the operation. |
400 | OperationDenied.SnatEntryStatusInvalid | The NAT gateway has SNAT entry in invalid status. | The error message returned because the status of the SNAT entry for the NAT gateway does not support the operation. |
400 | OperationDenied.DnatEntryStatusInvalid | The NAT gateway has DNAT entry in invalid status. | The error message returned because the status of the Destination Network Address Translation (DNAT) entry for the NAT gateway does not support the operation. |
400 | UnsupportedFeature.MutilBindedTypeNatEnableFw | The NAT with Mutil-Binded Eip bind type is not support enable firewall. | The error message returned because the firewall cannot be enabled for the NAT gateway with which the EIP is associated in MULTI_BINDED mode. |
403 | Forbidden.ModifyEipBondType | Authentication is failed for modify EIP bond type. | The error message returned because the value of the EipBindMode parameter cannot be modified. |
404 | InvalidRegionId.NotFound | The specified RegionId does not exist in our records. | The error message returned because the specified region ID does not exist. |
404 | InvalidNatGatewayId.NotFound | The specified NatGatewayId does not exist in our records. | The error message returned because the specified NAT gateway ID does not exist. Check whether the value of the NatGatewayId parameter is valid. |
For a list of error codes, visit the API Error Center.