5.1

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 up to 1024
name
=
value
pairs that the owner of an object can create, retrieve, update, and delete. It also
contains an additional group of
name
=
value
pairs that are under the control of the system administrator.
Object metadata gives cloud operators and cloud tenants a flexible way to apply user-defined 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, and can be included in query filter
expressions (see “Add a Metadata Filter to a Query,” on page 260).
vCloud API Object Metadata Links
The representation of any object that supports 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
A Metadata element can contain up to 1024 MetadataEntry elements. Each MetadataEntry includes a single
name
=
value
pair, represented in its Key and TypedValue elements. Key names are specified by Key element
contents. A key name is a UTF-8 (Unicode) string encoded as described in RFC3986 (pct-encoded).
The key name must be unique within the scope of the containing Metadata element. Because key names are
implicitly qualified by the Domain value of the containing MetadataEntry, the two key names in this example
are considered to be unique.
<Metadata
...
<MetadataEntry>
<Domain
visibility="READONLY">SYSTEM</Domain>
<Key>Foo</Key>
...
</MetadataEntry>
<MetadataEntry>
<Domain>GENERAL</Domain>
VMware, Inc.
239