Cns Volume Manager Cns Delete Volume
Deletes given container volumes.
Multiple requests for a volume, when deletion is already in progress, will not return any fault. This operation will make the volume unavailable for any attach, update and query operation.
Following privileges will be required on specified entities, to perform this operation:
- Datastore.FileManagement on all involved Datastores, required for block volume only
- Host.Config.Storage on vSAN file service enabled vSAN cluster, required for file volume only
Faults that can be set in individual result entry, corresponding to each volume ID instance in input:
- vmodl.fault.InvalidArgument set in case of empty volume ID
- vim.fault.NotFound set in case of the volume can not be found.
- vim.fault.ResourceInUse set when volume has been attached to a VM and is in use, client needs to first detach the volume from that VM and then retry this operation.
- vim.fault.CnsFault set in case of any other failure scenario.
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.0.0.0 APIs.
"CnsDeleteVolumeRequestType Object"
List of CnsVolumeId for the volumes to be deleted.
Disk is the backing object for each container volume specified in volumeIds list. If set to true, the backing objects specified in volumeIds list will be deleted. If set to false, the backing objects specified in volumeIds list will not be deleted but will no longer be a container volume.
Task to track the progress and overall state of this operation.
"MoRefTask Object"
InvalidArgument: This API supports input size of 1 only. If
more or less than one entries are passed as
input, this exception will be thrown and
operation will fail.
This exception will be thrown when invalid
format for VolumeId id
is passed, or volume IDs are empty.
NotFound: if the volume can not be found.
ResourceInUse: if the volume has been attached to a VM and is in use, client needs to first detach the volume from that VM and then retry this operation.
CnsFault: Thrown for all other failure scenario.
"MethodFault Object"
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}/CnsDeleteVolume