全部产品
Search
文档中心

云服务器 ECS:ConvertNatPublicIpToEip - 将公网IP地址转化为弹性公网IP

更新时间:Oct 21, 2024

调用ConvertNatPublicIpToEip将一台专有网络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代码示例。

授权信息

当前API暂无授权信息透出。

请求参数

名称类型必填描述示例值
InstanceIdstring

需要转化公网 IP 的实例 ID。

i-bp171jr36ge2ulvk****
RegionIdstring

实例所属的地域 ID。您可以调用 DescribeRegions 查看最新的阿里云地域列表。

cn-hangzhou

返回参数

名称类型描述示例值
object
RequestIdstring

请求 ID。

473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E

示例

正常返回示例

JSON格式

{
  "RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E"
}

错误码

HTTP status code错误码错误信息描述
400OperationDenied.CloudboxNotSupportThis operation is denied, because the specified ECS instance which is in the Cloudbox dose not support PublicIp or Eip.-
400InvalidParameter.CloudboxNotSupported%s-
400OperationDenied.DedicatedRegionNotSupportedThis operation is denied, because the specified ECS instance which is in the dedicated region dose not support PublicIp or Eip.专属云不支持的api的报错
403InvalidInstanceId.PlanedChange%s您当前的操作无效,由于您指定的实例已经预约了变更操作。
403InvalidEndTime.OperateNotSupport%s该实例状态不支持此操作。
403InvalidInstanceStatus.Released%s该操作无效,请检查实例状态是否正确。
403IncorrectInstanceStatus%s当前实例的状态不支持此操作。
403OperationDenied%s拒绝操作。
403InvalidInstance.ZeroBandwidth%s-
403InvalidInternetChargeType.ValueNotSupported%s暂不支持指定的网络计费方式,请确认相关参数是否正确。
403InvalidInstanceId.NotFound%s指定的实例不存在,请确认参数 InstanceId 是否正确。
403MaxEIPQuotaExceededThe number of EIP exceeds the limit per region.EIP数量超过了当前地域可设置的最大值。
403Forbidden.InvalidPublicBandwidthThe specified instance public bandwidth is less than 1M.实例公网带宽数据不合法。
403InvalidInstance.OverduePaymentThe special instance due to overdue payment,this operation is not supported.您的账号已欠费,请充值后重试。
403EIPMaxBandwidthExceededThe bandwidth of instance exceeds the limitation of EIP in this region.-
403IncorrectInstanceStatusThe special instance status not support this operate!-
403InvalidAccountStatus.NotEnoughBalanceYour account does not have enough balance.账号余额不足,请您先充值再进行该操作。
403Forbidden.RiskControlThis operation is forbidden by Aliyun RiskControl system.该操作被风险控制系统禁止。
403UnsupportedPublicIpWithIsp%s-
404InvalidInstance.IpAddressMissing%s指定实例没有配置公网IP,具体信息请参见错误信息%s占位符的实际返回结果。您可以调用DescribeInstances查询指定实例的状态。

访问错误中心查看更多错误码。

变更历史

变更时间变更内容概要操作
2023-10-10OpenAPI 错误码发生变更查看变更详情