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
 All Classes Files Functions
List of all members
Com::Vmware::Content::Library::SubscribedItem Class Reference
Inheritance diagram for Com::Vmware::Content::Library::SubscribedItem:
Com::Vmware::Vapi::Bindings::VapiInterface

Avaliable Methods

public method evict ()
 
public method sync ()
 
public method new ()
 

Detailed Description

The Com::Vmware::Content::Library::SubscribedItem interface manages the unique features of library items that are members of a subscribed library.

Member Function Documentation

public method Com::Vmware::Content::Library::SubscribedItem::evict ( )

Evicts the cached content of a library item in a subscribed library.

This method allows the cached content of a library item to be removed to free up storage capacity. This method will only work when a library item is synchronized on-demand. When a library is not synchronized on-demand, it always attempts to keep its cache up-to-date with the published source. Evicting the library item will set :attr:Com::Vmware::Content::Library::ItemModel.cached to false.

Parameters
library_item_id[REQUIRED] Identifier of the library item whose content should be evicted. The value must be an identifier for the resource type getQualifiedName(com.vmware.content.library.Item). . The value must be str.
Exceptions
Com::Vmware::Vapi::Std::Errors::NotFoundif the library item specified by library_item_id does not exist.
Com::Vmware::Vapi::Std::Errors::InvalidElementTypeif the library item specified by library_item_id is not a member of a subscribed library.
Com::Vmware::Vapi::Std::Errors::InvalidElementConfigurationif the library item specified by library_item_id is a member of a subscribed library that does not synchronize on-demand.
Code:
click to view
public method Com::Vmware::Content::Library::SubscribedItem::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
Blessedobject
Code:
click to view
public method Com::Vmware::Content::Library::SubscribedItem::sync ( )

Forces the synchronization of an individual library item in a subscribed library.

Synchronizing an individual item will update that item's metadata from the remote source. If the source library item on the remote library has been deleted, this method will delete the library item from the subscribed library as well.

The default behavior of the synchronization is determined by the class Com::Vmware::Content::Library::SubscriptionInfo of the library which owns the library item.

  • If :attr:Com::Vmware::Content::Library::SubscriptionInfo.on_demand is true, then the file content is not synchronized by default. In this case, only the library item metadata is synchronized. The file content may still be forcefully synchronized by passing true for the force_sync_content parameter .
  • If :attr:Com::Vmware::Content::Library::SubscriptionInfo.on_demand is false, then this call will always synchronize the file content. The force_sync_content parameter* is ignored when the subscription is not on-demand.

When the file content has been synchronized, the :attr:Com::Vmware::Content::Library::ItemModel.cached field will be true.

This method will return immediately and create an asynchronous task to perform the synchronization.

Parameters
library_item_id[REQUIRED] Identifier of the library item to synchronize. The value must be an identifier for the resource type getQualifiedName(com.vmware.content.library.Item). . The value must be str.
force_sync_content[REQUIRED] Whether to synchronize file content as well as metadata. This parameter applies only if the subscription is on-demand. . The value must be Boolean.
Exceptions
Com::Vmware::Vapi::Std::Errors::NotFoundif the library item specified by library_item_id could not be found.
Com::Vmware::Vapi::Std::Errors::InvalidElementTypeif the library item specified by library_item_id is not a member of a subscribed library.
Code:
click to view

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