DetachPrimaryStorageFromCluster
API Request
URLs
DELETE/v1/clusters/{clusterUuid}/primary-storage/{primaryStorageUuid}Headers
Authorization: OAuth the-session-uuidCurl
Sample
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth d4e0a29dc5d94c9ca378b56c1eb538d7" \
-X DELETE http://localhost:8080/zstack/v1/clusters/d4ff9ff0511b4848870aa648748f9890/primary-storage/b91bcd212e434b1d97d80df127460f84?Request Parameters
| Name | Type | Location | Description | Optional Value | Starting Version |
|---|---|---|---|---|---|
| primaryStorageUuid | String | url | The primary storage UUID. | 0.6 | |
| clusterUuid | String | url | The cluster UUID. | 0.6 | |
| systemTags | List | body | Optional. The system tags. | 0.6 | |
| userTags | List | body | Optional. The user tags. | 0.6 |
API Response
Sample
Response
{
"inventory": {
"name": "PS1",
"url": "/Cloud_ps",
"type": "LocalStorage",
"state": "Enabled",
"status": "Connected"
}
}#error
| 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 detailed 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 |
#inventory
| Name | Type | Description | Starting Version |
|---|---|---|---|
| uuid | String | The resource UUID. | 0.6 |
| zoneUuid | String | The zone UUID. | 0.6 |
| name | String | The resource name. | 0.6 |
| url | String | 0.6 | |
| description | String | The detailed description of the resource. | 0.6 |
| totalCapacity | Long | 0.6 | |
| availableCapacity | Long | 0.6 | |
| totalPhysicalCapacity | Long | 0.6 | |
| availablePhysicalCapacity | Long | 0.6 | |
| systemUsedCapacity | Long | 0.6 | |
| type | String | 0.6 | |
| state | String | 0.6 | |
| status | String | 0.6 | |
| mountPath | String | 0.6 | |
| createDate | Timestamp | The creation date. | 0.6 |
| lastOpDate | Timestamp | The last operation date. | 0.6 |
| attachedClusterUuids | List | 0.6 |
SDK Sample
Java
SDK
DetachPrimaryStorageFromClusterAction action = new DetachPrimaryStorageFromClusterAction();
action.primaryStorageUuid = "c3444a3237a84d7e904b23d25106855a";
action.clusterUuid = "7ff9675810c84884984ee771d5a5b05c";
action.sessionId = "e678af3ed83b4ba893e0e514d2c07eb5";
DetachPrimaryStorageFromClusterAction.Result res = action.call();Python
SDK
DetachPrimaryStorageFromClusterAction action = DetachPrimaryStorageFromClusterAction()
action.primaryStorageUuid = "4dbcd51ef01c44728b19c4d5aa06ac59"
action.clusterUuid = "554ac500d71b476e91ecf5440980aba9"
action.sessionId = "21fdcfe391a14d46ad5a7dcccbc3ddfa"
DetachPrimaryStorageFromClusterAction.Result res = action.call()