Snapservice. Clusters. Virtual Machines List

Snapservice. Clusters. Virtual Machines List

List the virtual machines for the given cluster.

This operation was added in vSphere API 8.0.3.0.

Returns an authorization error if you do not have all of the privileges described as follows:

  • The resource ClusterComputeResource referenced by the parameter cluster requires System.Read.
Request
URI
GET
https://{host}/api/snapservice/clusters/{cluster}/virtual-machines
COPY
Path Parameters
string
cluster
Required

Identifier of the cluster.

The parameter must be an identifier for the resource type: ClusterComputeResource.

Query Parameters
filter
Optional

Specification of matching virtual machines for which information should be returned.

If missing or null, the behavior is equivalent to a Snapservice.Clusters.VirtualMachines.FilterSpec with all properties missing or null which means all virtual machines match the filter.

string of array
vms
Optional

Identifiers of virtual machines that can match the filter.

This property was added in vSphere API 8.0.3.0.

If missing or null or empty, virtual machines with any identifier match the filter.

When clients pass a value of this schema as a parameter, the property must contain identifiers for the resource type: VirtualMachine. When operations return a value of this schema as a response, the property will contain identifiers for the resource type: VirtualMachine.

string of array
name_patterns
Optional

One or more match patterns for virtual machine name that can match the filter. Uses standard POSIX Shell globbing pattern.

This property was added in vSphere API 8.0.3.0.

If missing or null or empty virtual machines with any name match the filter.


Authentication
This operation uses the following authentication methods.
Responses
200

Information about the virtual machines matching the Snapservice.Clusters.VirtualMachines.FilterSpec for the given cluster.

Returns Snapservice.Clusters.VirtualMachines.ListResult of type(s) application/json
"Snapservice.Clusters.VirtualMachines.ListResult Object"

400

If validation of the filter fails.

Returns Vapi.Std.Errors.InvalidArgument of type(s) application/json
"Vapi.Std.Errors.InvalidArgument Object"

401

If the caller is not authenticated.

Returns Vapi.Std.Errors.Unauthenticated of type(s) application/json
"Vapi.Std.Errors.Unauthenticated Object"

403

If the caller is not authorized to perform the operation.

Returns Vapi.Std.Errors.Unauthorized of type(s) application/json
"Vapi.Std.Errors.Unauthorized Object"

404

If there is no cluster associated with cluster in the system.

Returns Vapi.Std.Errors.NotFound of type(s) application/json
"Vapi.Std.Errors.NotFound Object"

500

If there is unknown internal error.

Returns Vapi.Std.Errors.Error of type(s) application/json
"Vapi.Std.Errors.Error Object"

503

If the service is not available.

Returns Vapi.Std.Errors.ServiceUnavailable of type(s) application/json
"Vapi.Std.Errors.ServiceUnavailable Object"

Code Samples
COPY
                    curl -H 'Authorization: <value>' https://{api_host}/api/snapservice/clusters/{cluster}/virtual-machines