5.1

Table Of Contents
The server takes the requested action and returns a VApp element. The element has a status attribute value of
0, meaning it is unresolved because it is still being constructed. It also contains a Task element that tracks the
progress of the request.
See the response portion of “Example: Deploying a vApp,” on page 32.
Example: Deploying a vApp
This simple instantiateVAppTemplate request assumes that the vApp template includes one Vm and has no
special requirements other than connecting that Vm to a network. For a look at a more complex instantiation
request, see “Example: Instantiate a vApp Template,” on page 86. The InstantiateVAppTemplateParams
includes the following information:
n
A name for the vApp, supplied in the name attribute of the InstantiateVAppTemplateParams element. This
request also provides a description, which is optional but a good practice.
n
A reference to a template, obtained from the href attribute of the Entity contained by the CatalogItem
that you retrieved in “Retrieve a Catalog Item,” on page 28 and suppled in the Source element of the
InstantiateVAppTemplateParams.
n
Configuration parameters for a vApp network, supplied in the NetworkConfigSection element. This
specification includes the following parameters:
n
A name for the network, supplied in the name attribute of the NetworkConfigSection element. The
name you specify for the vApp network must match the value of the network attribute of the
NetworkConnection of the Vm. This example assumes that this NetworkConnection element includes the
following values, which specify that the Vm connects to a network named VappNetwork:
<NetworkConnectionSection
...
<NetworkConnection
network="VappNetwork">
...
</NetworkConnection>
</NetworkConnectionSection>
n
A reference to the organization vDC network to which the vApp network connects, specified in the
ParentNetwork element. The URL used in this reference is one shown in the AvailableNetworks
element in “Example: Deployment Information in a vDC,” on page 30.
n
A fence mode, specified in the FenceMode element. A value of bridged indicates that the vApp network
is connected directly to the organization vDC network.
For more information about creating networks with the vCloud API, see “About vCloud Director
Networks,” on page 148.
The target of the request is the instantiateVAppTemplate URL of this vDC. See “Example: Deployment
Information in a vDC,” on page 30. Because the operation creates a new vApp object, the HTTP request type
is POST.
Request:
POST https://vcloud.example.com/api/vdc/5/action/instantiateVAppTemplate
Content-Type: application/vnd.vmware.vcloud.instantiateVAppTemplateParams+xml
...
<?xml version="1.0" encoding="UTF-8"?>
<InstantiateVAppTemplateParams
xmlns="http://www.vmware.com/vcloud/v1.5"
name="Linux FTP server"
deploy="true"
powerOn="true"
vCloud API Programming Guide
32 VMware, Inc.