主题
VPC管理
VPC列表
| 项目 | 内容 |
|---|---|
| 接口描述 | VPC列表 |
| 接口地址 | /console/v1/vpc |
| 请求方式 | GET |
| 接口版本 | v1 |
请求参数
无
响应参数
| name | type | default | desc |
|---|---|---|---|
| list | array | - | 数据中心列表 |
| list[].country | string | - | 国家 |
| list[].country_code | string | - | 国家代码 |
| list[].city | string | - | 城市 |
| list[].area | string | - | 区域 |
| list[].vpc | array | - | VPC |
| list[].vpc[].id | string | - | VPCID |
| list[].vpc[].name | string | - | VPC名称 |
| list[].vpc[].ip | string | - | IP |
| list[].vpc[].host_num | int | - | 实例数量 |
| list[].vpc[].create_time | int | - | 创建时间 |
添加VPC
| 项目 | 内容 |
|---|---|
| 接口描述 | 添加VPC |
| 接口地址 | /console/v1/vpc |
| 请求方式 | POST |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| data_center_id | int | - | required | 云模块数据中心ID |
| name | string | - | required | 名称 |
| ip | string | - | 不是自动创建IP时需要传,IP地址/掩码,内网IP | IP |
| auto_create_ip | int | - | required | 是否自动创建IP,0:否1:是 |
响应参数
无
修改VPC
| 项目 | 内容 |
|---|---|
| 接口描述 | 修改VPC |
| 接口地址 | /console/v1/vpc/:id |
| 请求方式 | PUT |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| id | int | - | required | VPCID |
| name | string | - | required | 名称 |
响应参数
无
删除VPC
| 项目 | 内容 |
|---|---|
| 接口描述 | 删除VPC |
| 接口地址 | /console/v1/vpc/:id |
| 请求方式 | DELETE |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| id | int | - | required | VPCID |
响应参数
无