POST zstack/v1/disk-offerings
Authorization: OAuth the-session-uuid
{
"params": {
"name": "diskOffering1",
"diskSize": 100.0,
"sortKey": 0.0
},
"systemTags": [],
"userTags": []
}
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X POST -d '{"params":{"name":"diskOffering1","diskSize":100.0,"sortKey":0.0}}' \
http://localhost:8080/zstack/v1/disk-offerings
Name | Type | Location | Description | Optional Value | Starting Version |
---|---|---|---|---|---|
name | String | body (contained in the params structure) | The resource name. | 0.6 | |
description | String | body (contained in the params structure) | Optional. The detailed description of the resource. | 0.6 | |
diskSize | long | body (contained in the params structure) | The volume size. | 0.6 | |
sortKey | int | body (contained in the params structure) | Optional. The sort key. | 0.6 | |
allocationStrategy | String | body (contained in the params structure) | Optional. The allocation strategy. |
| 0.6 |
type | String | body (contained in the params structure) | Optional. The type. | 0.6 | |
resourceUuid | String | body (contained in the params structure) | Optional. The resource UUID. | 0.6 | |
systemTags | List | body | Optional. The system tags. | 0.6 | |
userTags | List | body | Optional. The user tags. | 0.6 |
diskOfferingUserConfig::xxx
. Here, xxx must be a JSON string.{
"inventory": {
"uuid": "e7a865815cd34dd29812d335dc1019bf",
"name": "diskOffering1",
"diskSize": 100.0,
"state": "Enabled",
"type": "DefaultDiskOfferingType",
"allocatorStrategy": "DefaultPrimaryStorageAllocationStrategy"
}
}
Name | Type | Description | Starting Version |
---|---|---|---|
error | ErrorCode | The error code. If not null, the operation fails, or vice versa. For more information, see error. | 0.6 |
inventory | DiskOfferingInventory | See inventory. | 0.6 |
Name | Type | Description | Starting Version |
---|---|---|---|
code | String | The error code, which is a numbered or alphanumeric code that specifies an error. For example, SYS.1000, HOST.1001. | 0.6 |
description | String | The brief description of the error. | 0.6 |
details | String | The details about the error. | 0.6 |
elaboration | String | The reserved field. Default value: null. | 0.6 |
opaque | LinkedHashMap | The reserved field. Default value: null. | 0.6 |
cause | ErrorCode | The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null. | 0.6 |
Name | Type | Description | Starting Version |
---|---|---|---|
uuid | String | The resource UUID. | 0.6 |
name | String | The resource name. | 0.6 |
description | String | The detailed description of the resource. | 0.6 |
diskSize | Long | The volume size. | 0.6 |
sortKey | Integer | 0.6 | |
state | String | The state, including Enabled and Disabled. | 0.6 |
type | String | The type. | 0.6 |
createDate | Timestamp | The creation date. | 0.6 |
lastOpDate | Timestamp | The last operation date. | 0.6 |
allocatorStrategy | String | The allocator strategy. | 0.6 |
CreateDiskOfferingAction action = new CreateDiskOfferingAction();
action.name = "diskOffering1";
action.diskSize = 100.0;
action.sortKey = 0.0;
action.sessionId = "5c780b5178c0432b9f86a758c4c75ea1";
CreateDiskOfferingAction.Result res = action.call();
CreateDiskOfferingAction action = CreateDiskOfferingAction()
action.name = "diskOffering1"
action.diskSize = 100.0
action.sortKey = 0.0
action.sessionId = "f930e0f78ce948778c8c3f1cbcd0c4ec"
CreateDiskOfferingAction.Result res = action.call()
DELETE/v1/disk-offerings/{uuid}?deleteMode={deleteMode}
Authorization: OAuth the-session-uuid
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth e12cbd12fbd54afd96c463c093ce1ed9" \
-X DELETE http://localhost:8080/zstack/v1/disk-offerings/6313fb03124a4aa6b7f77d8d153c0bcb?deleteMode=Permissive
Name | Type | Location | Description | Optional Value | Starting Version |
---|---|---|---|---|---|
uuid | String | url | The resource UUID. | 0.6 | |
deleteMode | String | body | Optional. The delete mode. | 0.6 | |
systemTags | List | body | Optional. The system tags. | 0.6 | |
userTags | List | body | Optional. The user tags. | 0.6 |
{
"error": {
"code": "SYS.1001",
"description": "A message or a operation timeout",
"details": "Create VM on KVM timeout after 300s"
}
}
DeleteDiskOfferingAction action = new DeleteDiskOfferingAction();
action.uuid = "1d4e09f16c7c45abaab80be172b26cc1";
action.deleteMode = "Permissive";
action.sessionId = "1a31abeeef7e4ab5bc538168be6deb05";
DeleteDiskOfferingAction.Result res = action.call();
DeleteDiskOfferingAction action = DeleteDiskOfferingAction()
action.uuid = "4f0d2dc3a8f34685ad8543834bf4cfd8"
action.deleteMode = "Permissive"
action.sessionId = "dce93830769b427ca6edf3bda25f65f6"
DeleteDiskOfferingAction.Result res = action.call()
GET zstack/v1/disk-offerings
GET zstack/v1/disk-offerings/{uuid}
Authorization: OAuth the-session-uuid
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth d6550daa638547498b8075f3ebd1e240" \
-X GET http://localhost:8080/zstack/v1/disk-offerings?q=uuid=85c065f24d024bf3920766692da392eb
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth 3b32284bc5344692a8bc77a43610f460" \
-X GET http://localhost:8080/zstack/v1/disk-offerings/2f25294896e24c89b63edb7a209ebb85
Queryable Fields
You can check all queryable fields and resource names that can be queried across tables by using zstack-cli, entering QueryDiskOffering
, and pressing the Tab key.
{
"inventories": [
{
"uuid": "7bd03741125a48d485255601b639318b",
"name": "diskOffering1",
"diskSize": 100.0,
"state": "Enabled",
"type": "DefaultDiskOfferingType",
"allocatorStrategy": "DefaultPrimaryStorageAllocationStrategy"
}
]
}
Name | Type | Description | Starting Version |
---|---|---|---|
error | ErrorCode | The error code. If not null, the operation fails, or vice versa. For more information, see error. | 0.6 |
inventories | List | See inventories. | 0.6 |
Name | Type | Description | Starting Version |
---|---|---|---|
code | String | The error code, which is a numbered or alphanumeric code that specifies an error. For example, SYS.1000, HOST.1001. | 0.6 |
description | String | The brief description of the error. | 0.6 |
details | String | The details about the error. | 0.6 |
elaboration | String | The reserved field. Default value: null. | 0.6 |
opaque | LinkedHashMap | The reserved field. Default value: null. | 0.6 |
cause | ErrorCode | The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null. | 0.6 |
Name | Type | Description | Starting Version |
---|---|---|---|
uuid | String | The resource UUID. | 0.6 |
name | String | The resource name. | 0.6 |
description | String | The detailed description of the resource. | 0.6 |
diskSize | Long | The volume size. | 0.6 |
sortKey | Integer | 0.6 | |
state | String | The state, including Enabled and Disabled. | 0.6 |
type | String | The type. | 0.6 |
createDate | Timestamp | The creation date. | 0.6 |
lastOpDate | Timestamp | The last operation date. | 0.6 |
allocatorStrategy | String | The allocator strategy. | 0.6 |
QueryDiskOfferingAction action = new QueryDiskOfferingAction();
action.conditions = asList("uuid=e01b8a266d05425ba2d0c05308763db8");
action.sessionId = "d8a3f3b62d8c4affab7c5d491f95d4de";
QueryDiskOfferingAction.Result res = action.call();
QueryDiskOfferingAction action = QueryDiskOfferingAction()
action.conditions = ["uuid=a1f7f68522e64783a37095a862f9bc28"]
action.sessionId = "593740538236497183e065e1251b6937"
QueryDiskOfferingAction.Result res = action.call()
Email Us
contact@zstack.ioEmail Us
contact@zstack.ioThe download link is sent to your email address.
If you don't see it, check your spam folder, subscription folder, or AD folder. After receiving the email, click the URL to download the documentation.Thank you for using ZStack products and services.
Submit successfully.
We'll connect soon.Thank you for choosing ZStack products and services.