DELETE zstack/v1/backup-storage/{uuid}?deleteMode={deleteMode}
Authorization: OAuth the-session-uuid
curl -H "Content-Type: application/json;charset=UTF-8" \ -H "Authorization: OAuth 3cb9fd3d9fad4f64b62086b1aeabf42a" \ -X DELETE http://localhost:8080/zstack/v1/backup-storage/12b157dc061a46739168b6e87bf2657f?deleteMode=Permissive
名字 | 类型 | 位置 | 描述 | 可选值 | 起始版本 |
---|---|---|---|---|---|
uuid | String | url | 资源的UUID,唯一标示该资源 | 0.6 | |
deleteMode (可选) | String | body | 删除模式(Permissive 或者 Enforcing, 默认 Permissive) | 0.6 | |
systemTags (可选) | List | body | 系统标签 | 0.6 | |
userTags (可选) | List | body | 用户标签 | 0.6 |
{}
,出错时返回的JSON结构包含一个error字段,例如:{ "error": { "code": "SYS.1001", "description": "A message or a operation timeout", "details": "Create VM on KVM timeout after 300s" } }
SDK示例
DeleteBackupStorageAction action = new DeleteBackupStorageAction(); action.uuid = "1c8acbc2af8445a5b631350276787580"; action.deleteMode = "Permissive"; action.sessionId = "4caf9cc241604dbca3088779d6772dbe"; DeleteBackupStorageAction.Result res = action.call();
DeleteBackupStorageAction action = DeleteBackupStorageAction() action.uuid = "06473459fd474a26bb1d79e2edd004f3" action.deleteMode = "Permissive" action.sessionId = "a6fead8970fe45cfa6ba92e7dcf08d66" DeleteBackupStorageAction.Result res = action.call()
GET zstack/v1/backup-storage GET zstack/v1/backup-storage/{uuid}
Authorization: OAuth the-session-uuid
curl -H "Content-Type: application/json;charset=UTF-8" \ -H "Authorization: OAuth dce9c25b65254343b0f9a568a661f348" \ -X GET http://localhost:8080/zstack/v1/backup-storage?q=uuid=435e61f882cf431bb4ae48246489a988
curl -H "Content-Type: application/json;charset=UTF-8" \ -H "Authorization: OAuth fe9a6571fc9949e7a0d31d94fae9b87c" \ -X GET http://localhost:8080/zstack/v1/backup-storage/1ab3b836a88342e1bbc1b1a17d092f0f
可查询字段
运行CLI命令行工具,输入QueryBackupStorage并按Tab键查看所有可查询字段以及可跨表查询的资源名。
{ "inventories": [ { "attachedZoneUuids": [ "140ebc2fbdb74ae197323a69d432f25e" ], "availableCapacity": 4931431059456, "createDate": "Apr 11, 2018 2:50:54 PM", "description": "", "hostname": "172.20.1.115", "lastOpDate": "Dec 13, 2019 7:32:49 PM", "name": "image-store", "sshPort": 22, "state": "Enabled", "status": "Connected", "totalCapacity": 9992857976832, "type": "ImageStoreBackupStorage", "url": "/zstack_imagestore", "username": "root", "uuid": "1ab3b836a88342e1bbc1b1a17d092f0f" } ], "success": true }
返回示例(分布式镜像仓库){ "inventories": [ { "attachedZoneUuids": [ "195ae9157b9248e3889cc56cfd7d0f8d" ], "availableCapacity": 297500737536, "createDate": "Dec 14, 2019 9:46:05 AM", "description": "Test", "fsid": "d53902bc-ff50-4d08-8769-9d83448478d3", "lastOpDate": "Dec 14, 2019 11:30:40 AM", "mons": [ { "backupStorageUuid": "eed424abee694bcda5a5e414a61ea3d3", "createDate": "Dec 14, 2019 9:46:05 AM", "hostname": "172.24.249.174", "lastOpDate": "Dec 14, 2019 11:21:46 AM", "monAddr": "172.24.249.174", "monPort": 6789, "monUuid": "e6707015afc8405ba0b184ca7a318b63", "sshPassword": "password", "sshPort": 22, "sshUsername": "root", "status": "Connected" }, { "backupStorageUuid": "eed424abee694bcda5a5e414a61ea3d3", "createDate": "Dec 14, 2019 9:46:05 AM", "hostname": "172.24.252.188", "lastOpDate": "Dec 14, 2019 11:21:45 AM", "monAddr": "172.24.252.188", "monPort": 6789, "monUuid": "d5e70424ddac4c03ab06466d600ef4ae", "sshPassword": "password", "sshPort": 22, "sshUsername": "root", "status": "Connected" }, { "backupStorageUuid": "eed424abee694bcda5a5e414a61ea3d3", "createDate": "Dec 14, 2019 9:46:05 AM", "hostname": "172.24.247.108", "lastOpDate": "Dec 14, 2019 11:21:16 AM", "monAddr": "172.24.247.108", "monPort": 6789, "monUuid": "378826f5f690480983f39514e0b00f75", "sshPassword": "password", "sshPort": 22, "sshUsername": "root", "status": "Connected" } ], "name": "ceph-bs", "poolAvailableCapacity": 99166913877, "poolName": "bak-t-eed424abee694bcda5a5e414a61ea3d3", "poolReplicatedSize": 3, "poolUsedCapacity": 2787687082, "state": "Enabled", "status": "Connected", "totalCapacity": 305863802880, "type": "Ceph", "url": "not used", "uuid": "eed424abee694bcda5a5e414a61ea3d3" } ], "success": true }
名字 | 类型 | 描述 | 起始版本 |
---|---|---|---|
error | ErrorCode | 错误码,若不为null,则表示操作失败, 操作成功时该字段为null。 详情参考error | 0.6 |
inventories | List | 详情参考inventories | 0.6 |
名字 | 类型 | 描述 | 起始版本 |
---|---|---|---|
code | String | 错误码号,错误的全局唯一标识,例如SYS.1000, HOST.1001 | 0.6 |
description | String | 错误的概要描述 | 0.6 |
details | String | 错误的详细信息 | 0.6 |
elaboration | String | 保留字段,默认为null | 0.6 |
opaque | LinkedHashMap | 保留字段,默认为null | 0.6 |
cause | ErrorCode | 根错误,引发当前错误的源错误,若无原错误,该字段为null | 0.6 |
名字 | 类型 | 描述 | 起始版本 |
---|---|---|---|
uuid | String | 资源的UUID,唯一标示该资源 | 0.6 |
name | String | 资源名称 | 0.6 |
url | String | 0.6 | |
description | String | 资源的详细描述 | 0.6 |
totalCapacity | Long | 0.6 | |
availableCapacity | Long | 0.6 | |
type | String | 0.6 | |
state | String | 0.6 | |
status | String | 0.6 | |
createDate | Timestamp | 创建时间 | 0.6 |
lastOpDate | Timestamp | 最后一次修改时间 | 0.6 |
attachedZoneUuids | List | 0.6 |
QueryBackupStorageAction action = new QueryBackupStorageAction(); action.conditions = asList("uuid=b8e17834373747ae8b6555db80e74586"); action.sessionId = "f5d478c4facf42f4a3f16c8efbfd9628"; QueryBackupStorageAction.Result res = action.call();
QueryBackupStorageAction action = QueryBackupStorageAction() action.conditions = ["uuid=0359113913834277bc815b446a6eff25"] action.sessionId = "dc56b36c279f449ea2d430d2513a4cb0" QueryBackupStorageAction.Result res = action.call()
学习路径
ZStack Cloud 产品学习路径
快速梳理文档,点击相应文本链接,快速跳转到相应文档的页面,学习 ZStack Cloud 产品。
业务咨询:
400-962-2212 转 1售后咨询:
400-962-2212 转 2其他(漏洞提交、投诉举报等)
400-962-2212 转 3业务咨询:
400-962-2212 转 1ZStack学院:
training@zstack.io业务咨询:
400-962-2212 转 1售后咨询:
400-962-2212 转 2其他(漏洞提交、投诉举报等)
400-962-2212 转 3业务咨询:
400-962-2212 转 1售后咨询:
400-962-2212 转 2其他(漏洞提交、投诉举报等)
400-962-2212 转 3业务咨询:
400-962-2212 转 1商务联系:
channel@zstack.io业务咨询:
400-962-2212 转 1商务联系:
channel@zstack.io下载链接已发送至您的邮箱。
如未收到,请查看您的垃圾邮件、订阅邮件、广告邮件。 当您收到电子邮件后,请点击 URL 链接,以完成下载。感谢您使用 ZStack 产品和服务。
成功提交申请。
我们将安排工作人员尽快与您取得联系。感谢您使用 ZStack 产品和服务。
信息提交成功。
我们将安排工作人员尽快与您取得联系,请保持电话畅通。感谢您使用 ZStack 产品和服务。
商务咨询:
400-962-2212 转 1售后咨询:
400-962-2212 转 2商务联系:
sales@zstack.io成功提交申请。
我们将安排工作人员尽快与您取得联系。感谢您使用 ZStack 产品和服务。