Class List Method List File List

# Class: Com::Vmware::Vcenter::ResourcePool

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

## Overview

The ResourcePool class provides methods for manipulating a vCenter Server resource pool.

     This  class  does not include virtual appliances in the inventory of resource pools even though part of the behavior of a virtual appliance is to act like a resource pool.

## Defined Under Namespace

Classes: FilterSpec, Info, Summary

## Constant Summary

RESOURCE_TYPE =

      'ResourcePool'

## Instance Method Summary (collapse)

- - (Com::Vmware::Vcenter::ResourcePool::Info) get(resource_pool)

  Retrieves information about the resource pool indicated by ``resource_pool`` .

- - (ResourcePool) initialize(config) constructor

  Constructs a new instance.

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

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

## Constructor Details

### - (`ResourcePool`) initialize(config)

Constructs a new instance.

Parameters:

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

  A hash with the api provider details.

    2200
    2201
    2202
    # File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vcenter.rb', line 2200

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

## Instance Method Details

### - (`Com::Vmware::Vcenter::ResourcePool::Info`) get(resource_pool)

Retrieves information about the resource pool indicated by ``resource_pool`` .

Parameters:

- resource_pool (`String`) —

  Identifier of the resource pool for which information should be retrieved.

Returns:

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

  information about the resource pool.

Raises:

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

  if the resource pool indicated by ``resource_pool`` does not exist.

- (`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.

    2221
    2222
    2223
    2224
    2225
    # File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vcenter.rb', line 2221

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

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

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

Parameters:

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

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

Returns:

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

  Commonly used information about the resource pools matching the :class:`Com::Vmware::Vcenter::ResourcePool::FilterSpec` .

Raises:

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

  if more than 1000 resource pools match the :class:`Com::Vmware::Vcenter::ResourcePool::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.

    2243
    2244
    2245
    2246
    2247
    # File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vcenter.rb', line 2243

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