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::Content::Library Class Reference
Inheritance diagram for Com::Vmware::Content::Library:

## Classes
class | FindSpec

## Avaliable Methods
public method | get ()
public method | new ()
public method | update ()
public method | find ()
public method | list ()

## Detailed Description

The `Com::Vmware::Content::Library` interface provides methods to manage and find class Com::Vmware::Content::LibraryModel entities.

The `Com::Vmware::Content::Library` interface provides support for generic functionality which can be applied equally to all types of libraries. The functionality provided by this interface will not affect the properties specific to the type of library. See also class Com::Vmware::Content::LocalLibrary and class Com::Vmware::Content::SubscribedLibrary .

Constant String::RESOURCE_TYPE # Resource type for library.

## Member Function Documentation

public method Com::Vmware::Content::Library::find | ( |  | ) |

Returns a list of all the visible (as determined by authorization policy) libraries matching the requested class Com::Vmware::Content::Library::FindSpec .

Parameters

  spec | [REQUIRED] Specification describing what properties to filter on. . The value must be Com::Vmware::Content::Library::FindSpec.

Return values

  The | list of identifiers of all the visible libraries matching the given `spec`The value will be an identifier for the resource type getQualifiedName(com.vmware.content.Library). The return type will be Array of str

Exceptions

  Com::Vmware::Vapi::Std::Errors::InvalidArgument | if no properties are specified in the `spec` .

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

public method Com::Vmware::Content::Library::get | ( |  | ) |

Returns a given class Com::Vmware::Content::LibraryModel .

Parameters

  library_id | [REQUIRED] Identifier of the library to return. The value must be an identifier for the resource type getQualifiedName(com.vmware.content.Library). . The value must be str.

Return values

  The | class Com::Vmware::Content::LibraryModel instance with the specified `library_id` . The return type will be Com::Vmware::Content::LibraryModel

Exceptions

  Com::Vmware::Vapi::Std::Errors::NotFound | if the specified library does not exist.

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

public method Com::Vmware::Content::Library::list | ( |  | ) |

Returns the identifiers of all libraries of any type in the Content Library.

Return values

  The | list of all identifiers of all libraries in the Content Library. The value will be an identifier for the resource type getQualifiedName(com.vmware.content.Library). The return type will be Array of str

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

public method Com::Vmware::Content::Library::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;
}

public method Com::Vmware::Content::Library::update | ( |  | ) |

Updates the properties of a library.

This is an incremental update to the library. Any field in the class Com::Vmware::Content::LibraryModel class that is null will not be modified.

This method will only update the common properties for all library types. This will not, for example, update the :attr:`Com::Vmware::Content::LibraryModel.publish_info` of a local library, nor the :attr:`Com::Vmware::Content::LibraryModel.subscription_info` of a subscribed library. Specific properties are updated in :func:`Com::Vmware::Content::LocalLibrary.update` and :func:`Com::Vmware::Content::SubscribedLibrary.update` .

Parameters

  library_id | [REQUIRED] Identifier of the library to update. The value must be an identifier for the resource type getQualifiedName(com.vmware.content.Library). . The value must be str.
  update_spec | [REQUIRED] Specification of the new property values to set on the library. . The value must be Com::Vmware::Content::LibraryModel.

Exceptions

  Com::Vmware::Vapi::Std::Errors::NotFound | if the library associated with `library_id` does not exist.
  Com::Vmware::Vapi::Std::Errors::InvalidArgument | if the `update_spec` is not valid.
  Com::Vmware::Vapi::Std::Errors::InvalidArgument | if the :attr:`Com::Vmware::Content::LibraryModel.version` of `update_spec` is not equal to the current version of the library.

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

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

- Com/Vmware/Content/Library.pm