The vCloud Air Platform APIs make extensive use of Link elements to provide references to objects and the actions that they support. These elements are the primary mechanism by which a server tells a client how to access and operate on an object.

vCloud Air creates Link elements in a response, which are read-only for the client. If a request includes a Link element, the server ignores it.

In the XML representation of a vCloud object, each Link element has the following form:

<Link
   rel="relationship"
   name="string"
   type="application/xml;class=vnd.vmware.vchs.{type}"
   href="URL" />

LinkType is used for only up and down links; typically, objects do not extend from LinkType.

The media type is represented in the request as the value of the class attribute:

application/xml;class=type;version=5.6

Where type corresponds to the XML structure returned. All class values start with the string vnd.vmware.vchs.

The vCloud Air object model contains elements and references within those elements.

Elements

References  

Session

Services

ServiceList

Service

Compute

VdcRef

VcloudSession     

VdcLink

Each reference contains the URL and media type of the referenced object. The following diagram shows where references provide URLs to other elements (solid black arrow). Additionally, The Compute and VcloudSession elements contain up links to the ServiceList and Compute elements, respectively.

Link Relationships in the Object Model
Link Relationships in the Object Model

When a client creates a session, the client receives a SessionType response, which contains a link to the services for that vCloud Air account. The client sends a GET request to the service link and receives a list of services. Each service contains a service type, service ID, region, and an href to the service. When the client invokes the service href, the client receives a Compute response that contains the type of service, its service ID, and a list of the virtual data center references. Region refers to a collection of physical data centers that are located in distinctly separate geographic areas. You select a region or regions when you purchase compute services. The virtual data center reference contains a link that you can use to log in to vCloud for the Organization corresponding to the VDCReference.