修改存储库
功能介绍
根据存储库ID修改存储库
URI
PUT /v3/{project_id}/vaults/{vault_id}
| 参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
| project_id | 是 | String | 项目ID |
| vault_id | 是 | String | 存储库ID |
请求参数
| 参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
| X-Auth-Token | 是 | String | 用户Token。 通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 |
| 参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
| vault | 是 | VaultUpdate object | 存储库修改参数体 |
| 参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
| billing | 否 | BillingUpdate object | 账单信息 |
| name | 否 | String | 存储库名称 最小长度:1 最大长度:64 |
| auto_bind | 否 | Boolean | 是否支持自动挂载 |
| bind_rules | 否 | VaultBindRules object | |
| auto_expand | 否 | Boolean | 是否自动扩容。按需存储库支持自动扩容,包周期存储库不支持扩容。 |
响应参数
状态码: 200
| 参数 | 参数类型 | 描述 |
|---|---|---|
| vault | Vault object | 存储库查询返回对象 |
| 参数 | 参数类型 | 描述 |
|---|---|---|
| billing | Billing object | 运营信息 |
| description | String | 存储库自定义描述信息。 最小长度:0 最大长度:255 |
| id | String | 保管库ID |
| name | String | 保管库名称 最小长度:1 最大长度:64 |
| project_id | String | 项目ID |
| provider_id | String | 保管库类型 |
| resources | Array of ResourceResp objects | 存储库资源 |
| tags | Array of Tag objects | 存储库标签 |
| enterprise_project_id | String | 企业项目id,默认为‘0’。 |
| auto_bind | Boolean | 是否自动绑定,默认为false,不支持。 |
| bind_rules | VaultBindRules object | 绑定规则 |
| user_id | String | 用户id |
| created_at | String | 创建时间,例如:"2020-02-05T10:38:34.209782" |
| auto_expand | Boolean | 是否开启存储库自动扩容能力(只支持按需存储库)。 |
| 参数 | 参数类型 | 描述 |
|---|---|---|
| allocated | Integer | 已分配容量,单位MB |
| charging_mode | String | 创建模式 枚举值:
|
| cloud_type | String | 云平台 枚举值:
|
| consistent_level | String | |
| object_type | String | 对象类型 枚举值:
|
| order_id | String | 订单ID |
| product_id | String | 产品ID |
| protect_type | String | 保护类型 枚举值:
|
| size | Integer | 容量,单位GB 最小值:1 最大值:10485760 |
| spec_code | String | 规格编码 枚举值:
|
| status | String | 保管库状态 枚举值:
|
| storage_unit | String | 存储库桶名 |
| used | Integer | 已使用容量,单位MB |
| frozen_scene | String | 冻结场景 |
| 参数 | 参数类型 | 描述 |
|---|---|---|
| extra_info | ResourceExtraInfo object | 资源附加信息 |
| id | String | 待备份资源id |
| name | String | 待备份资源名称 最小长度:0 最大长度:255 |
| protect_status | String | 保护状态 枚举值:
|
| size | Integer | 资源已分配容量,单位为GB |
| type | String | |
| backup_size | Integer | 副本大小 |
| backup_count | Integer | 副本数量 |
| 参数 | 参数类型 | 描述 |
|---|---|---|
| exclude_volumes | Array of strings | 需要排除备份的卷id。仅虚拟机磁盘级备份有效 |
| include_volumes | Array of ResourceExtraInfoIncludeVolumes objects | 要备份的卷 |
请求示例
PUT https://{endpoint}/v3/f841e01fd2b14e7fa41b6ae7aa6b0594/vaults/79bd9daa-884f-4f84-b8fe-235d58cd927d
{
"vault" : {
"billing" : {
"size" : 200
},
"name" : "vault_name02"
}
} 响应示例
状态码: 200
OK
{
"vault" : {
"name" : "vault_name02",
"billing" : {
"status" : "available",
"used" : 0,
"protect_type" : "backup",
"object_type" : "server",
"allocated" : 40,
"spec_code" : "vault.backup.server.normal",
"size" : 200,
"cloud_type" : "public",
"consistent_level" : "crash_consistent",
"charging_mode" : "post_paid"
},
"tags" : [ {
"value" : "value01",
"key" : "key01"
} ],
"created_at" : "2019-05-08T09:31:21.840431",
"project_id" : "4229d7a45436489f8c3dc2b1d35d4987",
"enterprise_project_id" : "0",
"id" : "2402058d-8373-4b0a-b848-d3c0dfdc71a8",
"resources" : [ {
"name" : "ecs-1f0f-0003",
"protect_status" : "available",
"extra_info" : {
"exclude_volumes" : [ "bdef09bb-293f-446a-88a4-86e9f14408c4" ]
},
"type" : "OS::Nova::Server",
"id" : "97595625-198e-4e4d-879b-9d53f68ba551",
"size" : 40
} ],
"description" : "vault_description"
}
} 状态码
| 状态码 | 描述 |
|---|---|
| 200 | OK |
错误码
请参见错误码。