如何使用Softlayer Rest API从快照创建重复的块存储 [英] How to create duplicate block storage from snapshot using Softlayer rest api
问题描述
我已经创建了快照,但是无法从快照创建块存储.我们找不到任何Api文件.有人可以帮助我
I have created snapshot but unable to create block storage from snapshot. We cant find any Api document. Anyone help me on this request
推荐答案
尝试使用以下slcli命令订购重复的卷:
Try using the following slcli command to order a duplicate volume:
slcli block volume-duplicate --origin-snapshot-id 11111 --billing monthly 22222
将11111替换为您的快照ID,将22222替换为您的卷ID.
Replace 11111 for your snapshot id and 22222 for your volume id.
要获取卷的快照ID列表,可以使用以下命令:
To get the list of the snapshot ids for your volume you can use the following command:
slcli block snapshot-list 1234
将1234替换为您的卷ID.
Replace 1234 for your volume id.
您也可以通过rest呼叫订购重复的卷,请参见以下示例:
You can order a duplicate volume through rest call too see the below example:
方法:开机自检
https://[username]:[apiKey]@api.softlayer.com/rest/v3.1/SoftLayer_Product_Order/verifyOrder
身体:杰森
{"parameters": [{
"complexType":"SoftLayer_Container_Product_Order_Network_Storage_AsAService",
"packageId": 759,
"location":449600,
"quantity": 1,
"prices": [
{ "id": 225129,
"item": {
"id": 13215,
"description": "Storage space for 2 IOPS per GB"
}},
{ "id": 192043,
"item": {
"id": 5938,
"description": "0.25 IOPS per GB"
}},
{"id": 192473,
"item": {
"id": 5130,
"description": "20 GB Storage Space"
}},
{"id":189433,
"item": {
"id": 9571,
"description": "Storage as a Service"
}},
{"id":189443,
"item": {
"id": 5944,
"description": "Block Storage"
}}],
"useHourlyPricing": false,
"duplicateOriginSnapshotId": 11111,
"duplicateOriginVolumeId": 22222,
"osFormatType": {
"id":12,
"keyName":"LINUX"
},
"volumeSize": 16000
}
]}
将11111替换为您的快照ID,将22222替换为您的卷ID.
Replace 11111 for your snapshot id and 22222 for your volume id.
这篇关于如何使用Softlayer Rest API从快照创建重复的块存储的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!