Cns Volume Manager Cns Update Volume Metadata
Updates volume metadata, namely labels and container cluster information for the container 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
- 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 VolumeMetadataUpdateSpec instance in input:
- vmodl.fault.InvalidArgument set in case of invalid but non-empty volume id.
- vim.fault.NotFound set in case of the volume can not be found.
- 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.
"CnsUpdateVolumeMetadataRequestType Object"
Specifications for volumes to be updated.
Task vCenter Task to track the progress and overall state of this operation.
"MoRefTask Object"
InvalidArgument: if:
- Input size is not equal to 1
- Volume id in input spec is empty.
- Volume metadata in input spec has empty cluster info.
- Entity objects in volume metadata has empty or invalid attributes.
- EntityMetadata in volume metadata contains duplicate entity types.
NotFound: if the volume can not be found.
CnsNotRegisteredFault: if the volume exists in VC but not registered as CNS volume.
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}/CnsUpdateVolumeMetadata