创建一块或多块硬盘,每块硬盘都可加载到任意一台主机中。
Request Parameters
| Parameter name | Type | Description | Required |
|---|---|---|---|
| size | Integer | 硬盘容量,目前可创建最小 10G,最大 500G 的硬盘, 在此范围内的容量值必须是 10 的倍数 | Yes |
| volume_name | String | 硬盘名称 | No |
| volume_type | Integer | 硬盘类型:
|
No |
| count | Integer | 创建硬盘的数量,默认是1 注解 每块硬盘的容量是相同的 |
No |
| target_user | String | 目标用户 ID ,可用于主账号为其子账号创建资源。 | No |
| zone | String | 区域 ID,注意要小写 | Yes |
Response Elements
| Name | Type | Description |
|---|---|---|
| action | String | 响应动作 |
| job_id | String | 执行任务的 Job ID |
| volumes | Array | 创建的硬盘 ID 列表 |
| ret_code | Integer | 执行成功与否,0 表示成功,其他值则为错误代码 |
Example
Example Request:
https://api.qingcloud.com/iaas/?action=CreateVolumes
&volume_name=demo
&size=20
&zone=pek1
&COMMON_PARAMS
Example Response:
{
"action":"CreateVolumesResponse",
"job_id":"j-bm6ym3r8",
"volumes":["vol-j38f2h3h"]
"ret_code":0
}