vcenter cluster: list

Returns information about at most 1000 visible (subject to permission checks) clusters in vCenter matching the vcenter.cluster.filter_spec.

Request:

HTTP request

GET https://{server}/rest/vcenter/cluster

?filter.clusters.1=obj-103
&filter.clusters.2=obj-103
&filter.datacenters.1=obj-103
&filter.datacenters.2=obj-103
&filter.names.1=string
&filter.names.2=string
&filter.folders.1=obj-103
&filter.folders.2=obj-103

Request Query Parameters:

Name Type Description
bold = required
filter filter_spec Optional. Specification of matching clusters for which information should be returned.
filter.clusters string[] Identifiers of clusters that can match the filter.

Optional. If unset or empty, clusters with any identifier match the filter.When clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: ClusterComputeResource. When operations return a value of this structure as a result, the field will contain identifiers for the resource type: ClusterComputeResource.

filter.names string[] Names that clusters must have to match the filter (see vcenter.cluster.info.name).

Optional. If unset or empty, clusters with any name match the filter.

filter.folders string[] Folders that must contain the cluster for the cluster to match the filter.

Optional. If unset or empty, clusters in any folder match the filter.When clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: Folder. When operations return a value of this structure as a result, the field will contain identifiers for the resource type: Folder.

filter.datacenters string[] Datacenters that must contain the cluster for the cluster to match the filter.

Optional. If unset or empty, clusters in any datacenter match the filter.When clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: Datacenter. When operations return a value of this structure as a result, the field will contain identifiers for the resource type: Datacenter.

Response:

HTTP Status Code: 200

Representations:

{
    "value"[
        {
            "cluster""obj-103",
            "drs_enabled"true,
            "ha_enabled"true,
            "name""string"
        },
        {
            "cluster""obj-103",
            "drs_enabled"true,
            "ha_enabled"true,
            "name""string"
        }
    ]
}
<?xml version="1.0" ?>
<ns0:List-Result xmlns:ns0="http://vmware.com/vcenter/cluster" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <value-array>
    <array-item>
      <name>string</name>
      <cluster>obj-103</cluster>
      <ha_enabled>true</ha_enabled>
      <drs_enabled>true</drs_enabled>
    </array-item>
    <array-item>
      <name>string</name>
      <cluster>obj-103</cluster>
      <ha_enabled>true</ha_enabled>
      <drs_enabled>true</drs_enabled>
    </array-item>
  </value-array>
</ns0:List-Result>

Response Type:

Name Type Description
bold = required
value summary[] Commonly used information about the clusters matching the vcenter.cluster.filter_spec.
value[].cluster string Identifier of the cluster.

When clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: ClusterComputeResource. When operations return a value of this structure as a result, the field will be an identifier for the resource type: ClusterComputeResource.

value[].name string Name of the cluster.

value[].ha_enabled boolean Flag indicating whether the vSphere HA feature is enabled for the cluster.

value[].drs_enabled boolean Flag indicating whether the vSphere DRS service is enabled for the cluster.

Errors:

HTTP Status Code Type Description
400 unable_to_allocate_resource if more than 1000 clusters match the vcenter.cluster.filter_spec.
503 service_unavailable if the system is unable to communicate with a service to complete the request.
401 unauthenticated if the user can not be authenticated.
403 unauthorized if the user doesn't have the required privileges.