You need to enable JavaScript to run this app.
文档中心
公网IP

公网IP

复制全文
下载 pdf
公网IP
AllocateEipAddress - 申请公网IP
复制全文
下载 pdf
AllocateEipAddress - 申请公网IP
调用 AllocateEipAddress 接口,申请公网IP。​
使用说明​
前提条件​
  • 完成火山引擎账号注册和实名认证。​
  • 您账户的 可用余额 和可用于公网IP的代金券二者总值不小于100.00元人民币,且可用余额不小于0,具体操作请参见 充值操作指引 。​
使用限制​
  • 单个账号单个地域下默认最多可创建的公网IP为20个。若默认配额无法满足需求,请前往 配额中心 ,申请提升配额。​
  • 单个账号单个地域下每日最多调用本接口的次数为可申请公网IP数量的2倍。​
调试​
API Explorer
您可以通过 API Explorer 在线发起调用,无需关注签名生成过程,快速获取调用结果。
​
请求参数​
下方仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数。​
Action String 必选 示例值:AllocateEipAddress​
要执行的操作,取值:AllocateEipAddress。​
​
Version String 必选 示例值:2020-04-01​
API的版本信息,当前版本为 2020-04-01。​
​
Name String 可选 示例值:eip-1​
公网IP的名称。​
  • 长度限制为1 ~ 128个字符。​
  • 需要以字母、中文或数字开头,可包含点号(.)、下划线(_)和短划线(-)。​
  • 不填默认是公网IP的ID。​
​
Description String 可选 示例值:This is an eip​
公网IP的描述。​
  • 长度限制为0~ 255个字符。​
  • 不填默认为空字符串。​
  • 需要以字母、中文或数字开头。可包含英文逗号(,)、点号(.)、下划线(_)、空格( )、等号(=)、短横线(-)、中文逗号(,)、中文句号(。)。​
​
ISP String 可选 示例值:BGP​
线路类型,默认为BGP。​
  • BGP:BGP(多线)。​
  • 若您的账号已申请并开通了静态单线权限,则可传入如下取值:​
  • ChinaMobile:中国移动静态单线。​
  • ChinaTelecom:中国电信静态单线。​
  • ChinaUnicom:中国联通静态单线。​
  • 若您的账号已申请并开通了BGP单线权限,则可传入SingleLine_BGP。​
  • 若您的账号已申请并开通了精品BGP权限,则可传入Premium_BGP。​
  • 若您的账号已申请并开通了融合BGP权限,则可传入Fusion_BGP。​
  • 若您的账号已申请并开通了惠选型静态单线权限,则可传入如下取值:​
  • ChinaMobile_Value:中国移动惠选型静态单线。​
  • ChinaUnicom_Value:中国联通惠选型静态单线。​
  • ChinaTelecom_Value:中国电信惠选型静态单线。​
​
IpAddress String 可选 示例值:12.XX.XX.89​
申请指定的公网IP地址。仅支持填写使用后释放的IP地址,不填则表示自动分配。​
​
BillingType Integer 可选 示例值:2​
公网IP的计费方式。取值如下:​
  • 1:包年包月。​
  • 2(默认):按量计费-按带宽上限计费。​
  • 3:按量计费-按实际流量计费。​
​
IpAddressPoolId String 可选 示例值:ippool-2zeerra***​
IP地址池的ID。​
您可以调用 DescribeIpAddressPools 接口,查询IP地址池的ID。​
说明​
IP地址池正在邀测中,如需试用,请联系客户经理。​
​
PeriodUnit Integer 可选 示例值:1​
购买包年包月公网IP时长的单位。取值如下:​
  • 1(默认值):月。​
  • 2 :年。​
​
Period Integer 可选 示例值:1​
购买包年包月公网IP的时长,默认为“1”。​
  • 当PeriodUnit传入1,Period取值范围:1~9、12、24、36、48、60。​
  • 当PeriodUnit传入2,Period取值范围:1~5。​
​
BandwidthPackageId String 可选 示例值:bwp-2zeo05qre24nhrqpy****​
共享带宽包的ID,表示将公网IP加入到共享带宽包。​
您可以调用 DescribeBandwidthPackages 接口,查询共享带宽包的ID。​
公网IP加入到共享带宽包必须同时满足如下条件:​
  • 二者的安全防护类型相同。​
  • 二者的地域相同。​
  • 公网IP的计费方式必须是按量计费。​
  • 共享带宽包为IPv4类型。​
​
Bandwidth Integer 可选 示例值:1​
公网IP的带宽上限,默认为“1”,单位:Mbps。​
  • BillingType传入1:取值范围1 ~ 500。​
  • BillingType传入2:取值范围1 ~ 500。​
  • BillingType传入3:取值范围1 ~ 200。​
​
SecurityProtectionTypes.N String 可选 示例值:AntiDDoS_Enhanced​
公网IP的安全防护类型。​
  • 参数 - N:表示安全防护类型的序号,当前仅支持取1。​
  • 取值:​
  • AntiDDoS_Enhanced:申请增强防护类型的公网IP,可加入到DDoS原生防护(企业版)实例。​
说明​
  • 若SecurityProtectionTypes.N传入AntiDDoS_Enhanced,则BillingType必须传入2或3,且ISP必须传入BGP。​
  • 增强防护类型公网IP正在邀测中,如需试用,请联系客户经理。​
  • 不填则表示申请默认防护类型的公网IP。​
​
SecurityProtectionInstanceId Integer 可选 示例值:20​
DDoS原生防护(企业版)ID。​
您可以调用 DescInstanceList 接口,查询DDoS原生防护(企业版)的ID。​
当SecurityProtectionTypes传入AntiDDoS_Enhanced时,此参数必须传入。​
​
RenewType Integer 可选 示例值:1​
包年包月公网IP续费的方式。取值如下:​
  • 1(默认值):手动续费。​
  • 2:自动续费。​
  • 3:到期不续费。​
​
RenewPeriodTimes Integer 可选 示例值:1​
自动续费的时长,取值范围1、2、3、6、12,单位:月。​
若RenewType传入2,则必须传入RenewPeriodTimes。​
​
ProjectName String 可选 示例值:Project_1​
公网IP所属项目的名称。不填默认加入default项目。​
​
Tags.N.Key String 可选 示例值:key1​
用户标签的标签键。​
  • 参数 - N:表示标签键的序号,取值范围:1~50。​
  • 多个标签键之间用&分隔。​
  • 不能以 volc:或sys:开头,包括任意大小写形式。​
  • 长度取值范围为1~128字符,允许输入各国语言文字、数字、空格( )、下划线(_)、点号(.)、半角冒号(:)、斜杠(/)、等号(=)、加号(+)、中划线(-)和@(@)。​
  • 若标签键开头或结尾存在空格,系统会自动为其去除。​
说明​
同一资源的标签键不允许重复。​
​
Tags.N.Value String 可选 示例值:value1​
用户标签的标签值。​
  • 参数 - N:表示标签值的序号,取值范围:1~50。​
  • 多个标签值之间用&分隔。​
  • 长度取值范围为0~256字符,不填默认为空。​
  • 允许输入各国语言文字、数字、空格( )、下划线(_)、点号(.)、半角冒号(:)、斜杠(/)、等号(=)、加号(+)、中划线(-)和@(@)。​
  • 大小写敏感。​
  • 若标签值开头或结尾存在空格,系统会自动为其去除。​
说明​
若传入该参数,则必须先传入Tags.N.Key。​
​
ClientToken String 可选 示例值:123e4567-e89b-12d3-a456-42665544****​
保证请求幂等性。由客户端自动生成一个参数值,确保不同请求间该参数值唯一,避免当调用API超时或服务器内部错误时,客户端多次重试导致重复性操作。取值:​
  • 仅支持ASCII字符,且不能超过64个字符。​
​
​
​
返回参数​
下方仅列出本接口特有的返回参数。更多信息请参见返回结构。​
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: vpc.cn-beijing.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****"​
}​
}​
​
错误码​
公共错误码请参见公共错误码。​
​
状态码​
错误码​
错误信息​
说明​
400​
DryRunOperation​
Exception raised to indicate a successfully authorized action when the DryRun flag is set to true.​
该请求设置为DryRun操作,操作授权已获得许可,但未被实际执行。​
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.​
指定的计费类型不支持。增强防护EIP只支持按带宽上限计费和按流量计费类型。​
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.​
指定的计费类型不合法。​
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​
InvalidEip.Allocated​
The specified ip address has been allocated​
指定的 EIP 地址已分配。​
400​
InvalidEip.CountTooLarge​
EIP count reach its limits.​
EIP 数量超过限制。​
400​
InvalidEip.CountTooSmall​
EIP count cannot be smaller than 1.​
EIP 数量最小为1。​
400​
InvalidEip.IPFormatError​
IP format error​
IP 格式错误。​
400​
InvalidEip.ISPMismatch​
The specified isp does not contain the specified ip address​
指定的 EIP 地址不在指定的 ISP 内。​
400​
InvalidEip.InvalidStatus​
The specified elastic ip is not in the correct status for the request. EIP post billing type don't support renew.​
指定的弹性公网IP所处状态无法响应该请求。Eip后付费类型不支持续费。​
400​
InvalidEni.InvalidStatus​
The specified elastic network interface is not in the correct status for the request.​
指定的弹性网卡所处的状态无法响应该请求。​
400​
InvalidIPAddress.NotSupported​
The specified IP address doesn't support this operation.​
此IP地址不支持此操作。​
400​
InvalidIPPool.IPResourceNotEnough​
The specified IP address pool does not have enough available IP address.​
指定IP地址池可用IP地址不足。​
400​
InvalidIPPool.InvalidStatus​
The specified IP address pool is not in the correct status for the request.​
指定IP地址池所处的状态无法响应该请求。​
400​
InvalidMonthPeriod.Malformed​
The specified monthly period is malformed. Monthly period only supports 1~9, 12, 24, 36, 48, 60.​
指定的预付费按月购买时长不合法。预付费按月购买时长只支持1~9, 12, 24, 36, 48, 60月。​
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​
InvalidRenewPeriodTimes.Malformed​
The specified renew period times is malformed. Renew period times only support 1, 2, 3, 6, 12.​
指定的自动续费周期不合法。自动续费周期只支持1, 2, 3, 6, 12月。​
400​
InvalidRenewType.Malformed​
The specified renew type is malformed. Renew type must be 1, 2, or 3.​
指定的续费类型不合法。续费类型只允许为1, 2 或 3。​
400​
InvalidSecurityProtectionInstance.InvalidStatus​
The specified security protection instance is not in the correct status for the request.​
指定的安全防护实例所处的状态无法响应该请求。​
400​
InvalidSecurityProtectionInstance.RegionMismatch​
The specified security protection instance is not in the specified region.​
指定的安全防护实例不属于指定地域。​
400​
InvalidSecurityProtectionInstance.SpecificationsMismatch​
The specified security protection instance and EIP are in different specifications.​
指定的安全防护实例和EIP规格不匹配。​
400​
InvalidSecurityProtectionTypes.Malformed​
The specified security protection type is malformed. Security protection type only support AntiDDoS_Enhanced.​
指定的安全防护级别不支持。安全防护级别当前仅支持AntiDDoS_Enhanced。​
400​
InvalidSpecificEgress.Mismatch​
The specific egress of the bandwidth package does not match with the EIP.​
IP地址池与EIP的指定出口不匹配。​
400​
InvalidSpecificEgress.Mismatch​
The specific egress of the ip pool does not match with the EIP.​
IP地址池与EIP的指定出口不匹配。​
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​
InvalidVpcEip.InUse​
The specified vpc eip is being operated by another request.​
指定的EIP正被另一个请求操作,请稍后再试。​
400​
InvalidVpcEip.InvalidStatus​
The specified vpc elastic ip is not in the correct status for the request.​
指定的弹性公网IP所处的状态无法响应该请求。​
400​
InvalidYearPeriod.Malformed​
The specified yearly period is malformed. Yearly period only supports 1~5.​
指定的预付费按年购买时长不合法。预付费按年购买时长只支持1~5年。​
400​
LimitExceeded.BandwidthPerEip​
You've reached the limit on the bandwidth of elastic ip that you can create.​
已达到EIP带宽上限。​
400​
LimitExceeded.MonthlyAddressRetrieveQuota​
You've reached the limit on the number of retrieving EIP addresses this month.​
已达到当月找回配额上限。​
400​
LimitExceeded.SecurityProtectionTypes​
You've reached the limit on the number of security protection types.​
已达到安全防护类型的上限。​
400​
LimitExceeded.Tags​
You've reached the limit on the number of tags that you can operate at one time.​
已达到单次可操作标签数量的上限。​
400​
OrderError​
Failed to create an order in one step.​
创建订单并支付失败。​
400​
PreOrderError​
Failed to create pre order.​
创建配置单失败。​
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​
QuotaExceeded.ExceedLimit​
Interface call exceeds limit.​
接口调用次数超出限制。​
400​
QuotaExceeded.PremiumBGPEip​
Premium BGP EIP number exceeded quota.​
已达到可申请精品BGP类型公网IP数量上限。​
400​
QuotaExceeded.SecurityProtectionInstance​
You've reached the limit on the number of security protection instance that you can add.​
已达到安全防护实例可加入的数量上限。​
400​
UnsupportedOperation.AllocateHistoricalEIP​
Only support applying for historical EIPs used by this account.​
目前仅支持申请此账号使用过的EIP。​
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​
The premium BGP line specific egress function is not support.​
无权限创建融合BGP类型EIP地址。​
403​
Forbidden​
You are not authorized to create Anti DDos elastic IP address.​
精品BGP线路指定出口功能暂不支持。​
403​
Forbidden​
You are not authorized to create BGP SingleLine elastic IP address.​
无权限创建精品BGP类型EIP地址。​
403​
Forbidden​
You are not authorized to create Static BGP elastic IP address.​
无权限对指定的共享带宽包操作。指定EIP和共享带宽包的安全防护级别不一致。​
403​
Forbidden​
You are not authorized to create Unet elastic IP address.​
无权限创建静态BGP类型EIP地址。​
403​
Forbidden​
You are not authorized to create an elastic IP address with the specified billing type.​
无权限申请增强防护类型的公网IP。​
403​
Forbidden​
You are not authorized to create fusion BGP elastic IP address.​
EIP和共享带宽包的ISP不一致。​
403​
Forbidden​
You are not authorized to create premium BGP elastic IP address.​
无权限创建静态单线类型EIP地址。​
403​
Forbidden​
You are not authorized to create single-line elastic IP address.​
无权限创建BGP单线类型EIP地址。​
403​
Forbidden​
You are not authorized to create single-line value elastic IP address.​
无权限创建指定计费类型的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 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 use specific egress.​
无权限使用IP指定出口功能。​
404​
InvalidBandwidthPackage.NotFound​
The specified bandwidth package does not exist.​
指定的共享带宽包不存在。​
404​
InvalidIPPool.ISPMismatch​
The specified ISP of EIP does not match the IP address pool.​
EIP线路类型与IP地址池线路类型不匹配。​
404​
InvalidIPPool.NotFound​
The specified IP address pool does not exist.​
指定的IP地址池不存在。​
404​
InvalidISP.NotFound​
The specified ISP does not exist.​
指定的ISP不存在。​
404​
InvalidProject.NotFound​
The specified Project does not exist.​
指定的项目不存在。​
404​
InvalidSecurityProtectionInstance.NotFound​
The specified security protection instance does not exist.​
指定的安全防护实例不存在。​
404​
InvalidSpecificEgress.NotFound​
The specific egress does not exist.​
指定出口不存在。​
412​
IdempotentProcessing​
The request uses the same client token as a previous one that is still in process.​
幂等请求处理中。​
​
​
最近更新时间:2026.10.09 11:39:28
这个页面对您有帮助吗?
有用
有用
无用
无用