Cns Volume Manager Cns Sync Volume

Cns Volume Manager Cns Sync Volume
Initiates a task to synchronize one or more volumes based on the provided specifications.

Initiates a task to synchronize one or more volumes based on the provided specifications.

This method allows for syncing volume properties for a single volume only. The operation is asynchronous and returns a `Task` object that can be used to monitor the progress and outcome of the synchronization. This API supported only for block volume.

Request
URI
POST
https://{vcenter-host}/sdk/vim25/{release}/vsan/CnsVolumeManager/{moId}/CnsSyncVolume
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.1.0.0 APIs.


Request Body
CnsSyncVolumeRequestType of type(s) application/json
Optional
{
    "syncSpecs": [
        {
            "_typeName": "string",
            "volumeId": {
                "_typeName": "string",
                "id": "string"
            },
            "datastore": {
                "_typeName": "string",
                "type": "string",
                "value": "string"
            },
            "syncMode": [
                "string"
            ]
        }
    ]
}
array of object
syncSpecs
Optional

Specification for volume to be synchronized. At most one specification is supported for this operation.

Authentication
This operation uses the following authentication methods.
Responses
200

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

Returns MoRefTask of type(s) application/json
This response body class contains all of the following: MoRefExtensibleManagedObject
{
    "_typeName": "string",
    "type": "string",
    "value": "string"
}

500

InvalidArgument: if:

  • The volume ID in an input spec is empty or malformed
  • This API supports input size of 1 only. If more or less than one entries are passed as input, this exception will be thrown.

NotFound: if a volume specified in `syncSpecs` does not exist on the system.

CnsFault: Thrown for all other CNS-related failure scenarios, such as issues with the CNS infrastructure or backend storage.

Returns MethodFault of type(s) application/json
This response body class contains all of the following: Any
{
    "_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"
        }
    ]
}
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}/CnsSyncVolume