最近更新时间:2023.11.08 17:23:19
首次发布时间:2021.07.31 07:47:46
调用 AllocateEipAddress 接口,申请公网IP。
单个账号单个地域下默认最多可创建的公网IP为20个。若默认配额无法满足需求,请前往 配额中心 ,申请提升配额。
单个账号单个地域下每日最多调用本接口的次数为可申请公网IP数量的2倍。
标签的其他操作请参考 TagResources、UntagResources、ListTagsForResources 。
参数名称 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | AllocateEipAddress | 要执行的操作,取值:AllocateEipAddress。 |
Version | String | 是 | 2020-04-01 | API的版本信息,当前版本为2020-04-01。 |
Name | String | 否 | eip-1 | 公网IP的名称。
|
Description | String | 否 | This is an eip | 公网IP的描述。
|
ISP | String | 否 | BGP | 线路类型,默认为BGP。
|
BillingType | Integer | 是 | 2 | 公网IP的计费方式。取值如下:
|
PeriodUnit | Integer | 否 | 1 | 购买包年包月公网IP时长的单位。取值如下:
|
Period | Integer | 否 | 1 | 购买包年包月公网IP的时长,默认为“1”。
|
BandwidthPackageId | String | 否 | 共享带宽包的ID,表示将公网IP加入到共享带宽包。
| |
Bandwidth | Integer | 否 | 1 | 公网IP的带宽上限,默认为“1”,单位:Mbps。
|
SecurityProtectionTypes.N | String | 否 | SecurityProtectionTypes.1 | 公网IP的安全防护类型。
说明
|
RenewType | Interger | 否 | 1 | 包年包月公网IP续费的方式。取值如下:
|
RenewPeriodTimes | Interger | 否 | 1 | 自动续费的时长,取值范围1、2、3、6、12,单位:月。
|
ProjectName | String | 否 | Project_1 | 公网IP所属项目的名称。不填默认加入default项目。 |
Tags.N.Key | String | 否 | Tags.1.Key=key1&Tags.2.Key=key2 | 公网IP用户标签的标签键(Key)。
说明 同一资源的标签键不允许重复。 |
Tags.N.Value | String | 否 | Tags.1.Value=value1&Tags.2.Value=value2 | 公网IP用户标签的标签值(Value)。
说明 如果传入该参数,则必须先传入 |
ClientToken | String | 否 | 123e4567-e89b-12d3-a456-42665544**** | 保证请求幂等性。由客户端自动生成一个参数值,确保不同请求间该参数值唯一,避免当调用API超时或服务器内部错误时,客户端多次重试导致重复性操作。取值:
|
参数名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
RequestId | String | 2021062415303301022514515207C4**** | 请求ID。 |
EipAddress | String | 12.XX.XX.89 | 公网IP地址。 |
AllocationId | String | eip-2ziwb7ujxscd**** | 公网IP的ID。 |
GET /?Action=AllocateEipAddress&Version=2020-04-01&Name=eip-1&ISP=BGP&BillingType=2&Bandwidth=10 HTTP/1.1 Host: open.volcengineapi.com Service: vpc Region: cn-beijing
{ "ResponseMetadata": { "RequestId": "2021110417394001022514606307D7****", "Action": "AllocateEipAddress", "Version": "2020-04-01", "Service": "vpc", "Region": "cn-beijing" }, "Result":{ "AllocationId": "eip-2ziwb7ujxscd****", "EipAddress": "12.XX.XX.89", "RequestId": "2021062415303301022514515207C4****" } }
公共错误码,请参见 公共错误码 。
HttpCode | 错误码 | 错误信息 | 描述 |
---|---|---|---|
400 | IdempotentParameterMismatch | Arguments on this idempotent request are inconsistent with arguments used in previous request(s). | 此幂等请求的参数与前一个请求中使用的参数不一致。 |
400 | InsufficientIspEip | The specified ISP does not contain enough free elastic IP addresses to fulfill your request. | 指定ISP下的EIP资源不足。 |
400 | InvalidBandwidth.Malformed | The specified bandwidth is malformed.Ensure that bandwidth is not smaller than 1. | 指定的带宽不合法。如果指定带宽,请确保不小于1。 |
400 | InvalidBandwidthPackage.InvalidStatus | The specified bandwidth package is not in the correct status for the request. The specified bandwidth package is in freeze. | 指定的共享带宽包所处的状态无法响应该请求。当前共享带宽包被冻结。 |
400 | InvalidBillingType.Malformed | The specified billing type is malformed. AntiDDoS enhanced eip billing type only support 2 and 3. | 指定的计费类型不支持。增强防护EIP只支持按带宽上限计费和按流量计费类型。 |
400 | InvalidBillingType.Malformed | The specified billing type of EIP is malformed. | 指定的EIP计费类型不合法。 |
400 | InvalidBillingType.Malformed | The specified billing type is malformed. | 指定的计费类型不合法。 |
400 | InvalidDescription.Malformed | The specified description is malformed. | 指定的描述格式不合法。请修复描述格式后重试。 |
400 | InvalidDescription.Malformed | The specified description is malformed. Ensure the maximum length of description is 255. | 指定的描述格式不合法。描述长度不能超过255个字符。 |
400 | InvalidMonthPeriod.Malformed | The specified monthly period is malformed. Monthly period only supports 1~9, 12, 24, 36. | 指定的包年包月按月购买时长不合法。包年包月按月购买时长只支持1~9, 12, 24, 36月。 |
400 | InvalidName.Malformed | The specified name is malformed. | 指定的名称格式不合法。请修复名称格式后重试。 |
400 | InvalidName.Malformed | The specified name is malformed. Ensure the maximum length of name is 128. | 指定的名称格式不合法。名称长度不能超过128个字符。 |
400 | InvalidParameter.ClientTokenMalformed | The specified parameter ClientToken is malformed. | 指定的参数ClientToken格式不合法,长度不能超过64个ASCII字符。 |
400 | InvalidPeriodUnit.Malformed | The specified period unit is malformed. Pre billing period unit can only be 1 or 2. | 指定的包年包月类型时长单位不合法。包年包月类型时长单位只能为1(月)或2(年)。 |
400 | InvalidProtocol.Mismatch | The protocol of the bandwidth package does not match with the EIP. | 共享带宽包与EIP的协议类型不匹配。 |
400 | InvalidSecurityProtectionTypes.Malformed | The specified security protection type is malformed. Security protection type only support AntiDDoS_Enhanced. | 指定的安全防护级别不支持。安全防护级别当前仅支持AntiDDoS_Enhanced。 |
400 | InvalidTag.Disorder | The specified index order of tag is malformed. | 指定标签的索引顺序参数格式不合法。 |
400 | InvalidTagKey.Malformed | The specified parameter tag key is invalid. | 标签键不合法。 |
400 | InvalidTagValue.Malformed | The specified parameter tag value is invalid. | 标签值不合法。 |
400 | InvalidYearPeriod.Malformed | The specified yearly period is malformed. Yearly period only supports 1~3. | 指定的包年包月按年购买时长不合法。包年包月按年购买时长只支持1~3年。 |
400 | LimitExceeded.BandwidthPerEip | You've reached the limit on the bandwidth of elastic ip that you can create. | 已达到EIP带宽上限。 |
400 | LimitExceeded.SecurityProtectionTypes | You've reached the limit on the number of security protection types. | 已达到安全防护类型的上限。 |
400 | QuotaExceeded.BandwidthPackage | You've reached the limit on the EIP number of that you can add to bandwidth package. | 已达到共享带宽包可加入公网IP的数量上限。 |
400 | QuotaExceeded.Eip | EIP number exceeded quota. | 已达到可申请公网IP数量上限。 |
400 | LimitExceeded.Tags | You've reached the limit on the number of tags that you can operate at one time. | 已达到单次可操作标签数量的上限。 |
400 | UnsupportedOperation | The request on the specified instance is denied due to the account balance and available vouchers are less than 100 yuan in total. | 因账户余额及可用代金券共不足100元,对于该实例的操作请求被拒绝。 |
400 | UnsupportedOperation | The request on the specified instance is denied due to the account in arrears status. | 因账户处于欠费状态,对于该实例的操作请求被拒绝。 |
403 | Forbidden | You are not authorized to create fusion BGP elastic IP address. | 无权限创建融合BGP类型EIP地址。 |
403 | Forbidden | You are not authorized to perform operations on the specified bandwidth package. Because of SecurityProtectionTypesInconsistent. | 无权限对指定的共享带宽包操作。指定EIP和共享带宽包的安全防护级别不一致。 |
403 | Forbidden | You are not authorized to create Static BGP elastic IP address. | 无权限创建静态BGP类型EIP地址。 |
403 | Forbidden | You are not authorized to create Anti DDos elastic IP address. | 无权限申请增强防护类型的公网IP。 |
403 | Forbidden | You are not authorized to perform operations on the specified bandwidth package. The ISP of EIP and bandwidth package is not same. | EIP和共享带宽包的ISP不一致。 |
403 | Forbidden | You are not authorized to create single-line elastic IP address. | 无权限创建静态单线类型EIP地址。 |
403 | Forbidden | You are not authorized to create BGP SingleLine elastic IP address. | 无权限创建BGP单线类型EIP地址。 |
403 | Forbidden | You are not authorized to create an elastic IP address with the specified billing type. | 无权限创建指定计费类型的EIP地址。 |
403 | Forbidden | You are not authorized to create single-line value elastic IP address. | 无权限创建静态单线惠选型类型EIP地址。 |
403 | Forbidden.PurchaseLimited | The account is not authorized to purchase the resource. | 此账户无权限购买资源。 |
404 | InvalidBandwidthPackage.NotFound | The specified bandwidth package does not exist. | 指定的共享带宽包不存在。 |
404 | InvalidISP.NotFound | The specified ISP does not exist. | 指定的ISP不存在。 |
404 | InvalidProject.NotFound | The specified Project does not exist. | 指定的项目不存在。 |
412 | IdempotentProcessing | The request uses the same client token as a previous one that is still in process. | 幂等请求处理中。 |