如何获取在Softlayer上订购的所有磁盘的列表

时间:2019-03-21 05:28:50

标签: ibm-cloud-infrastructure ibm-cloud-storage

我正在尝试准备一份报告,其中包含在软层上为某个帐户订购的所有存储。是否有API可以检索相同的内容?

1 个答案:

答案 0 :(得分:0)

要列出一个帐户在SoftLayer上的所有存储,可以使用以下rest调用示例:

方法:GET

https://[username]:[apiKey]@api.softlayer.com/rest/v3/SoftLayer_Account/getNetworkStorage?objectMask=mask[id,username,capacityGb,guestId,hardwareId,hostId,nasType,storageType]

此请求将向您显示所有网络存储,例如:块存储(耐用性,性能),文件存储(耐用性,性能),对象存储,Evault备份。

注意:考虑到Evault Backup项目是连接到虚拟服务器的其他类型的存储,它们能够确保您的数据安全地存储在设备外部,并在丢失时受到保护({{3} }。

如果要单独检索网络存储,例如块存储,文件存储,您可以使用对象过滤器运行以下rest调用示例:

块存储(“ nasType”:“ ISCSI”)

方法:GET

https://[username]:[apiKey]@api.softlayer.com/rest/v3/SoftLayer_Account/getNetworkStorage?objectMask=mask[id,username,capacityGb,guestId,hardwareId,hostId,nasType,storageType]&objectFilter={"networkStorage": {"nasType": {"operation": "ISCSI"}}}

文件存储(“ nasType”:“ NAS”)

方法:GET

https://[username]:[apiKey]@api.softlayer.com/rest/v3/SoftLayer_Account/getNetworkStorage?objectMask=mask[id,username,capacityGb,guestId,hardwareId,hostId,nasType,storageType]&objectFilter={"networkStorage": {"nasType": {"operation": "NAS"}}}

对象存储(“ nasType”:“ HUB”)

方法:GET

https://[username]:[apiKey]@api.softlayer.com/rest/v3/SoftLayer_Account/getNetworkStorage?objectMask=mask[id,username,capacityGb,guestId,hardwareId,hostId,nasType,storageType]&objectFilter={"networkStorage": {"nasType": {"operation": "HUB"}}}

参考:

IBM Cloud Backup

或者您可以对每个存储选项使用以下特定方法:

https://sldn.softlayer.com/reference/services/SoftLayer_Account/getNetworkStorage/ https://sldn.softlayer.com/reference/services/SoftLayer_Account/getHubNetworkStorage/ https://sldn.softlayer.com/reference/services/SoftLayer_Account/getIscsiNetworkStorage/