Converts the public IP address (PublicIP) of a VPC-type ECS instance to an Elastic IP Address (EIP).
Operation description
Operation description
After a public IP address is converted to an EIP, the EIP is billed separately. Make sure that you fully understand the billable methods of EIPs.
When you invoke this operation, the ECS instance must meet the following conditions:
-
The instance is in the Stopped (
Stopped) or Running (Running) state. -
No EIP is attached to the instance.
-
The instance has no pending configuration change nodes.
-
The public bandwidth cannot be 0 Mbit/s.
-
For subscription instances, the billing method for public bandwidth must be
pay-by-traffic. Public IP addresses with thepay-by-bandwidthbilling method cannot be converted to EIPs. Pay-as-you-go instances are not subject to this restriction. For more information, refer to Transform the billing method for network usage. -
The VPC-type subscription ECS instance does not expire within 24 hours.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ecs:ConvertNatPublicIpToEip |
update |
*Instance
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceId |
string |
Yes |
The instance ID of the instance whose public IP address you want to convert. |
i-bp171jr36ge2ulvk**** |
| RegionId |
string |
Yes |
The region ID of the instance. You can call DescribeRegions to query the most recent region list. |
cn-hangzhou |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E |
Examples
Success response
JSON format
{
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | OperationDenied.CloudboxNotSupport | This operation is denied, because the specified ECS instance which is in the Cloudbox dose not support PublicIp or Eip. | |
| 400 | InvalidParameter.CloudboxNotSupported | %s | |
| 400 | OperationDenied.DedicatedRegionNotSupported | This operation is denied, because the specified ECS instance which is in the dedicated region dose not support PublicIp or Eip. | error of api not supported by the exclusive cloud |
| 400 | AccountInArrears | The account is in arrears. | Your account has overdue payments. |
| 403 | InvalidInstanceId.PlanedChange | %s | Your operation is invalid because a configuration change has been scheduled for the specified instance. |
| 403 | InvalidEndTime.OperateNotSupport | %s | The instance is in a state that does not support the current operation. |
| 403 | InvalidInstanceStatus.Released | %s | The operation is invalid. Check the state of the instance. |
| 403 | IncorrectInstanceStatus | %s | The instance is in a state that does not support the current operation. |
| 403 | OperationDenied | %s | |
| 403 | InvalidInstance.ZeroBandwidth | %s | |
| 403 | InvalidInternetChargeType.ValueNotSupported | %s | |
| 403 | InvalidInstanceId.NotFound | %s | The specified instance does not exist. Check whether the InstanceId parameter is valid. |
| 403 | MaxEIPQuotaExceeded | The number of EIP exceeds the limit per region. | The maximum number of EIPs in the current region has been reached. |
| 403 | Forbidden.InvalidPublicBandwidth | The specified instance public bandwidth is less than 1M. | The specified public bandwidth value of the instance is invalid. |
| 403 | InvalidInstance.OverduePayment | The special instance due to overdue payment,this operation is not supported. | Your account has overdue payments. Add funds to your account and try again. |
| 403 | EIPMaxBandwidthExceeded | The bandwidth of instance exceeds the limitation of EIP in this region. | |
| 403 | InvalidAccountStatus.NotEnoughBalance | Your account does not have enough balance. | |
| 403 | Forbidden.RiskControl | This operation is forbidden by Aliyun RiskControl system. | The operation is forbidden by the risk control system. |
| 403 | UnsupportedPublicIpWithIsp | %s | |
| 404 | InvalidInstanceId.NotFound | %s | |
| 404 | InvalidInstance.IpAddressMissing | %s | The specified instance does not have a public IP address. For more information, refer to the actual return result of the %s placeholder in the error message. You can call DescribeInstances to query the status of the specified instance. |
| 409 | OperationConflict | Request was denied due to conflict with a previous request,please try again later. | The requested resource conflicts with a previous request. |
| 409 | TokenProcessing | The previous token request is still processing. Please try again later. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.