When ordering a replica
, we need to set the same items than ‘Primary’ and add a Storage Replication
item.
For example, we have anEndurance
with following configured items:
- Endurance Storage
- Block Storage
- 0.25 IOPS per GB
- 20 GB Storage Space
- 10 GB Storage Space (Snapshot Space)
To see these items through API using StorageId
, please execute the following:
https://[username]:[apikey]@api.softlayer.com/rest/v3/SoftLayer_Network_Storage/[storageId]/getBillingItem?objectMask=mask[id,orderItem[id,description,itemPrice.id,order[id,items]]]
Method: GET
Now, to order a replica
, we need to add item prices related to above listed items and add a Storage Replication
item according to chosen Location
.
This is an example to order a replica:
https://[username]:[apikey]@api.softlayer.com/rest/v3/SoftLayer_Product_Order/verifyOrder
Note:
Please change “verifyOrder” to “placeOrder” when your order is ready.
In my case, the location chosen is `PARIS`
Method: POST
Json Payload:
{
"parameters": [
{
"location": "PARIS",
"packageId": 240,
"complexType": "SoftLayer_Container_Product_Order_Network_Storage_Enterprise",
"originVolumeId": 6465511,
"originVolumeScheduleId": 33641,
"osFormatType": {
"id": 12,
"keyName": "LINUX"
},
"prices": [
{
"id": 147099 # 20 GB Storage Space (Storage Replication)
},
{
"id": 45058 # Endurance Storage
},
{
"id": 45068 # 0.25 IOPS per GB (Storage Tier Level)
},
{
"id": 45098 # Block Storage
},
{
"id": 144009 # 20 GB Storage Space (Storage Space)
},
{
"id": 143449 # 10 GB Storage Space (Storage Snapshot Space)
}
],
"quantity": 1
}
]
}
To get valid prices according to Endurance package
(packageId = 240), please execute:
https://[username]:[apikey]@api.softlayer.com/rest/v3/SoftLayer_Product_Package/240/getItemPrices?objectMask=mask[id,locationGroupId,item[id,keyName,description],pricingLocationGroup[locations[id, name, longName]]]
Method: GET
Some References:
Location-based-Pricing-and-You
SoftLayer_Product_Order
SoftLayer_Network_Storage:getBillingItem
How to fetch LocationID, Storage Package ID, Storage Size ID and SnapShot Space Size ID for placing order in Endurance Storage
I hope this information help you.