Class List Method List File List

# Class: Com::Vmware::Vcenter::Cluster

Inherits:
  VAPI::Bindings::VapiService
  - Object
  - VAPI::Bindings::VapiService
  - Com::Vmware::Vcenter::Cluster
  show all
Defined in:
  /build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vcenter.rb

## Overview

The ``Com::Vmware::Vcenter::Cluster`` class provides methods to manage clusters in the vCenter Server.

## Defined Under Namespace

Classes: FilterSpec, Info, Summary

## Constant Summary

RESOURCE_TYPE =

      'ClusterComputeResource'

## Instance Method Summary (collapse)

- - (Com::Vmware::Vcenter::Cluster::Info) get(cluster)

  Retrieves information about the cluster corresponding to ``cluster`` .

- - (Cluster) initialize(config) constructor

  Constructs a new instance.

- - (Array<Com::Vmware::Vcenter::Cluster::Summary>) list(filter = nil)

  Returns information about at most 1000 visible (subject to permission checks) clusters in vCenter matching the :class:`Com::Vmware::Vcenter::Cluster::FilterSpec` .

## Constructor Details

### - (`Cluster`) initialize(config)

Constructs a new instance.

Parameters:

- config (`VAPI::Bindings::StubConfig`) —

  A hash with the api provider details.

    69
    70
    71
    # File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vcenter.rb', line 69

    def initialize(config)
        super(config, @@service_info)
    end

## Instance Method Details

### - (`Com::Vmware::Vcenter::Cluster::Info`) get(cluster)

Retrieves information about the cluster corresponding to ``cluster`` .

Parameters:

- cluster (`String`) —

  Identifier of the cluster.

Returns:

- (`Com::Vmware::Vcenter::Cluster::Info`) —

  The :class:`Com::Vmware::Vcenter::Cluster::Info` instances that corresponds to the ``cluster`` .

Raises:

- (`Com::Vmware::Vapi::Std::Errors::NotFound`) —

  if there is no cluster associated with ``cluster`` in the system.

- (`Com::Vmware::Vapi::Std::Errors::ServiceUnavailable`) —

  if the system is unable to communicate with a service to complete the request.

- (`Com::Vmware::Vapi::Std::Errors::Unauthenticated`) —

  if the session id is missing from the request or the corresponding session object cannot be found.

- (`Com::Vmware::Vapi::Std::Errors::Unauthorized`) —

  if the user doesn’t not have the required privileges.

    112
    113
    114
    115
    116
    # File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vcenter.rb', line 112

    def get(cluster)
        invoke_with_info(@@get_info, {
            'cluster' => cluster,
        })
    end

### - (`Array<Com::Vmware::Vcenter::Cluster::Summary>`) list(filter = nil)

Returns information about at most 1000 visible (subject to permission checks) clusters in vCenter matching the :class:`Com::Vmware::Vcenter::Cluster::FilterSpec` .

Parameters:

- filter (`Com::Vmware::Vcenter::Cluster::FilterSpec`, `nil`) (defaults to: `nil`) —

  Specification of matching clusters for which information should be returned. If nil , the behavior is equivalent to a :class:`Com::Vmware::Vcenter::Cluster::FilterSpec` with all fields nil which means all clusters match the filter.

Returns:

- (`Array<Com::Vmware::Vcenter::Cluster::Summary>`) —

  Commonly used information about the clusters matching the :class:`Com::Vmware::Vcenter::Cluster::FilterSpec` .

Raises:

- (`Com::Vmware::Vapi::Std::Errors::UnableToAllocateResource`) —

  if more than 1000 clusters match the :class:`Com::Vmware::Vcenter::Cluster::FilterSpec` .

- (`Com::Vmware::Vapi::Std::Errors::ServiceUnavailable`) —

  if the system is unable to communicate with a service to complete the request.

- (`Com::Vmware::Vapi::Std::Errors::Unauthenticated`) —

  if the user can not be authenticated.

- (`Com::Vmware::Vapi::Std::Errors::Unauthorized`) —

  if the user doesn’t have the required privileges.

    91
    92
    93
    94
    95
    # File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vcenter.rb', line 91

    def list(filter=nil)
        invoke_with_info(@@list_info, {
            'filter' => filter,
        })
    end