5.6

serviceType="compute:dedicatedcloud"
type="application/xml;class=vnd.vmware.vchs.compute"
href="https://vchs.vmware.com/api/vchs/compute/vchs-2" />
</Services>
Create a Session for a Virtual Data Center in a Service
When you log in to vCloud Air, you retrieve the Services element, which contains elements for each
Compute Service your company has purchased for vCloud Air. Each Service element in the list contains a
reference to the service.
Prerequisites
Verify that you are logged in to vCloud Air and assigned to a user role that can access the API.
Invoking the URL for a service reference returns a Compute element. The Compute element includes an
attribute for the serviceType and references to all the virtual data centers created within that service.
When the serviceType is a compute:dedicatedcloud, the Compute element has zero or more virtual data
centers. When the serviceType is compute:vpc, the Compute element has one virtual data center.
The reference for each virtual data center (VdcRef) contains the virtual data center name and a link to that
virtual data center. Each VdcRef also contains a link to retrieve the vCloud session for that virtual data
center.
Procedure
1 Using the Service element returned from the request for the service list, issue a GET request to the URL
for the service:
GET https://vchs.vmware.com/api/vchs/compute/compute-uuid
The returned Compute element contains references to the virtual data centers provisioned for that
service.
<Compute
...>
<Link
...>
<VdcRef
...
href="https://vchs.vmware.com/api/vchs/compute/compute-uuid}/vdc/vdc-uuid" />
</Compute>
2 Using the VdcRef href, invoke the reference to the virtual data center for which you want to get a
session:
GET href=https://vchs.vmware.com/api/vchs/compute/compute-uuid/vdc/compute-uuid
The returned response contains a reference to retrieve a session for that virtual data center:
<Vdc
...>
<Link rel="down"
...>
href="https://vchs.vmware.com/api/vchs/compute/compute-uuid/vdc/vdc-
uuid/vcloudsession" />
</Vdc>
vCloud Air Platform Programmer's Guide
18 VMware, Inc.