申请公网 IP
更新时间:2025-08-15 03:41:38
基本信息
Action
AllocateEips
Path
/iaas
Method
GET
请求参数
此接口除公共参数外,还包含以下参数。关于公共参数的更多信息,请参见前文内容。
| 参数 | 参数类型 | 描述 | 是否必选 |
|---|---|---|---|
bandwidth |
Integer |
公网 IP 带宽上限,单位为 Mbps |
是 |
billing_mode |
String |
公网 IP 计费模式:bandwidth 按带宽计费,traffic 按流量计费,默认是 bandwidth |
否 |
associate_mode |
Integer |
公网 IP 绑定模式:0 为外部绑定,1 为内部绑定,默认是 0 |
否 |
eip_name |
String |
公网 IP 名称 |
否 |
count |
Integer |
创建公网 IP 的数量,默认是 1 |
否 |
need_icp |
Integer |
是否需要备案,1 为需要,0 为不需要,默认是 0 |
否 |
target_user |
String |
目标用户 ID ,可用于主账号为其子账号创建资源。 |
否 |
返回数据
此接口除了返回公共响应参数外,还返回以下参数。关于公共响应参数的更多信息,请参见前文内容。
| 参数 | 参数类型 | 描述 |
|---|---|---|
eips |
Array |
分配成功的公网 IP 列表 |
请求示例
https://api.<your_domain>/iaas/?action=AllocateEips
&bandwidth=2
&billing_mode=bandwidth
&eip_name=dev
&zone=pek3a
&COMMON_PARAMS
返回示例
{
"action":"AllocateEipsResponse",
"eips":["eip-j38f2h3h"]
"ret_code":0
}