Cns Volume Manager Cns Query Async

Cns Volume Manager Cns Query Async

Returns container volumes matching criteria set in the filter.

This API will not return partial result in case of invalid input, like empty volume ID, volume name fields and so on. In case of valid inputs, e.g. non-empty volume ID, if the output doesn't contain information for that volume that would mean that CNS is not aware of the existence of that volume. Note that there could be duplicate volumes or missing volumes across multiple pages returned by this API when there are parallel volume provisioning operations like create, delete are in progress.

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

  • Cns.Searchable on RootFolder to search over all container volumes

Required privileges: Cns.Searchable

Request
URI
POST
https://{api_host}/sdk/vim25/{release}/vsan/CnsVolumeManager/{moId}/CnsQueryAsync
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
CnsQueryAsyncRequestType of type(s) application/json
Required
"CnsQueryAsyncRequestType Object"
filter
Required

All container volumes matching the criteria set in the filter will be returned. A maximum of 1000 volume ids can be provided. See CnsQueryFilter

selection
Optional

Selection spec for the query entities to return. This is an optional parameter. All volume fields would be returned if the parameter is not specified. See CnsQuerySelection

Authentication
This operation uses the following authentication methods.
Responses
200

Task to track the progress and result of this operation. For result type in task, see CnsAsyncQueryResult

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

500

InvalidArgument: Thrown in case of invalid input arguments, like empty strings, invalid formats, invalid combination of inputs

CnsFault: Thrown for all other failure scenarios

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