1.5
Table Of Contents
- vCloud API Programming Guide
- Contents
- vCloud API Programming Guide
- About the VMware vCloud API
- Hello vCloud: A Simplified RESTful Workflow
- Exploring a Cloud
- Provisioning an Organization with vApps, Templates, and Media
- Deploying and Operating vApps
- Summary of vCloud API vApp and Virtual Machine Operations Requests
- Create a vApp From a Template
- Compose a vApp From Existing Virtual Machines
- Recompose a vApp to Add or Remove Virtual Machines
- Operate a vApp
- Configuring vApps and Virtual Machines
- Retrieve the Configuration Links for a vApp
- Retrieve the Configuration Links for a Virtual Machine
- Retrieve or Update a Modifiable Section
- Update a vApp Network Configuration
- Update the NetworkConnectionSection of a Virtual Machine
- Retrieve or Modify the CPU Configuration of a Virtual Machine
- Retrieve or Modify the GuestCustomizationSection of a Virtual Machine
- Retrieve or Modify ProductSection Elements
- Retrieve or Modify Groups of Related Sections in a Virtual Machine
- Retrieve or Modify the Hard Disk Configuration of a Virtual Machine
- Creating, Provisioning, and Managing Organizations
- Summary of Administrative Requests
- Administrator Credentials and Privileges
- Organization Administration
- Network Administration
- vDC Administration
- Catalog Administration
- User and Group Administration
- Working With Roles and Rights
- Controlling Access to vApps and Catalogs
- Using vCloud API Extensions to Provision and Manage a Cloud
- Working With Object Metadata
- Using the Query Service
- Configuring and Using Blocking Tasks and Notifications
- XML Representations in the vCloud API
- Index
Example: ResourceEntity and Corresponding CatalogItem
This example starts with this ResourceEntity, which references a vApp template.
<ResourceEntity
href="https://vcloud.example.com/api/vAppTemplate/vappTemplate-111"
type="application/vnd.vmware.vcloud.vAppTemplate+xml"
name="Ubuntu Template with vsftpd"/>
Follow these guidelines to create a CatalogItem from a ResourceEntity.
n
The name attribute of the CatalogItem can be the same as the one in the ResourceEntity, or you can make
up a new value for name.
n
The Description element of the CatalogItem can be the same as the Description element for the object
that the ResourceEntity element references, or you can create a Description element.
n
The href attribute of the Entity element in the CatalogItem must have the same value as the href attribute
of the ResourceEntity that the CatalogItem references.
This request creates the catalog item that is retrieved in “Example: Retrieve a Catalog Item,” on page 29. The
response echoes the request, and includes links that an administrator or catalog owner can use to manage the
CatalogItem and its metadata.
Request:
POST https://vcloud.example.com/api/catalog/32/catalogItems
Content-Type: application/vnd.vmware.vcloud.catalogItem+xml
...
<?xml version="1.0" encoding="UTF-8"?>
<CatalogItem
name="Ubuntu Template with vsftpd"
type="application/vnd.vmware.vcloud.catalogItem+xml"
xmlns="http://www.vmware.com/vcloud/v1.5">
<Description>Approved template for public FTP sites</Description>
<Entity
href="https://vcloud.example.com/api/vAppTemplate/vappTemplate-111"/>
</CatalogItem>
Response:
200 OK
Content-Type: application/vnd.vmware.vcloud.catalogItem+xml
...
<CatalogItem
xmlns="http://www.vmware.com/vcloud/v1.5"
name="Ubuntu Template with vsftpd"
id="urn:vcloud:catalogitem:221"
href="https://vcloud.example.com/api/catalogItem/221" ... >
<Link
rel="up"
type="application/vnd.vmware.vcloud.catalog+xml"
href="https://vcloud.example.com/api/catalog/32" />
<Link
rel="down"
type="application/vnd.vmware.vcloud.metadata+xml"
href="https://vcloud.example.com/api/catalogItem/221/metadata" />
<Link
rel="edit"
vCloud API Programming Guide
72 VMware, Inc.