创建一个云硬盘类型
功能介绍
创建一个卷类型。
URI
POST ``/v2/{tenant_id}/types
参数 |
是否必选 |
描述 |
tenant_id |
是 |
项目id。 |
请求消息
参数 |
参数类型 |
是否必选 |
描述 |
name |
String |
是 |
云硬盘类型的名字。 |
os-volume-type-access:is_public |
boolean |
否 |
可供公众访问的云硬盘类型。 |
description |
String |
否 |
云硬盘类型的描述。 |
extra_specs |
object |
否 |
包含云硬盘类型规范的一组键和值对。 |
请求示例
示例一:创建一个云硬盘类型
{
"volume_type": {
"name": "type-001",
"os-volume-type-access:is_public": false,
"description": "1234"
}
}
响应消息
参数 |
参数类型 |
描述 |
is_public |
boolean |
可供公众访问的云硬盘类型。 |
extra_specs |
object |
包含云硬盘类型规范的一组键和值对。 |
description |
String |
云硬盘类型的描述或为空。 |
name |
String |
云硬盘类型的名称。 |
id |
String |
云硬盘类型的id.。 |
响应示例
{
"volume_type": {
"name": "type-001",
"extra_specs": {},
"os-volume-type-access:is_public": true,
"is_public": true,
"id": "ca0c3ff5-f683-4d36-8369-23ffb26dcc18",
"description": "1234"
}
}
列举云硬盘类型
功能介绍
列举云硬盘类型。
URI
GET ``/v2/{tenant_id}/types
参数 |
是否必选 |
描述 |
tenant_id |
是 |
项目id。 |
请求消息
参数 |
参数类型 |
是否必选 |
描述 |
limit |
integer |
否 |
查询的最大个数限制 |
marker |
String |
否 |
最后一项的ID。 |
sort_key |
String |
否 |
按照云硬盘类型属性排序。 |
sort_dir |
String |
否 |
排序方向。 |
响应消息
参数 |
参数类型 |
描述 |
name |
String |
云硬盘类型的名字。 |
qos_specs_id |
String |
qos规则的id。 |
extra_specs |
object |
包含云硬盘类型规范的一组键和值对。 |
os-volume-type-access:is_public |
boolean |
可供公众访问的云硬盘类型。 |
is_public |
boolean |
可供公众访问的云硬盘类型。 |
id |
String |
云硬盘类型的id。 |
description |
String |
云硬盘类型的描述信息。 |
响应示例
{
"volume_types": [
{
"name": "type-0017",
"qos_specs_id": null,
"extra_specs": {},
"os-volume-type-access:is_public": true,
"is_public": true,
"id": "8f956ca3-c495-4725-8f5f-0cb96c95283b",
"description": "1234"
},
{
"name": "type-0016",
"qos_specs_id": null,
"extra_specs": {},
"os-volume-type-access:is_public": true,
"is_public": true,
"id": "3b58a18e-2e05-4642-bf9a-2cca38b50f5c",
"description": "1234"
}
]
}
显示指定云硬盘类型的详细信息
功能介绍
显示指定云硬盘类型的详细信息。
URI
GET /v2/{tenant_id}/types/{volume_type_id}
参数 |
是否必选 |
描述 |
tenant_id |
是 |
项目id。 |
volume_type_id |
是 |
云硬盘类型的id。 |
响应消息
参数 |
参数类型 |
描述 |
name |
String |
云硬盘类型的名字。 |
qos_specs_id |
String |
qos规则的id。 |
extra_specs |
object |
包含云硬盘类型规范的一组键和值对。 |
os-volume-type-access:is_public |
boolean |
可供公众访问的云硬盘类型。 |
is_public |
boolean |
可供公众访问的云硬盘类型。 |
id |
String |
云硬盘类型的id。 |
description |
String |
云硬盘类型的描述信息。 |
响应示例
{
"volume_type": {
"name": "hdd",
"qos_specs_id": null,
"extra_specs": {
"volume_backend_name": "hdd"
},
"os-volume-type-access:is_public": true,
"is_public": true,
"id": "3fee7fb7-079a-4902-88ce-fdcfe0eb5022",
"description": null
}
}
更新云硬盘类型
功能介绍
更新一个云硬盘类型。
URI
PUT /v2/{tenant_id}/types/{volume_type_id}
参数 |
是否必选 |
描述 |
tenant_id |
是 |
项目id。 |
volume_type_id |
是 |
云硬盘类型的id。 |
请求消息
参数 |
参数类型 |
是否必选 |
描述 |
name |
String |
否 |
云硬盘类型的名称。 |
description |
String |
否 |
云硬盘类型的描述。 |
is_public |
boolean |
否 |
可供公众访问的云硬盘类型。 |
请求示例
{
"volume_type": {
"name": "update_type1",
"description": "update_des1",
"is_public": false
}
}
响应消息
参数 |
参数类型 |
描述 |
name |
String |
云硬盘类型的名字。 |
extra_specs |
object |
包含云硬盘类型规范的一组键和值对。 |
is_public |
boolean |
可供公众访问的云硬盘类型。 |
id |
String |
云硬盘类型的id。 |
description |
String |
云硬盘类型的描述信息。 |
响应示例
{
"volume_type": {
"is_public": false,
"extra_specs": {},
"id": "3b58a18e-2e05-4642-bf9a-2cca38b50f5c",
"name": "update_type1",
"description": "update_des1"
}
}
删除云硬盘类型
功能介绍
删除一个云硬盘类型。
URI
DELETE /v2/{tenant_id}/types/{volume_type_id}
参数 |
是否必选 |
描述 |
tenant_id |
是 |
项目id。 |
volume_type_id |
是 |
云硬盘类型的id。 |