SyncPrimaryStorageCapacity
API Request
URLs
PUT zstack/v1/primary-storage/{primaryStorageUuid}/actionsHeaders
Authorization: OAuth the-session-uuidBody
Note: In the example above, systemTags and userTags fields can be omitted. They are listed to indicate that the body can contain these two fields.
{
"syncPrimaryStorageCapacity": {},
"systemTags": [],
"userTags": []
}
Note: In the example above, systemTags and userTags fields can be omitted. They are listed to indicate that the body can contain these two fields.Curl Example
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X PUT -d '{"syncPrimaryStorageCapacity":{}}' \
http://localhost:8080/zstack/v1/primary-storage/36ad940fe805304b85ca8af209b044b5/actionsParameter List
| Name | Type | Location | Description | Allowed Values | Starting Version |
|---|---|---|---|---|---|
| primaryStorageUuid | String | url | Data Storage UUID | 0.6 | |
| systemTags (Optional) | List | body | System Tags | 0.6 | |
| userTags (Optional) | List | body | User Tags | 0.6 |
API Response
Response Example
{
"inventory": {
"name": "PS1",
"url": "/Cloud_ps",
"availableCapacity": 9.73078528E8,
"availablePhysicalCapacity": 9.73078528E8,
"type": "LocalStorage",
"state": "Enabled",
"status": "Connected",
"attachedClusterUuids": [
"06b22ab47bb74d2d97dba43ccdde8b9a"
]
}
}#error
| Name | Type | Description | Starting Version |
|---|---|---|---|
| code | String | Error code number, a globally unique identifier for the error, for example SYS.1000, HOST.1001 | 0.6 |
| description | String | Brief description of the error | 0.6 |
| details | String | Detailed error information | 0.6 |
| elaboration | String | Reserved field, defaults to null | 0.6 |
| opaque | LinkedHashMap | Reserved field, defaults to null | 0.6 |
| cause | ErrorCode | Root cause, the source error that caused the current error. If there is no original error, this field is null | 0.6 |
#inventory
| Name | Type | Description | Starting Version |
|---|---|---|---|
| uuid | String | Resource UUID, uniquely identifies the resource | 0.6 |
| zoneUuid | String | Data Center UUID | 0.6 |
| name | String | Resource Name | 0.6 |
| url | String | The URL. | 0.6 |
| description | String | Resource Description | 0.6 |
| totalCapacity | Long | The total capacity. | 0.6 |
| availableCapacity | Long | The available capacity. | 0.6 |
| totalPhysicalCapacity | Long | The total physical capacity. | 0.6 |
| availablePhysicalCapacity | Long | The available physical capacity. | 0.6 |
| systemUsedCapacity | Long | The system used capacity. | 0.6 |
| type | String | The resource type. | 0.6 |
| state | String | The resource state. | 0.6 |
| status | String | The resource status. | 0.6 |
| mountPath | String | The mount path. | 0.6 |
| createDate | Timestamp | Create Time | 0.6 |
| lastOpDate | Timestamp | Last Modification Time | 0.6 |
| attachedClusterUuids | List | The attached cluster UUIDs. | 0.6 |
SDK Examples
Java
SDK
SyncPrimaryStorageCapacityAction action = new SyncPrimaryStorageCapacityAction();
action.primaryStorageUuid = "42508a6dbeb24968b4fd7c7a1f4f6859";
action.sessionId = "bd1b393d64bd424c848cc2760c7aef0f";
SyncPrimaryStorageCapacityAction.Result res = action.call();Python
SDK
SyncPrimaryStorageCapacityAction action = SyncPrimaryStorageCapacityAction()
action.primaryStorageUuid = "695578d15cc04f2a84585deab75d29c7"
action.sessionId = "fdead04edbc741f99c826afc6db003a9"
SyncPrimaryStorageCapacityAction.Result res = action.call()