Cns Volume Manager Cns Create Snapshots

Cns Volume Manager Cns Create Snapshots

Create snapshots of given volumes

A volume with snapshot created on it, is considered in use and cannot be deleted.

Create snapshot operation should be called by providing at least one SnapshotCreateSpec. If an array of empty spec is passed, the operation will fail. Return a task that tracks the status and result of snapshot operation. Following privileges will be required on specified entities, to perform this operation:

  • Datastore.FileManagement on all involved Datastores
Request
URI
POST
https://{api_host}/sdk/vim25/{release}/vsan/CnsVolumeManager/{moId}/CnsCreateSnapshots
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
CnsCreateSnapshotsRequestType of type(s) application/json
Required
"CnsCreateSnapshotsRequestType Object"
array of object
snapshotSpecs
Required

Specifications for snapshot creation operation.

Create snapshot with given description.

This structure may be used only with operations rendered under /vsan.

Authentication
This operation uses the following authentication methods.
Responses
200

Task to track the progress and result of this operation.

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

500

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

NotFound: if the volume can not be found.

CnsSnapshotCreatedFault: If the snapshot is created but CNS failed to persist it into DB. Clean-up using lower layer api is advised

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}/CnsCreateSnapshots