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

## Classes
class | ProbeResult

## Avaliable Methods
public method | create ()
public method | sync ()
public method | evict ()
public method | delete ()
public method | get ()
public method | new ()
public method | update ()
public method | probe ()
public method | list ()

## Member Function Documentation

public method Com::Vmware::Content::SubscribedLibrary::create | ( |  | ) |

Creates a new subscribed library.

Once created, the subscribed library will be empty. If the :attr:`Com::Vmware::Content::LibraryModel.subscription_info` property is set, the Content Library Service will attempt to synchronize to the remote source. This is an asynchronous operation so the content of the published library may not immediately appear.

Parameters

  client_token | [OPTIONAL] Unique token generated on the client for each creation request. The token should be a universally unique identifier (UUID), for example: `b8a2a2e3-2314-43cd-a871-6ede0f429751` . This token can be used to guarantee idempotent creation. If not specified creation is not idempotent. . The value must be String or None.
  create_spec | [REQUIRED] Specification for the new subscribed library. . The value must be Com::Vmware::Content::LibraryModel.

Return values

  Identifier | of the newly created subscribed library. The value will be an identifier for the resource type getQualifiedName(com.vmware.content.Library). The return type will be str

Exceptions

  Com::Vmware::Vapi::Std::Errors::InvalidArgument | if the `create_spec` is not valid.
  Com::Vmware::Vapi::Std::Errors::InvalidArgument | if the `client_token` does not conform to the UUID format.
  Com::Vmware::Vapi::Std::Errors::Unsupported | if using multiple storage backings.
  Com::Vmware::Vapi::Std::Errors::ResourceInaccessible | if subscribing to a published library which cannot be accessed.

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

public method Com::Vmware::Content::SubscribedLibrary::delete | ( |  | ) |

Deletes the specified subscribed library.

Deleting a subscribed library will remove the entry immediately and begin an asynchronous task to remove all cached content for the library. If the asynchronous task fails, file content may remain on the storage backing. This content will require manual removal.

Parameters

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

Exceptions

  Com::Vmware::Vapi::Std::Errors::InvalidElementType | if the library referenced by `library_id` is not a subscribed library.
  Com::Vmware::Vapi::Std::Errors::NotFound | if the library referenced by `library_id` does not exist.

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

public method Com::Vmware::Content::SubscribedLibrary::evict | ( |  | ) |

Evicts the cached content of an on-demand subscribed library.

This method allows the cached content of a subscribed library to be removed to free up storage capacity. This method will only work when a subscribed library is synchronized on-demand.

Parameters

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

Exceptions

  Com::Vmware::Vapi::Std::Errors::NotFound | if the library specified by `library_id` does not exist.
  Com::Vmware::Vapi::Std::Errors::InvalidElementType | if the library specified by `library_id` is not a subscribed library.
  Com::Vmware::Vapi::Std::Errors::NotAllowedInCurrentState | if the library specified by `library_id` does not synchronize on-demand.

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

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

Returns a given subscribed library.

Parameters

  library_id | [REQUIRED] Identifier of the subscribed 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 that corresponds to `library_id` . The return type will 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::InvalidElementType | if the library associated with `library_id` is not a subscribed library.

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::SubscribedLibrary::list | ( |  | ) |

Returns the identifiers of all subscribed libraries in the Content Library.

Return values

  The | list of identifiers of all subscribed 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::SubscribedLibrary::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::SubscribedLibrary::probe | ( |  | ) |

Probes remote library subscription information, including URL, SSL certificate and password. The resulting class Com::Vmware::Content::SubscribedLibrary::ProbeResult class* describes whether or not the subscription configuration is successful.

Parameters

  subscription_info | [REQUIRED] The subscription info to be probed. . The value must be Com::Vmware::Content::Library::SubscriptionInfo.

Return values

  The | subscription info probe result. The return type will be Com::Vmware::Content::SubscribedLibrary::ProbeResult

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

public method Com::Vmware::Content::SubscribedLibrary::sync | ( |  | ) |

Forces the synchronization of the subscribed library.

Synchronizing a subscribed library forcefully with this method will perform the same synchronization behavior as would run periodically for the library. The :attr:`Com::Vmware::Content::Library::SubscriptionInfo.on_demand` setting is respected. Calling this method on a library that is already in the process of synchronizing will have no effect.

Parameters

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

Exceptions

  Com::Vmware::Vapi::Std::Errors::NotFound | if the library specified by `library_id` does not exist.
  Com::Vmware::Vapi::Std::Errors::InvalidElementType | if the library specified by `library_id` is not a subscribed library.
  Com::Vmware::Vapi::Std::Errors::InvalidArgument | if some parameter in the subscribed library subscription info is invalid.
  Com::Vmware::Vapi::Std::Errors::ResourceInaccessible | if the published library cannot be contacted or found.

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

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

Updates the properties of a subscribed library.

This is an incremental update to the subscribed library. Fields that are null in the update specification will be left unchanged.

Parameters

  library_id | [REQUIRED] Identifier of the subscribed 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 subscribed library. . The value must be Com::Vmware::Content::LibraryModel.

Exceptions

  Com::Vmware::Vapi::Std::Errors::NotFound | if the library specified by `library_id` does not exist.
  Com::Vmware::Vapi::Std::Errors::InvalidElementType | if the library specified by `library_id` is not a subscribed library.
  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.
  Com::Vmware::Vapi::Std::Errors::ResourceInaccessible | if the subscription info is being updated but the published library cannot be contacted or found.

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/SubscribedLibrary.pm