This document supports the version of each product listed and
supports all subsequent versions until the document is
replaced by a new edition. To check for more recent editions
of this document, see http://www.vmware.com/support/pubs.
EN-001371-00
vCloud Air Platform Programmer's Guide
You can find the most up-to-date technical documentation on the VMware Web site at:
http://www.vmware.com/support/
The VMware Web site also provides the latest product updates.
If you have comments about this documentation, submit your feedback to:
3401 Hillview Ave.
Palo Alto, CA 94304
www.vmware.com
2 VMware, Inc.
Contents
About this Programmer's Guide5
About the vCloud Air Platform APIs7
1
The VMware APIs for Cloud Automation 7
XML Namespace Identifiers 8
Overview of Object Types 8
Link Relationships in the Object Types 9
API Versioning 10
Roles for the APIs for Cloud Automation 11
Authentication and Authorization 11
vCloud Air Platform APIs Schema Reference 12
Java Code Samples for Cloud Automation 12
About the Examples in this Programmer's Guide 13
Hello vCloud Air : A RESTful Workflow15
2
Log in to vCloud Air 15
Create a Session for a Virtual Data Center in a Service 18
Log Out 23
Index25
VMware, Inc. 3
vCloud Air Platform Programmer's Guide
4 VMware, Inc.
About this Programmer's Guide
The vCloud Air Platform Programmer's Guide provides information about version 5.6 of the vCloud Air
Platform APIs.
VMware® provides many different APIs and SDKs for applications and goals. This guide provides
information about the vCloud Air Platform APIs (formerly known as the vCloud Hybrid Service Extensions)
for developers who create RESTful clients for use with vCloud Air subscription services; specifically, the
Dedicated Cloud and Virtual Private Cloud services.
Intended Audience
This guide is intended for software developers who are building interactive clients of vCloud Air. This
guide discusses Representational State Transfer (REST) and RESTful programming conventions, and
vCloud Air technology. You must be familiar with these and other widely deployed technologies such as
XML, HTTP, and the Windows or Linux operating system.
Related Publications
The vCloud Air User's Guide and vCloud API Programmer's Guide contain detailed information about many of
the objects and operations referred to in this guide.
VMware, Inc.
To access the current versions of these and other VMware books, go to
http://www.vmware.com/support/pubs.
5
vCloud Air Platform Programmer's Guide
6 VMware, Inc.
About the vCloud Air Platform APIs1
The vCloud Air Platform APIs provide support for developers who are building interactive clients of
vCloud Air using a RESTful application development style.
vCloud Air clients and vCloud Air servers communicate over HTTP, exchanging representations of
vCloud Air objects. These representations take the form of XML elements. vCloud Air clients make HTTP
requests to the server and retrieve the information the clients need from the server's responses.
This chapter includes the following topics:
“The VMware APIs for Cloud Automation,” on page 7
n
“XML Namespace Identifiers,” on page 8
n
“Overview of Object Types,” on page 8
n
“Link Relationships in the Object Types,” on page 9
n
“API Versioning,” on page 10
n
“Roles for the APIs for Cloud Automation,” on page 11
n
“Authentication and Authorization,” on page 11
n
“vCloud Air Platform APIs Schema Reference,” on page 12
n
“Java Code Samples for Cloud Automation,” on page 12
n
“About the Examples in this Programmer's Guide,” on page 13
n
The VMware APIs for Cloud Automation
Programmatic access to the subscription services of vCloud Air consists of consuming the vCloud Air
Platform APIs and Compute Service accessed through the vCloud API. The combination of these two APIs
provides a single, logical API endpoint for automation of cloud interactions.
The vCloud Air includes calls to log in and get the details of available virtual data centers. The responses to
these calls include vCloud endpoints and the vCloud session token. With those credentials, customers can
call the vCloud API without needing to provide the credentials again. Customers can automate their
workflows without having to store their credentials on disk or in memory.
The obtained vCloud endpoints and session token allow customers to access the vCloud API across all
functional boundaries of the subscribed services in vCloud Air. Subscribed services include compute
resources, such as Dedicated Cloud and Virtual Private Cloud. The API calls return links to virtual data
center objects, which customers can use for virtual machine lifecycle operations and network service
operations.
VMware, Inc.
7
vCloud Air Platform Programmer's Guide
XML Namespace Identifiers
A response typically includes all the XML namespace identifiers that the server uses to validate it, in
addition to other attributes that specify the schema locations searched during validation.
The following fragment shows the attributes and prefixes of the XML namespace identifier that appear in a
typical response for the vCloud Air Platform APIs:
The vCloud Air Platform APIs define a set of objects common to cloud computing environments. An
understanding of these objects is essential to using the APIs.
The following conventions apply to the objects you access through the APIs:
List types follow these conventions; for example, an object named Obj :
n
Uses ObjListType as the XSD type definition.
n
Contains objlist in the media type.
n
Has Objs as the element name.
n
Top level elements of objects in responses extend from EntityType.
n
The short versions of objects typically are included in other object responses extended from
n
ReferenceType.
The following table describes all the object types in the vCloud Air Platform APIs.
Table 1‑1. Object Type Descriptions
Object TypeDescriptionClass Value
SessionType
ServiceListType
ServiceType
Provides a return type from a login. Contains a link
to retrieve the list of compute services.
Contains a list of services purchased by the
requesting customer account. Entries in the list are
ServiceType.
Represents a reference to service meta data for
vCloud Air. Currently, the ServiceType object
type includes Dedicated Cloud and
Virtual Private Cloud meta data. ServiceType is a
lightweight object, which contains the name, an
href to Compute, the type of service
(compute:dedicatedcloud or compute:vpc), the
serviceId (assigned by VMware when your
vCloud Air account is provisioned) and the
geographical region of the service (for example, "US
- Santa Clara ").
vnd.vmware.vchs.session
vnd.vmware.vchs.servicelist
vnd.vmware.vchs.service
8 VMware, Inc.
Loading...
+ 18 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.