Class List Method List File List

# Class: Com::Vmware::Vcenter::Datastore

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

## Overview

The Datastore class provides methods for manipulating a datastore.

## Defined Under Namespace

Classes: FilterSpec, Info, Summary, Type

## Constant Summary

RESOURCE_TYPE =

      'Datastore'

## Instance Method Summary (collapse)

- - (Com::Vmware::Vcenter::Datastore::Info) get(datastore)

  Retrieves information about the datastore indicated by ``datastore`` .

- - (Datastore) initialize(config) constructor

  Constructs a new instance.

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

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

## Constructor Details

### - (`Datastore`) initialize(config)

Constructs a new instance.

Parameters:

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

  A hash with the api provider details.

    688
    689
    690
    # File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vcenter.rb', line 688

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

## Instance Method Details

### - (`Com::Vmware::Vcenter::Datastore::Info`) get(datastore)

Retrieves information about the datastore indicated by ``datastore`` .

Parameters:

- datastore (`String`) —

  Identifier of the datastore for which information should be retrieved.

Returns:

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

  information about the datastore.

Raises:

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

  if the datastore indicated by ``datastore`` 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.

    709
    710
    711
    712
    713
    # File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vcenter.rb', line 709

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

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

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

Parameters:

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

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

Returns:

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

  Commonly used information about the datastores matching the :class:`Com::Vmware::Vcenter::Datastore::FilterSpec` .

Raises:

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

  if the :attr:`Com::Vmware::Vcenter::Datastore::FilterSpec.types` field contains a value that is not supported by the server.

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

  if the :attr:`Com::Vmware::Vcenter::Datastore::FilterSpec.types` field contains a value that is not supported by the server.

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

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

    735
    736
    737
    738
    739
    # File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vcenter.rb', line 735

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