LibraryItem APIs

LibraryItem APIs

The LibraryItem service provides operations to deploy virtual machines and virtual appliances from library items containing Open Virtualization Format (OVF) packages in content library, as well as operations to create library items in content library from virtual machines and virtual appliances. To deploy a virtual machine or a virtual appliance from a library item:

  1. Create a LibraryItem.DeploymentTarget to specify the target deployment type and target deployment designation.
  2. Create a LibraryItem.ResourcePoolDeploymentSpec to specify the parameters for the target deployment.
  3. Use the LibraryItem.deploy operation with the created target and parameter specifications, along with the identifier of the specified source content library item. See LibraryItem.deploy.

To create a library item in content library from a virtual machine or virtual appliance:

  1. Create a LibraryItem.DeployableIdentity to specify the source virtual machine or virtual appliance to be used as the OVF template source.
  2. Create a LibraryItem.CreateTarget to specify the target library and library item.
  3. Create a LibraryItem.CreateSpec to specify the settings for the OVF package to be created.
  4. Use the LibraryItem.create operation with the created target and parameter specifications, along with the specified source entity. See LibraryItem.create.

Operations
POST
Create Ovf Library Item
Creates a library item in content library from a virtual machine or virtual appliance. This operation creates a library item in content library whose content is an OVF package derived from a source virtual machine or virtual appliance, using the supplied create specification. The OVF package may be stored as in a newly created library item or in an in an existing library item. For an existing library item whose content is updated by this operation, the original content is overwritten. Meta data such as name and description is not updated for the exisitng library item. if you do not have all of the privileges described as follows: - Operation execution requires System.Read. - The resource VirtualMachine or VirtualApp referenced by the attribute LibraryItem.DeployableIdentity.id requires VApp.Export. - The resource com.vmware.content.Library referenced by the attribute LibraryItem.CreateTarget.library-id requires ContentLibrary.AddLibraryItem. - The resource com.vmware.content.library.Item referenced by the attribute LibraryItem.CreateTarget.library-item-id requires System.Read.
POST
Deploy Ovf Library Item Id
Deploys an OVF package stored in content library to a newly created virtual machine or virtual appliance. This operation deploys an OVF package which is stored in the library item specified by ovfLibraryItemId. It uses the deployment specification in deploymentSpec to deploy the OVF package to the location specified by target. if you do not have all of the privileges described as follows: - Operation execution requires System.Read. - The resource com.vmware.content.library.Item referenced by the parameter ovfLibraryItemId requires System.Read. - The resource HostSystem referenced by the attribute LibraryItem.DeploymentTarget.host-id requires System.Read. - The resource Network referenced by the map value of attribute LibraryItem.ResourcePoolDeploymentSpec.network-mappings requires System.Read. - The resource StorageProfile referenced by the attribute LibraryItem.ResourcePoolDeploymentSpec.storage-profile-id requires System.Read. - The resource Datastore referenced by the attribute LibraryItem.ResourcePoolDeploymentSpec.default-datastore-id requires System.Read. - The resource ResourcePool referenced by the attribute LibraryItem.DeploymentTarget.resource-pool-id requires VApp.Import. - The resource Folder referenced by the attribute LibraryItem.DeploymentTarget.folder-id requires VApp.Import.
POST
Filter Ovf Library Item Id
Queries an OVF package stored in content library to retrieve information to use when deploying the package. See LibraryItem.deploy. This operation retrieves information from the descriptor of the OVF package stored in the library item specified by ovfLibraryItemId. The information returned by the operation can be used to populate the deployment specification (see LibraryItem.ResourcePoolDeploymentSpec when deploying the OVF package to the deployment target specified by target. if you do not have all of the privileges described as follows: - Operation execution requires System.Read. - The resource com.vmware.content.library.Item referenced by the parameter ovfLibraryItemId requires System.Read. - The resource ResourcePool referenced by the attribute LibraryItem.DeploymentTarget.resource-pool-id requires System.Read. - The resource HostSystem referenced by the attribute LibraryItem.DeploymentTarget.host-id requires System.Read. - The resource Folder referenced by the attribute LibraryItem.DeploymentTarget.folder-id requires System.Read.