将一台专有网络VPC类型ECS实例的公网IP地址(PublicIP)转化为弹性公网IP(EIP)。
接口说明
接口说明
公网 IP 地址转换为 EIP 后,EIP 将单独计费。请确保您已充分了解 EIP 的计费方式。
调用该接口时,ECS 实例必须满足以下条件:
-
状态为已停止(
Stopped)或者运行中(Running)。 -
没有绑定 EIP。
-
没有未生效的变更配置任务。
-
公网带宽不能为 0 Mbit/s。
-
包年包月实例的公网带宽计费方式必须为
按使用流量计费,而按固定带宽计费方式的公网 IP 不支持转化为弹性公网 IP。按量付费实例则不受该规则影响。更多信息,请参见转换公网带宽计费方式。 -
专有网络 VPC 类型的包年包月 ECS 实例 24 小时内不会到期。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
ecs:ConvertNatPublicIpToEip |
update |
*Instance
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| InstanceId |
string |
是 |
需要转化公网 IP 的实例 ID。 |
i-bp171jr36ge2ulvk**** |
| RegionId |
string |
是 |
实例所属的地域 ID。您可以调用 DescribeRegions 查看最新的阿里云地域列表。 |
cn-hangzhou |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
|||
| RequestId |
string |
请求 ID。 |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E |
示例
正常返回示例
JSON格式
{
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E"
}
异常返回示例
JSON格式
{
"RequestId":"B154D309-F3E1-4AB7-BA94-FEFCA8B89001"
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 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. | 专属云不支持的api的报错 |
| 400 | AccountInArrears | The account is in arrears. | 账号已欠费。 |
| 403 | InvalidInstanceId.PlanedChange | %s | 您当前的操作无效,由于您指定的实例已经预约了变更操作。 |
| 403 | InvalidEndTime.OperateNotSupport | %s | 该实例状态不支持此操作。 |
| 403 | InvalidInstanceStatus.Released | %s | 该操作无效,请检查实例状态是否正确。 |
| 403 | IncorrectInstanceStatus | %s | 当前实例的状态不支持此操作。 |
| 403 | OperationDenied | %s | |
| 403 | InvalidInstance.ZeroBandwidth | %s | |
| 403 | InvalidInternetChargeType.ValueNotSupported | %s | |
| 403 | InvalidInstanceId.NotFound | %s | 指定的实例不存在,请确认参数 InstanceId 是否正确。 |
| 403 | MaxEIPQuotaExceeded | The number of EIP exceeds the limit per region. | EIP数量超过了当前地域可设置的最大值。 |
| 403 | Forbidden.InvalidPublicBandwidth | The specified instance public bandwidth is less than 1M. | 实例公网带宽数据不合法。 |
| 403 | InvalidInstance.OverduePayment | The special instance due to overdue payment,this operation is not supported. | 您的账号已欠费,请充值后重试。 |
| 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. | 该操作被风险控制系统禁止。 |
| 403 | UnsupportedPublicIpWithIsp | %s | |
| 404 | InvalidInstanceId.NotFound | %s | |
| 404 | InvalidInstance.IpAddressMissing | %s | 指定实例没有配置公网IP,具体信息请参见错误信息%s占位符的实际返回结果。您可以调用DescribeInstances查询指定实例的状态。 |
| 409 | OperationConflict | Request was denied due to conflict with a previous request,please try again later. | 请求操作的资源与之前的请求冲突 |
| 409 | TokenProcessing | The previous token request is still processing. Please try again later. |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。