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
Working With Object Metadata 8
The vCloud API provides a general-purpose facility for associating user-defined metadata with an object. A
system administrator or the owner of an object can use the metadata link in the object's representation to access
object metadata.
The representations of most first-class objects in the vCloud API include a link to a Metadata element, which
contains zero or more
name
=
value
pairs that the owner of an object can create, retrieve, update, and delete.
Object metadata gives cloud operators and cloud tenants a flexible way to apply properties to objects and use
property values to help integrate the use and management of those objects with a variety of applications. Object
metadata is preserved when objects are copied.
vCloud API Object Metadata Links
The representation of any object that has metadata includes a link that you can use to retrieve the object's
Metadata element. This example shows the metadata link from an Org element.
<Link
rel="down"
type="application/vnd.vmware.vcloud.metadata+xml"
href="https://vcloud.example.com/api/org/26/metadata"/>
vCloud API Object Metadata Contents
An object's Metadata element can contain up to 1024 MetadataEntry elements. Each MetadataEntry includes a
single
name
=
value
pair, represented in its Key and Value elements. A system administrator or object owner can
retrieve or update a Value by making a request to a URL that includes the name of the Key.
Key names are defined by Key element contents. These names are Unicode strings and must be encoded as
described in RFC3986 (pct-encoded). A key name must be unique within the scope of an object's metadata. To
modify an individual key name, you must modify the entire Metadata element.
The following rules apply when you update a Metadata element.
n
When the content of a Key element in the update does not match the content of an existing Key, the
MetadataEntry containing that Key is added to the Metadata element.
n
When the content of Key element in the update matches the content of an existing Key, the
MetadataEntry containing that Key is replaced.
VMware, Inc.
195