调用CreateStorageVolume创建卷。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
ens:CreateStorageVolume |
create |
*全部资源
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| GatewayId |
string |
是 |
网关 ID。 |
sgw-**** |
| StorageId |
string |
是 |
存储介质 ID。 |
si-**** |
| EnsRegionId |
string |
是 |
节点 ID。 |
cn-shenzhen-3 |
| IsEnable |
string |
否 |
是否启用。取值:
|
1 |
| IsAuth |
string |
否 |
是否启用鉴权。取值:
|
0 |
| AuthProtocol |
string |
否 |
鉴权协议。取值:CHAP。当前仅支持 CHAP 协议。 |
CHAP |
| AuthUser |
string |
否 |
CHAP 协议用户名。 |
User |
| AuthPassword |
string |
否 |
CHAP 协议密码。 |
Password |
| VolumeName |
string |
否 |
卷的显示名称。长度为 2~128 个英文或中文字符。不能以 |
testVolumeName |
| Description |
string |
否 |
卷的描述。长度为 2~256 个英文或中文字符。不能以 |
testDescription |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
Schema of Response |
||
| RequestId |
string |
请求 ID。 |
7030AB96-57CF-1C68-9FEE-D60E547FD79C |
| VolumeId |
array |
卷 ID 数组。 |
|
|
string |
创建卷的 ID。 |
["sv-***"] |
示例
正常返回示例
JSON格式
{
"RequestId": "7030AB96-57CF-1C68-9FEE-D60E547FD79C",
"VolumeId": [
"[\"sv-***\"]"
]
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | OrderFailed | 订单失败 | |
| 400 | SaleControl.VerificationFailed | You did not pass the salecontrol verification.Please contact the product. | 创建资源的时候没有通过资源的售卖约束校验 |
| 400 | ERROR_VOLUME_STORAGE_STATUS | The cloud disk cannot be operated | |
| 400 | ERROR_VOLUME_STORAGE_BINDED | The cloud disk has been bound | |
| 400 | ERROR_VOLUME_PROTOCOL | The wrong protocol | |
| 400 | ERROR.STORAGE.BINDED | The storageId has been bound. | 指定的存储设备(如云盘ID)已经被绑定,暂不支持批操作。 |
| 400 | ens.interface.error | Failed to call API. | 接口调用发生异常。 |
| 400 | NoPermission | Permission denied. | |
| 400 | InvalidParameter.%s | The specified field %s invalid. Please check it again. |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。