Deletes a library item. This operation 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 operation 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.
if you do not have all of the privileges described as follows: - The resource com.vmware.content.library.Item referenced by the parameter libraryItemId requires ContentLibrary.DeleteLibraryItem.
Identifier of the library item to delete. The parameter must be an identifier for the resource type: com.vmware.content.library.Item.
Required session ID, acquired from Create Session API under CIS product
com.vmware.vapi.std.errors.invalid_element_type : if the library item with the given libraryItemId is a member of a subscribed library. | com.vmware.vapi.std.errors.not_allowed_in_current_state : if the library item contains a virtual machine template and a virtual machine is checked out of the library item.
com.vmware.vapi.std.errors.not_found : if the library item with the specified libraryItemId does not exist.
‘Default’ means this response is used for all HTTP codes that are not covered individually for this operation.
PowerCLI Client SDK Example