Detach Data Storage from Cluster

API Request

URLs

DELETE/v1/clusters/{clusterUuid}/primary-storage/{primaryStorageUuid}

Headers

Authorization: OAuth the-session-uuid

Curl Example

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?

Parameter List

NameTypeLocationDescriptionAllowed ValuesStarting Version
primaryStorageUuidStringurlData Storage UUID 0.6
clusterUuidStringurlCluster UUID 0.6
systemTags (Optional)ListbodySystem Tags 0.6
userTags (Optional)ListbodyUser Tags 0.6

API Response

Response Example

{
  "inventory": {
    "name": "PS1",
    "url": "/Cloud_ps",
    "type": "LocalStorage",
    "state": "Enabled",
    "status": "Connected"
  }
}
NameTypeDescriptionStarting Version
errorErrorCodeError code. If not null, the operation failed. When the operation succeeds, this field is null. See error0.6
inventoryPrimaryStorageInventorySee inventory0.6

error

NameTypeDescriptionStarting Version
codeStringError code number, a globally unique identifier for the error, for example SYS.1000, HOST.10010.6
descriptionStringBrief description of the error0.6
detailsStringDetailed error information0.6
elaborationStringReserved field, defaults to null0.6
opaqueLinkedHashMapReserved field, defaults to null0.6
causeErrorCodeRoot cause, the source error that caused the current error. If there is no original error, this field is null0.6

inventory

NameTypeDescriptionStarting Version
uuidStringResource UUID, uniquely identifies the resource0.6
zoneUuidStringData Center UUID0.6
nameStringResource Name0.6
urlString 0.6
descriptionStringResource Description0.6
totalCapacityLong 0.6
availableCapacityLong 0.6
totalPhysicalCapacityLong 0.6
availablePhysicalCapacityLong 0.6
systemUsedCapacityLong 0.6
typeString 0.6
stateString 0.6
statusString 0.6
mountPathString 0.6
createDateTimestampCreate Time0.6
lastOpDateTimestampLast Modification Time0.6
attachedClusterUuidsList 0.6

SDK Examples

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()