Developer Documentation

LibraryModel

The LibraryModel structure represents a Content Library resource model. A LibraryModel is a container for a set of items which represent a usable set of files. The Content Library Service allows for multiple libraries to be created with separate authorization and sharing policies.

Each LibraryModel is a container for a set of ItemModel instances. Each item is a logical object in a library, which may have multiple files.

A LibraryModel may be local or subscribed. A local library has its source of truth about items within this Content Library Service. Items may be added to or removed from the library. A local library may also be private or published. When published, the library is exposed by a network endpoint and can be used by another Content Library Service for synchronization. A private local library cannot be used for synchronization.

A subscribed library is a library which gets its source of truth from another library that may be across a network in another Content Library Service. A subscribed library may have a different name and metadata from the library to which it subscribes, but the set of library items is always the same as those in the source library. Library items cannot be manually added to a subscribed library – they can only be added by adding new items to the source library.


Properties

Required Property Name Type Description
optional creation_time string

The date and time when this library was created. This field is not used for the create operation. It will always be present in the result of the get or list operations. It is not used for the update operation.

optional description string

A human-readable description for this library. This field is optional for the create operation. Leaving it unset during creation will result in an empty string value. It will always be present in the result of a get or list operation. It is optional for the update operation. Leaving it unset during update indicates that the description should be left unchanged.

optional id string

An identifier which uniquely identifies this LibraryModel. This field is not used for the create operation. It will not be present in the result of the get or list operations. It is not used for the update operation. When clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: com.vmware.content.Library. When operations return a value of this structure as a result, the field will be an identifier for the resource type: com.vmware.content.Library.

optional last_modified_time string

The date and time when this library was last updated. This field is updated automatically when the library properties are changed. This field is not affected by adding, removing, or modifying a library item or its content within the library. Tagging the library or syncing the subscribed library does not alter this field.

This field is not used for the create operation. It will always be present in the result of the get or list operations. It is not used for the update operation.

optional last_sync_time string

The date and time when this library was last synchronized. This field applies only to subscribed libraries. It is updated every time a synchronization is triggered on the library. The value is unset for a local library.

This field is not used for the create operation. It is optional in the result of the get or list operations. It is not used for the update operation.

optional name string

The name of the library. A Library is identified by a human-readable name. Library names cannot be undefined or an empty string. Names do not have to be unique.

This field must be provided for the create operation. It will always be present in the result of the get or list operations. It is optional for the update operation.

optional optimization_info LibraryOptimizationInfo

Defines various optimizations and optimization parameters applied to this library. This field is optional for the create operation. It is optional in the result of the get or list operations. It is optional for the update operation.

optional publish_info LibraryPublishInfo

Defines how this library is published so that it can be subscribed to by a remote subscribed library. The PublishInfo defines where and how the metadata for this local library is accessible. A local library is only published publically if PublishInfo.published is true.

This field is optional for the create and update operations. If not specified during creation, the default is for the library to not be published. If not specified during update, the field is left unchanged.

optional server_guid string

The unique identifier of the vCenter server where the library exists. This field is optional for the create operation. It will always be present in the result of the get or list operations. It is not used for the update operation. When clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: com.vmware.vcenter.VCenter. When operations return a value of this structure as a result, the field will be an identifier for the resource type: com.vmware.vcenter.VCenter.

optional storage_backings array of LibraryStorageBacking

The list of default storage backings which are available for this library. A StorageBacking defines a default storage location which can be used to store files for library items in this library. Some library items, for instance, virtual machine template items, support files that may be distributed across various storage backings. One or more item files may or may not be located on the default storage backing.

Multiple default storage locations are not currently supported but may become supported in future releases.

This field must be provided for the create operation. It will always be present in the result of the get or list operations. It is not used for the update operation.

optional subscription_info LibrarySubscriptionInfo

Defines the subscription behavior for this Library. The SubscriptionInfo defines how this subscribed library synchronizes to a remote source. Setting the value will determine the remote source to which the library synchronizes, and how. Changing the subscription will result in synchronizing to a new source. If the new source differs from the old one, the old library items and data will be lost. Setting SubscriptionInfo.automatic-sync-enabled to false will halt subscription but will not remove existing cached data.

This field is optional for the create and update operations. If not specified during creation, a default will be created without an active subscription. If not specified during update, the field is left unchanged.

optional type LibraryModelLibraryType Enum

The type (LibraryModel.LibraryType) of this library. This value can be used to determine what additional services and information can be available for this library. This field is not used for the create and update operations. It will always be present in the result of a get operation.

This field is not used for the create operation. It will always be present in the result of the get or list operations. It is not used for the update operation.

optional version string

A version number which is updated on metadata changes. This value allows clients to detect concurrent updates and prevent accidental clobbering of data. This value represents a number which is incremented every time library properties, such as name or description, are changed. It is not incremented by changes to a library item within the library, including adding or removing items. It is also not affected by tagging the library.

This field is not used for the create operation. It will always be present in the result of a get or list operation. It is optional for the update operation. Leaving it unset during update indicates that you do not need to detect concurrent updates.

Feedback

Was this page helpful?