vCloud API Programming Guide
<Task status="running" startTime="2010-06-25T08:00:55.402-07:00" operation="Creating
<Owner type="application/vnd.vmware.vcloud.vApp+xml" name="LinuxFtpServer"
</Task>
</Tasks>
</VApp>
N
A vApp template might include a license agreement or other terms that you must accept before you
OTE
can create a vApp from it. In this example, the template contains no such terms. If it did, the request would
fail if it did not include an AllEULAsAccepted element, as shown in Example 5‐1 on page
The response to the instantiation request is a sparsely populated vApp body, which includes the following
information:
The status of the vApp. The status value 0 indicates that the vApp is unresolved, because instantiation
has not completed.
The name of the vApp, as supplied in the request
The vApp URL, shown in the href attribute of the VApp body
A task created to track the instantiation. The Task element has an operation attribute that describes what
is happening, and contains an Owner element that is a reference the vApp being created. For more
information, see "Task" on page 168.
Deploying and Powering On the vApp
After the instantiation task completes, the template has been transformed into a vApp. The vApp body no
longer includes a Tasks element, and it now includes a number of Link elements that you can use to deploy
and operate the vApp. Example
rel="deploy" link returned in the vApp body (see Example
element, which specifies deployment details.
Example 2-7. Deploy and Power On a vApp
Request:
POST http://vcloud.example.com/api/v1.0/vApp/vapp-7/action/deploy
Content-type: application/vnd.vmware.vcloud.deployVAppParams+xml
...
<DeployVAppParams powerOn="true" deploymentLeaseSeconds="2592000"
Response:
202 Accepted
<Task xmlns="http://www.vmware.com/vcloud/v1" status="running"
<Owner type="application/vnd.vmware.vcloud.vApp+xml" name="LinuxFtpServer"
</Task>
Because deployment is a long‐running operation that can fail for a variety of reasons (inability of the vDC to
satisfy the vApp's resource requirements, for example), the response is a Task.
26
Virtual Application Linux FTP server(7)"
expiryTime="2010-09-23T08:00:55.402-07:00"
type="application/vnd.vmware.vcloud.task+xml"
href="http://vcloud.example.com/api/v1.0/task/1awvdrn82atz7yzsdey">
href="http://vcloud.example.com/vApp/vapp-7"/>
2‐7 shows a request and response for a deploy action. The request URL is the
xmlns="http://www.vmware.com/vcloud/v1"/>
startTime="2010-06-25T11:15:55.558-07:00" operation="Starting Virtual Application
Linux FTP server(7)" expiryTime="2010-09-23T08:00:55.402-07:00"
type="application/vnd.vmware.vcloud.task+xml"
href="http://vcloud.example.com/api/v1.0/task/i9h1djqzsyllf0zvdy" ...>
href="http://vcloud.example.com/vApp/vapp-7"/>
2‐8). The request body is a DeployVAppParams
63.
VMware, Inc.