Cns Volume Manager Cns Reconfig Volume Policy

Cns Volume Manager Cns Reconfig Volume Policy

Reconfigures the volume with the storage policy.

Currently the API is supported for only block volumes and only supports applying the currently associated policy.

Following privileges will be required on specified entities, to perform this operation:

  • Datastore.FileManagement on datastores specified in input, required for block volume only
  • StoragePolicy.View on policy in the spec
Request
URI
POST
https://{api_host}/sdk/vim25/{release}/vsan/CnsVolumeManager/{moId}/CnsReconfigVolumePolicy
COPY
Path Parameters
string
moId
Required

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}.

string
release
Required

The vSphere release schema. The current specification covers vSphere 9.0.0.0 APIs.


Request Body
CnsReconfigVolumePolicyRequestType of type(s) application/json
Required
"CnsReconfigVolumePolicyRequestType Object"
array of object
volumePolicyReconfigSpecs
Optional

An array of spec , currently only array of size 1 is supported.

Authentication
This operation uses the following authentication methods.
Responses
200

Task vCenter Task to track the progress and overall state of this operation.

Returns MoRefTask of type(s) application/json
"MoRefTask Object"

500

InvalidArgument: if:

  • Input size is not equal to 1
  • Volume id in input spec is empty.
  • Policy string is empty.

NotFound: if the volume can not be found.

CnsFault: Thrown for all other failure scenario.

Returns MethodFault of type(s) application/json
This response body class contains all of the following: InlineMethodFault0
"MethodFault Object"
faultCause
Optional

Fault which is the cause of this fault.

array of object
faultMessage
Optional

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.


Code Samples
COPY
                    curl -X POST -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '[{}]' https://{api_host}/sdk/vim25/{release}/vsan/CnsVolumeManager/{moId}/CnsReconfigVolumePolicy