Cns Volume Manager Cns Unregister Volume
Initiates an asynchronous operation to unregister volume.
Unregistration removes the CNS metadata associated with the specified volumes, it also optionally converts to a targer volume type as specified in the targetVolumeType. This API is only supported for the block volume.
This is an asynchronous operation, it returns a Task object which can be used to monitor the progress and completion status of the unregistration process.
The unique identifier for the managed object to which the method attaches; the serialized managed object reference for a request has the form moType/moId, in this case CnsVolumeManager/{moId}.
The vSphere release schema. The current specification covers vSphere 9.1.0.0 APIs.
{
"unregisterSpec": [
{
"_typeName": "string",
"volumeId": {
"_typeName": "string",
"id": "string"
},
"targetVolumeType": "string"
}
]
}
An array of CnsUnregisterVolumeSpec objects, each specifying a unique volume or PVC to be unregistered along with optional parameters for its post-unregistration state. At most one specification is supported for this operation.
Task to track the progress and result of this operation. The task's result will indicate the success of the unregistration for all specified volumes.
Following privileges will be required on specified entities, to perform this operation:
- Datastore.FileManagement on datastores specified in input, required for block volume only
{
"_typeName": "string",
"type": "string",
"value": "string"
}
NotFound: Thrown if any of the volumeIds specified in the
unregisterSpec do not correspond to an
existing PVC in the CNS inventory.
InvalidState: Thrown if a volume specified is in a state that prevents unregistration.
InvalidDatastore: Thrown if the operation cannot be performed on the datastore.
TaskInProgress: Thrown if the virtual storage object is busy.
InvalidArgument: if:
- This API supports input size of 1 only. If more or less than one entries are passed as input, this exception will be thrown.
- This exception will be thrown when invalid format for VolumeId id is passed, or volume IDs are empty.
- This exception will be thrown when volume Id does not belong to block volume.
CnsFault: Thrown if a general CNS-specific error occurs during the unregistration process that is not covered by more specific faults.
CnsNotRegisteredFault: if the volume exists in VC but not registered as CNS volume.
{
"_typeName": "string",
"faultCause": {
"_typeName": "string",
"faultCause": "MethodFault Object",
"faultMessage": [
{
"_typeName": "string",
"key": "string",
"arg": [
{
"_typeName": "string",
"key": "string",
"value": {
"_typeName": "string"
}
}
],
"message": "string"
}
]
},
"faultMessage": [
{
"_typeName": "string",
"key": "string",
"arg": [
{
"_typeName": "string",
"key": "string",
"value": {
"_typeName": "string"
}
}
],
"message": "string"
}
]
}
Fault which is the cause of this fault.
Message which has details about the error Message can also contain a key to message catalog which can be used to generate better localized messages.
curl -X POST -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '{}' https://{api_host}/sdk/vim25/{release}/vsan/CnsVolumeManager/{moId}/CnsUnregisterVolume