1.5

Table Of Contents
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