VMware

SubscribedLibrary Namespace

List of commands:



Create Command

dcli com vmware content subscribedlibrary create

Description

Creates a new subscribed library. Once created, the subscribed library will be empty. If the 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.

Options

Option Name Type Required Description
client‑token string No 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.
description string No A human-readable description for this library. This option is optional for the create command. 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 command. It is optional for the update command. Leaving it unset during update indicates that the description should be left unchanged.
name string No 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 option must be provided for the create command. It will always be present in the output of the get or list commands. It is optional for the update command.
storage‑backings‑type string No Type (DATASTORE, OTHER) of StorageBacking. This option must be provided for the create command. It will always be present in the output of the get or list commands. It is not used for the update command. Valid values are: {DATASTORE, OTHER}
storage‑backings‑datastore‑id string No Identifier of the datastore used to store the content in the library. When clients pass a value of this class as a parameter, the option must be an identifier for the resource type: Datastore. When commands return a value of this class as a output, the option will be an identifier for the resource type: Datastore. This option is optional and it is only relevant when the value of type is DATASTORE.
storage‑backings‑storage‑uri string No URI identifying the location used to store the content in the library. The following URI formats are supported: vSphere 6.5
  • nfs://server/path?version=4 (for vCenter Server Appliance only) - Specifies an NFS Version 4 server.
  • nfs://server/path (for vCenter Server Appliance only) - Specifies an NFS Version 3 server. The nfs://server:/path format is also supported.
  • smb://server/path - Specifies an SMB server or Windows share.
vSphere 6.0 Update 1
  • nfs://server:/path (for vCenter Server Appliance only)
  • file://unc-server/path (for vCenter Server for Windows only)
  • file:///mount/point (for vCenter Server Appliance only) - Local file URIs are supported only when the path is a local mount point for an NFS file system. Use of file URIs is strongly discouraged. Instead, use an NFS URI to specify the remote file system.
vSphere 6.0
  • nfs://server:/path (for vCenter Server Appliance only)
  • file://unc-server/path (for vCenter Server for Windows only)
  • file:///path - Local file URIs are supported but strongly discouraged because it may interfere with the performance of vCenter Server.
This option is optional and it is only relevant when the value of type is OTHER.
type string No The type (LOCAL, SUBSCRIBED) of this library. This value can be used to determine what additional services and information can be available for this library. This option must be provided for the create command. It will always be present in the output of the get or list commands. It is not used for the update command. Valid values are: {LOCAL, SUBSCRIBED}
optimization‑info‑optimize‑remote‑publishing bool No If set to true then library would be optimized for remote publishing. Turn it on if remote publishing is dominant use case for this library. Remote publishing means here that publisher and subscribers are not the part of the same Vcenter SSO domain. Any optimizations could be done as result of turning on this optimization during library creation. For example, library content could be stored in different format but optimizations are not limited to just storage format. Note, that value of this toggle could be set only during creation of the library and you would need to migrate your library in case you need to change this value (optimize the library for different use case). This option is optional for the create command. If not specified for the create, the default is for the library to not be optmized for specific use case. It is not used for the update command.
publish‑info‑authentication‑method string No Indicates how a subscribed library should authenticate (BASIC, NONE) to the published library endpoint. This option must be provided for the create command. It will always be present in the output of the get or list commands. It is optional for the update command. Valid values are: {BASIC, NONE}
publish‑info‑published bool No Whether the local library is published. This option must be provided for the create command. It will always be present in the output of the get or list commands. It is optional for the update command.
publish‑info‑user‑name string No The username to require for authentication. This option is optional for the create and update command. When the authentication is not required, the username can be left unset. When the authentication method is basic, the username is ignored in the current release. It defaults to "vcsp". It is preferable to leave this unset. If specified, it must be set to "vcsp".
publish‑info‑password string No The password to require for authentication. This option is optional for the create command. When the authentication method is NONE, the password can be left unset. When the authentication method is BASIC, the password should be a non-empty string. This option is optional for the update command. Leaving it unset during update indicates that the password is not changed. This option is not used for the get or list command.
publish‑info‑persist‑json‑enabled bool No Whether library and library item metadata are persisted in the storage backing as JSON files. This flag only applies if the local library is published. Enabling JSON persistence allows you to synchronize a subscribed library manually instead of over HTTP. You copy the local library content and metadata to another storage backing manually and then create a subscribed library referencing the location of the library JSON file in the SubscriptionInfo.subscription-url. When the subscribed library's storage backing matches the subscription URL, files do not need to be copied to the subscribed library. For a library backed by a datastore, the library JSON file will be stored at the path contentlib-{library_id}/lib.json on the datastore. For a library backed by a remote file system, the library JSON file will be stored at {library_id}/lib.json in the remote file system path. This option is optional for the create command. It will always be present in the output of the get or list commands. It is optional for the update command.
subscription‑info‑authentication‑method string No Indicate how the subscribed library should authenticate (BASIC, NONE) with the published library endpoint. This option must be provided for the create command. It will always be present in the output of the get or list commands. It is optional for the update command. Valid values are: {BASIC, NONE}
subscription‑info‑automatic‑sync‑enabled bool No Whether the library should participate in automatic library synchronization. In order for automatic synchronization to happen, the global ConfigurationModel.automatic-sync-enabled option must also be true. The subscription is still active even when automatic synchronization is turned off, but synchronization is only activated with an explicit call to SubscribedLibrary.sync or SubscribedItem.sync. In other words, manual synchronization is still available even when automatic synchronization is disabled. This option must be provided for the create command. It will always be present in the output of the get or list commands. It is optional for the update command.
subscription‑info‑on‑demand bool No Indicates whether a library item's content will be synchronized only on demand. If this is set to true, then the library item's metadata will be synchronized but the item's content (its files) will not be synchronized. The Content Library Service will synchronize the content upon request only. This can cause the first use of the content to have a noticeable delay. Items without synchronized content can be forcefully synchronized in advance using the SubscribedItem.sync call with forceSyncContent set to true. Once content has been synchronized, the content can removed with the SubscribedItem.evict call. If this value is set to false, all content will be synchronized in advance. This option must be provided for the create command. It will always be present in the output of the get or list commands. It is optional for the update command.
subscription‑info‑password string No The password to use when authenticating. The password must be set when using a password-based authentication method; empty strings are not allowed. This option is optional for the create command. It will not be present in the output of the get or list commands. It is optional for the update command.
subscription‑info‑ssl‑thumbprint string No An optional SHA-1 hash of the SSL certificate for the remote endpoint. If this value is defined the SSL certificate will be verified by comparing it to the SSL thumbprint. The SSL certificate must verify against the thumbprint. When specified, the standard certificate chain validation behavior is not used. The certificate chain is validated normally if this value is unset. This option is optional for the create command. It will not be present in the output of the get or list commands. It is optional for the update command.
subscription‑info‑subscription‑url string No The URL of the endpoint where the metadata for the remotely published library is being served. This URL can be the PublishInfo.publish-url of the published library (for example, https://server/path/lib.json). If the source content comes from a published library with PublishInfo.persist-json-enabled, the subscription URL can be a URL pointing to the library JSON file on a datastore or remote file system. The supported formats are: vSphere 6.5
  • ds:///vmfs/volumes/{uuid}/mylibrary/lib.json (for datastore)
  • nfs://server/path/mylibrary/lib.json (for NFSv3 server on vCenter Server Appliance)
  • nfs://server/path/mylibrary/lib.json?version=4 (for NFSv4 server on vCenter Server Appliance)
  • smb://server/path/mylibrary/lib.json (for SMB server)
vSphere 6.0
  • file://server/mylibrary/lib.json (for UNC server on vCenter Server for Windows)
  • file:///path/mylibrary/lib.json (for local file system)
When you specify a DS subscription URL, the datastore must be on the same vCenter Server as the subscribed library. When you specify an NFS or SMB subscription URL, the StorageBacking.storage-uri of the subscribed library must be on the same remote file server and should share a common parent path with the subscription URL. This option must be provided for the create command. It will always be present in the output of the get or list commands. It is optional for the update command.
subscription‑info‑user‑name string No The username to use when authenticating. The username must be set when using a password-based authentication method. Empty strings are allowed for usernames. This option is optional for the create command. It is optional in the output of the get or list commands. It is optional for the update command.
server‑guid string No The unique identifier of the vCenter server where the library exists. When clients pass a value of this class as a parameter, the option must be an identifier for the resource type: com.vmware.vcenter.VCenter. When commands return a value of this class as a output, the option will be an identifier for the resource type: com.vmware.vcenter.VCenter. This option is optional for the create command. It will always be present in the output of the get or list commands. It is not used for the update command.

Example

dcli com vmware content subscribedlibrary create


Delete Command

dcli com vmware content subscribedlibrary delete

Description

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.

Options

Option Name Type Required Description
library‑id string Yes Identifier of the subscribed library to delete. The parameter must be an identifier for the resource type: com.vmware.content.Library.

Example

dcli com vmware content subscribedlibrary delete --library-id testId


Evict Command

dcli com vmware content subscribedlibrary evict

Description

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

Options

Option Name Type Required Description
library‑id string Yes Identifier of the subscribed library whose content should be evicted. The parameter must be an identifier for the resource type: com.vmware.content.Library.

Example

dcli com vmware content subscribedlibrary evict --library-id testId


Get Command

dcli com vmware content subscribedlibrary get

Description

Returns a given subscribed library.

Options

Option Name Type Required Description
library‑id string Yes Identifier of the subscribed library to return. The parameter must be an identifier for the resource type: com.vmware.content.Library.

Example

dcli com vmware content subscribedlibrary get --library-id testId


List Command

dcli com vmware content subscribedlibrary list

Description

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

Example

dcli com vmware content subscribedlibrary list


Sync Command

dcli com vmware content subscribedlibrary sync

Description

Forces the synchronization of the subscribed library. Synchronizing a subscribed library forcefully with this command will perform the same synchronization behavior as would run periodically for the library. The SubscriptionInfo.on-demand setting is respected. Calling this command on a library that is already in the process of synchronizing will have no effect.

Options

Option Name Type Required Description
library‑id string Yes Identifier of the subscribed library to synchronize. The parameter must be an identifier for the resource type: com.vmware.content.Library.

Example

dcli com vmware content subscribedlibrary sync --library-id testId


Update Command

dcli com vmware content subscribedlibrary update

Description

Updates the properties of a subscribed library. This is an incremental update to the subscribed library. Options that are unset in the update specification will be left unchanged.

Options

Option Name Type Required Description
library‑id string Yes Identifier of the subscribed library to update. The parameter must be an identifier for the resource type: com.vmware.content.Library.
description string No A human-readable description for this library. This option is optional for the create command. 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 command. It is optional for the update command. Leaving it unset during update indicates that the description should be left unchanged.
name string No 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 option must be provided for the create command. It will always be present in the output of the get or list commands. It is optional for the update command.
version string No 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 option is not used for the create command. It will always be present in the result of a get or list command. It is optional for the update command. Leaving it unset during update indicates that you do not need to detect concurrent updates.
publish‑info‑authentication‑method string No Indicates how a subscribed library should authenticate (BASIC, NONE) to the published library endpoint. This option must be provided for the create command. It will always be present in the output of the get or list commands. It is optional for the update command. Valid values are: {BASIC, NONE}
publish‑info‑published bool No Whether the local library is published. This option must be provided for the create command. It will always be present in the output of the get or list commands. It is optional for the update command.
publish‑info‑user‑name string No The username to require for authentication. This option is optional for the create and update command. When the authentication is not required, the username can be left unset. When the authentication method is basic, the username is ignored in the current release. It defaults to "vcsp". It is preferable to leave this unset. If specified, it must be set to "vcsp".
publish‑info‑password string No The password to require for authentication. This option is optional for the create command. When the authentication method is NONE, the password can be left unset. When the authentication method is BASIC, the password should be a non-empty string. This option is optional for the update command. Leaving it unset during update indicates that the password is not changed. This option is not used for the get or list command.
publish‑info‑persist‑json‑enabled bool No Whether library and library item metadata are persisted in the storage backing as JSON files. This flag only applies if the local library is published. Enabling JSON persistence allows you to synchronize a subscribed library manually instead of over HTTP. You copy the local library content and metadata to another storage backing manually and then create a subscribed library referencing the location of the library JSON file in the SubscriptionInfo.subscription-url. When the subscribed library's storage backing matches the subscription URL, files do not need to be copied to the subscribed library. For a library backed by a datastore, the library JSON file will be stored at the path contentlib-{library_id}/lib.json on the datastore. For a library backed by a remote file system, the library JSON file will be stored at {library_id}/lib.json in the remote file system path. This option is optional for the create command. It will always be present in the output of the get or list commands. It is optional for the update command.
subscription‑info‑authentication‑method string No Indicate how the subscribed library should authenticate (BASIC, NONE) with the published library endpoint. This option must be provided for the create command. It will always be present in the output of the get or list commands. It is optional for the update command. Valid values are: {BASIC, NONE}
subscription‑info‑automatic‑sync‑enabled bool No Whether the library should participate in automatic library synchronization. In order for automatic synchronization to happen, the global ConfigurationModel.automatic-sync-enabled option must also be true. The subscription is still active even when automatic synchronization is turned off, but synchronization is only activated with an explicit call to SubscribedLibrary.sync or SubscribedItem.sync. In other words, manual synchronization is still available even when automatic synchronization is disabled. This option must be provided for the create command. It will always be present in the output of the get or list commands. It is optional for the update command.
subscription‑info‑on‑demand bool No Indicates whether a library item's content will be synchronized only on demand. If this is set to true, then the library item's metadata will be synchronized but the item's content (its files) will not be synchronized. The Content Library Service will synchronize the content upon request only. This can cause the first use of the content to have a noticeable delay. Items without synchronized content can be forcefully synchronized in advance using the SubscribedItem.sync call with forceSyncContent set to true. Once content has been synchronized, the content can removed with the SubscribedItem.evict call. If this value is set to false, all content will be synchronized in advance. This option must be provided for the create command. It will always be present in the output of the get or list commands. It is optional for the update command.
subscription‑info‑password string No The password to use when authenticating. The password must be set when using a password-based authentication method; empty strings are not allowed. This option is optional for the create command. It will not be present in the output of the get or list commands. It is optional for the update command.
subscription‑info‑ssl‑thumbprint string No An optional SHA-1 hash of the SSL certificate for the remote endpoint. If this value is defined the SSL certificate will be verified by comparing it to the SSL thumbprint. The SSL certificate must verify against the thumbprint. When specified, the standard certificate chain validation behavior is not used. The certificate chain is validated normally if this value is unset. This option is optional for the create command. It will not be present in the output of the get or list commands. It is optional for the update command.
subscription‑info‑subscription‑url string No The URL of the endpoint where the metadata for the remotely published library is being served. This URL can be the PublishInfo.publish-url of the published library (for example, https://server/path/lib.json). If the source content comes from a published library with PublishInfo.persist-json-enabled, the subscription URL can be a URL pointing to the library JSON file on a datastore or remote file system. The supported formats are: vSphere 6.5
  • ds:///vmfs/volumes/{uuid}/mylibrary/lib.json (for datastore)
  • nfs://server/path/mylibrary/lib.json (for NFSv3 server on vCenter Server Appliance)
  • nfs://server/path/mylibrary/lib.json?version=4 (for NFSv4 server on vCenter Server Appliance)
  • smb://server/path/mylibrary/lib.json (for SMB server)
vSphere 6.0
  • file://server/mylibrary/lib.json (for UNC server on vCenter Server for Windows)
  • file:///path/mylibrary/lib.json (for local file system)
When you specify a DS subscription URL, the datastore must be on the same vCenter Server as the subscribed library. When you specify an NFS or SMB subscription URL, the StorageBacking.storage-uri of the subscribed library must be on the same remote file server and should share a common parent path with the subscription URL. This option must be provided for the create command. It will always be present in the output of the get or list commands. It is optional for the update command.
subscription‑info‑user‑name string No The username to use when authenticating. The username must be set when using a password-based authentication method. Empty strings are allowed for usernames. This option is optional for the create command. It is optional in the output of the get or list commands. It is optional for the update command.

Example

dcli com vmware content subscribedlibrary update --library-id testId


Probe Command

dcli com vmware content subscribedlibrary probe

Description

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

Options

Option Name Type Required Description
authentication‑method string No Indicate how the subscribed library should authenticate (BASIC, NONE) with the published library endpoint. This option must be provided for the create command. It will always be present in the output of the get or list commands. It is optional for the update command. Valid values are: {BASIC, NONE}
automatic‑sync‑enabled bool No Whether the library should participate in automatic library synchronization. In order for automatic synchronization to happen, the global ConfigurationModel.automatic-sync-enabled option must also be true. The subscription is still active even when automatic synchronization is turned off, but synchronization is only activated with an explicit call to SubscribedLibrary.sync or SubscribedItem.sync. In other words, manual synchronization is still available even when automatic synchronization is disabled. This option must be provided for the create command. It will always be present in the output of the get or list commands. It is optional for the update command.
on‑demand bool No Indicates whether a library item's content will be synchronized only on demand. If this is set to true, then the library item's metadata will be synchronized but the item's content (its files) will not be synchronized. The Content Library Service will synchronize the content upon request only. This can cause the first use of the content to have a noticeable delay. Items without synchronized content can be forcefully synchronized in advance using the SubscribedItem.sync call with forceSyncContent set to true. Once content has been synchronized, the content can removed with the SubscribedItem.evict call. If this value is set to false, all content will be synchronized in advance. This option must be provided for the create command. It will always be present in the output of the get or list commands. It is optional for the update command.
password string No The password to use when authenticating. The password must be set when using a password-based authentication method; empty strings are not allowed. This option is optional for the create command. It will not be present in the output of the get or list commands. It is optional for the update command.
ssl‑thumbprint string No An optional SHA-1 hash of the SSL certificate for the remote endpoint. If this value is defined the SSL certificate will be verified by comparing it to the SSL thumbprint. The SSL certificate must verify against the thumbprint. When specified, the standard certificate chain validation behavior is not used. The certificate chain is validated normally if this value is unset. This option is optional for the create command. It will not be present in the output of the get or list commands. It is optional for the update command.
subscription‑url string No The URL of the endpoint where the metadata for the remotely published library is being served. This URL can be the PublishInfo.publish-url of the published library (for example, https://server/path/lib.json). If the source content comes from a published library with PublishInfo.persist-json-enabled, the subscription URL can be a URL pointing to the library JSON file on a datastore or remote file system. The supported formats are: vSphere 6.5
  • ds:///vmfs/volumes/{uuid}/mylibrary/lib.json (for datastore)
  • nfs://server/path/mylibrary/lib.json (for NFSv3 server on vCenter Server Appliance)
  • nfs://server/path/mylibrary/lib.json?version=4 (for NFSv4 server on vCenter Server Appliance)
  • smb://server/path/mylibrary/lib.json (for SMB server)
vSphere 6.0
  • file://server/mylibrary/lib.json (for UNC server on vCenter Server for Windows)
  • file:///path/mylibrary/lib.json (for local file system)
When you specify a DS subscription URL, the datastore must be on the same vCenter Server as the subscribed library. When you specify an NFS or SMB subscription URL, the StorageBacking.storage-uri of the subscribed library must be on the same remote file server and should share a common parent path with the subscription URL. This option must be provided for the create command. It will always be present in the output of the get or list commands. It is optional for the update command.
user‑name string No The username to use when authenticating. The username must be set when using a password-based authentication method. Empty strings are allowed for usernames. This option is optional for the create command. It is optional in the output of the get or list commands. It is optional for the update command.

Example

dcli com vmware content subscribedlibrary probe