VMware

Item Namespace

The Item namespace provides commands for managing library items.

List of commands:



Copy Command

dcli com vmware content library item copy

Description

Copies a library item. Copying a library item allows a duplicate to be made within the same or different library. The copy occurs by first creating a new library item, whose identifier is returned. The content of the library item is then copied asynchronously. This copy can be tracked as a task. If the copy fails, Content Library Service will roll back the copy by deleting any content that was already copied, and removing the new library item. A failure during rollback may require manual cleanup by an administrator. A library item cannot be copied into a subscribed library.

Options

Option Name Type Required Description
client‑token string No A unique token generated on the client for each copy 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 copy. If not specified copy is not idempotent.
source‑library‑item‑id string Yes Identifier of the existing library item from which the content will be copied. The parameter must be an identifier for the resource type: com.vmware.content.library.Item.
id string No A unique identifier for this library item. When clients pass a value of this class as a parameter, the option must be an identifier for the resource type: com.vmware.content.library.Item. When commands return a value of this class as a output, the option will be an identifier for the resource type: com.vmware.content.library.Item. This option is not used for the create command. It will not be present in the output of the get or list commands. It is not used for the update command.
library‑id string No The identifier of the LibraryModel to which this item belongs. When clients pass a value of this class as a parameter, the option must be an identifier for the resource type: com.vmware.content.Library. When commands return a value of this class as a output, the option will be an identifier for the resource type: com.vmware.content.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.
content‑version string No The version of the file content list of this library item. This option is not used 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.
creation‑time string No The date and time when this library item was created. This option is not used 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.
description string No A human-readable description for this library item. 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 remains unchanged.
last‑modified‑time string No The date and time when the metadata for this library item was last changed. This option is affected by changes to the properties or file content of this item. It is not modified by changes to the tags of the item, or by changes to the library which owns this item. This option is not used 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.
last‑sync‑time string No The date and time when this library item was last synchronized. This option is updated every time a synchronization is triggered on the library item, including when a synchronization is triggered on the library to which this item belongs. The value is unset for a library item that belongs to a local library. This option is not used for the create command. It is optional in the output of the get or list commands. It is not used for the update command.
metadata‑version string No A version number for the metadata of this library item. This value is incremented with each change to the metadata of this item. Changes to name, description, and so on will increment this value. The value is not incremented by changes to the content or tags of the item or the library which owns it. This option is not used 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.
name string No A human-readable name for this library item. The name may not be unset or an empty string. The name does not have to be unique, even within the same 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 optional for the update command.
cached bool No The status that indicates whether the library item is on disk or not. The library item is cached when all its files are on disk. This option is not used 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.
size int No The library item size, in bytes. The size is the sum of the size used on the storage backing for all the files in the item. When the library item is not cached, the size is 0. This option is not used for the create command. It is optional in the output of the get or list commands. It is not used for the update command.
type string No An optional type identifier which indicates the type adapter plugin to use. This option may be set to a non-empty string value that corresponds to an identifier supported by a type adapter plugin present in the Content Library Service. A type adapter plugin, if present for the specified type, can provide additional information and services around the item content. A type adapter can guide the upload process by creating file entries that are in need of being uploaded to complete an item. The types and plugins supported by the Content Library Service can be queried using the Type namespace. This option is optional for the create and update commands. During creation, if the type is left unspecified, or if the type is specified but does not have a corresponding type support plugin, then the type of the library item is considered to be generic and all data is treated as generic files. During update, if the type is not specified, then it is not updated.
version string No A version number that is updated on metadata changes. This value is used to validate update requests to provide optimistic concurrency of changes. This value represents a number that is incremented every time library item properties, such as name or description, are changed. It is not incremented by changes to the file content of the library item, including adding or removing files. It is also not affected by tagging the library item. 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.
source‑id string No The identifier of the ItemModel to which this item is synchronized to if the item belongs to a subscribed library. The value is unset for a library item that belongs to a local library. When clients pass a value of this class as a parameter, the option must be an identifier for the resource type: com.vmware.content.library.Item. When commands return a value of this class as a output, the option will be an identifier for the resource type: com.vmware.content.library.Item. This option is not used for the create command. It is optional in the output of the get or list commands. It is not used for the update command.

Example

dcli com vmware content library item copy --source-library-item-id testId


Create Command

dcli com vmware content library item create

Description

Creates a new library item. A new library item is created without any content. After creation, content can be added through the UpdateSession and File namespaces. A library item cannot be created in a subscribed library.

Options

Option Name Type Required Description
client‑token string No A 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.
library‑id string No The identifier of the LibraryModel to which this item belongs. When clients pass a value of this class as a parameter, the option must be an identifier for the resource type: com.vmware.content.Library. When commands return a value of this class as a output, the option will be an identifier for the resource type: com.vmware.content.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.
description string No A human-readable description for this library item. 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 remains unchanged.
name string No A human-readable name for this library item. The name may not be unset or an empty string. The name does not have to be unique, even within the same 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 optional for the update command.
type string No An optional type identifier which indicates the type adapter plugin to use. This option may be set to a non-empty string value that corresponds to an identifier supported by a type adapter plugin present in the Content Library Service. A type adapter plugin, if present for the specified type, can provide additional information and services around the item content. A type adapter can guide the upload process by creating file entries that are in need of being uploaded to complete an item. The types and plugins supported by the Content Library Service can be queried using the Type namespace. This option is optional for the create and update commands. During creation, if the type is left unspecified, or if the type is specified but does not have a corresponding type support plugin, then the type of the library item is considered to be generic and all data is treated as generic files. During update, if the type is not specified, then it is not updated.

Example

dcli com vmware content library item create


Delete Command

dcli com vmware content library item delete

Description

Deletes a library item. This command will immediately remove the item from the library that owns it. The content of the item will be asynchronously removed from the storage backings. The content deletion can be tracked with a task. In the event that the task fails, an administrator may need to manually remove the files from the storage backing. This command cannot be used to delete a library item that is a member of a subscribed library. Removing an item from a subscribed library requires deleting the item from the original published local library and syncing the subscribed library.

Options

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

Example

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


Get Command

dcli com vmware content library item get

Description

Returns the ItemModel with the given identifier.

Options

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

Example

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


List Command

dcli com vmware content library item list

Description

Returns the identifiers of all items in the given library.

Options

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

Example

dcli com vmware content library item list --library-id testId


Find Command

dcli com vmware content library item find

Description

Returns identifiers of all the visible (as determined by authorization policy) library items matching the requested Item.FindSpec.

Options

Option Name Type Required Description
name string No The name of the library item. The name is case-insensitive. See ItemModel.name. If not specified all library item names are searched.
library‑id string No The identifier of the library containing the item. See ItemModel.library-id. When clients pass a value of this class as a parameter, the option must be an identifier for the resource type: com.vmware.content.Library. When commands return a value of this class as a output, the option will be an identifier for the resource type: com.vmware.content.Library. If not specified all libraries are searched.
source‑id string No The identifier of the library item as reported by the publisher. See ItemModel.source-id. When clients pass a value of this class as a parameter, the option must be an identifier for the resource type: com.vmware.content.library.Item. When commands return a value of this class as a output, the option will be an identifier for the resource type: com.vmware.content.library.Item. If not specified all library items are searched.
type string No The type of the library item. The type is case-insensitive. See ItemModel.type. If not specified all types are searched.
cached bool No Whether the item is cached. Possible values are 'true' or 'false'. See ItemModel.cached. If not specified all library items are searched.

Example

dcli com vmware content library item find


Update Command

dcli com vmware content library item update

Description

Updates the specified properties of a library item. This is an incremental update to the library item. Options that are unset in the update specification are left unchanged. This command cannot update a library item that is a member of a subscribed library. Those items must be updated in the source published library and synchronized to the subscribed library.

Options

Option Name Type Required Description
library‑item‑id string Yes Identifier of the library item to update. The parameter must be an identifier for the resource type: com.vmware.content.library.Item.
description string No A human-readable description for this library item. 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 remains unchanged.
name string No A human-readable name for this library item. The name may not be unset or an empty string. The name does not have to be unique, even within the same 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 optional for the update command.
type string No An optional type identifier which indicates the type adapter plugin to use. This option may be set to a non-empty string value that corresponds to an identifier supported by a type adapter plugin present in the Content Library Service. A type adapter plugin, if present for the specified type, can provide additional information and services around the item content. A type adapter can guide the upload process by creating file entries that are in need of being uploaded to complete an item. The types and plugins supported by the Content Library Service can be queried using the Type namespace. This option is optional for the create and update commands. During creation, if the type is left unspecified, or if the type is specified but does not have a corresponding type support plugin, then the type of the library item is considered to be generic and all data is treated as generic files. During update, if the type is not specified, then it is not updated.
version string No A version number that is updated on metadata changes. This value is used to validate update requests to provide optimistic concurrency of changes. This value represents a number that is incremented every time library item properties, such as name or description, are changed. It is not incremented by changes to the file content of the library item, including adding or removing files. It is also not affected by tagging the library item. 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.

Example

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