VMware vSphere Automation SDK Perl The VMware vSphere Automation SDK for Perl supports the client-side vSphere Automation API for access to vSphere services and capabilities

- Main Page
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Files Functions
Classes | List of all members
Com::Vmware::Vcenter::Inventory::Datastore Class Reference
Inheritance diagram for Com::Vmware::Vcenter::Inventory::Datastore:

## Classes
class | Info

## Avaliable Methods
public method | new ()
public method | find ()

## Detailed Description

The `Com::Vmware::Vcenter::Inventory::Datastore` interface provides methods to retrieve information about datastores.

## Member Function Documentation

public method Com::Vmware::Vcenter::Inventory::Datastore::find | ( |  | ) |

Returns datastore information for the specified datastores. The key in the result map* is the datastore identifier and the value in the map is the datastore information. Note: Privileges required for this operation are System.Read.

Parameters

  datastores | [REQUIRED] Identifiers of the datastores for which information will be returned. The value must be an identifier for the resource type getQualifiedName(Datastore). . The value must be Array of str.

Return values

  Datastore | information for the specified datastores. The key in the result map is the datastore identifier and the value in the map is the datastore information. The value will be an identifier for the resource type getQualifiedName(Datastore). The return type will be Dictionary of str and Com::Vmware::Vcenter::Inventory::Datastore::Info or None

Exceptions

  Com::Vmware::Vapi::Std::Errors::NotFound | if no datastore can be found for one or more of the datastore identifiers in `datastores`
  Com::Vmware::Vapi::Std::Errors::Unauthorized | if you do not have all of the privileges described as follows: Method execution requires `System.Read` . The resource `Datastore` referenced by the parameter `datastores` requires `System.Read` .

Code:
click to view
# Number of lines of code in find: 10
sub find {
my ($self, %args) = @_;
my $datastores = $args {datastores};
$self->validate_args (method_name => 'find',
method_args => \%args);
return $self->invoke (method_name => 'find',
method_args => \%args);
}

public method Com::Vmware::Vcenter::Inventory::Datastore::new | ( |  | ) |

Constructor to initialize the object

Parameters

  api_provider | - protocol connection to use with stubs created by this factory
  StubConfig | - Stub's additional configuration

Return values

  Blessed | object

Code:
click to view
# Number of lines of code in new: 11
sub new {
my ($class, %args) = @_;
$class = ref($class) || $class;
my $stub_config = $args {stub_config};
my $api_provider = $args {api_provider};
my $self = $class->SUPER::new('stub_config' => $stub_config,
'api_provider' => $api_provider);
bless $self, $class;
return $self;
}

The documentation for this class was generated from the following file:

- Com/Vmware/Vcenter/Inventory/Datastore.pm