开启实例公网入口
功能介绍
开启实例开启公网入口,仅当实例为ELB类型时支持
调用方法
请参见如何调用API。
URI
POST /v2/{project_id}/apigw/instances/{instance_id}/ingress-eip
| 参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
| project_id | 是 | String | 项目ID,获取方式请参见获取项目ID。 |
| instance_id | 是 | String | 实例ID,在API网关控制台的“实例信息”中获取。 |
请求参数
| 参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
| X-Auth-Token | 是 | String | 用户Token。通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 |
| 参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
| bandwidth_size | 否 | Integer | 入公网带宽 单位:Mbit/s |
| bandwidth_charging_mode | 否 | String | 入公网带宽计费类型:
缺省值:bandwidth 枚举值:
|
响应参数
状态码: 202
| 参数 | 参数类型 | 描述 |
|---|---|---|
| instance_id | String | 实例ID |
| message | String | 公网入口变更的任务信息 |
| job_id | String | 任务编号 |
状态码: 400
| 参数 | 参数类型 | 描述 |
|---|---|---|
| error_code | String | 错误码 |
| error_msg | String | 错误描述 |
状态码: 401
| 参数 | 参数类型 | 描述 |
|---|---|---|
| error_code | String | 错误码 |
| error_msg | String | 错误描述 |
状态码: 403
| 参数 | 参数类型 | 描述 |
|---|---|---|
| error_code | String | 错误码 |
| error_msg | String | 错误描述 |
状态码: 404
| 参数 | 参数类型 | 描述 |
|---|---|---|
| error_code | String | 错误码 |
| error_msg | String | 错误描述 |
状态码: 500
| 参数 | 参数类型 | 描述 |
|---|---|---|
| error_code | String | 错误码 |
| error_msg | String | 错误描述 |
请求示例
开启实例的公网入口
{
"bandwidth_size" : 5,
"bandwidth_charging_mode" : "traffic"
} 响应示例
状态码: 202
Accepted
{
"instance_id" : "6a7d71827fd54572b1f31aa9548fcc81",
"message" : "JOB_ASSIGNED_FOR_UPDATE_0077I:The job JOB-a7c1241c33334490a3fdcd11102bcbda is assigned to the instance 6a7d71827fd54572b1f31aa9548fcc81 for running updating",
"job_id" : "JOB-a7c1241c33334490a3fdcd11102bcbda"
} 状态码: 400
Bad Request
{
"error_code" : "APIC.9210",
"error_msg" : "create cloud nat eip failed"
} 状态码: 401
Unauthorized
{
"error_code" : "APIC.7102",
"error_msg" : "Incorrect token or token resolution failed"
} 状态码: 403
Forbidden
{
"error_code" : "APIC.7106",
"error_msg" : "No permissions to request for the method"
} 状态码: 404
Not Found
{
"error_code" : "APIC.7302",
"error_msg" : "Instance not found"
} 状态码: 500
Internal Server Error
{
"error_code" : "APIC.9000",
"error_msg" : "Failed to request internal service"
} 状态码
| 状态码 | 描述 |
|---|---|
| 202 | Accepted |
| 400 | Bad Request |
| 401 | Unauthorized |
| 403 | Forbidden |
| 404 | Not Found |
| 500 | Internal Server Error |
错误码
请参见错误码。