1.5
Table Of Contents
- vCloud API Programming Guide
- Contents
- vCloud API Programming Guide
- About the VMware vCloud API
- Hello vCloud: A Simplified RESTful Workflow
- Exploring a Cloud
- Provisioning an Organization with vApps, Templates, and Media
- Deploying and Operating vApps
- Summary of vCloud API vApp and Virtual Machine Operations Requests
- Create a vApp From a Template
- Compose a vApp From Existing Virtual Machines
- Recompose a vApp to Add or Remove Virtual Machines
- Operate a vApp
- Configuring vApps and Virtual Machines
- Retrieve the Configuration Links for a vApp
- Retrieve the Configuration Links for a Virtual Machine
- Retrieve or Update a Modifiable Section
- Update a vApp Network Configuration
- Update the NetworkConnectionSection of a Virtual Machine
- Retrieve or Modify the CPU Configuration of a Virtual Machine
- Retrieve or Modify the GuestCustomizationSection of a Virtual Machine
- Retrieve or Modify ProductSection Elements
- Retrieve or Modify Groups of Related Sections in a Virtual Machine
- Retrieve or Modify the Hard Disk Configuration of a Virtual Machine
- Creating, Provisioning, and Managing Organizations
- Summary of Administrative Requests
- Administrator Credentials and Privileges
- Organization Administration
- Network Administration
- vDC Administration
- Catalog Administration
- User and Group Administration
- Working With Roles and Rights
- Controlling Access to vApps and Catalogs
- Using vCloud API Extensions to Provision and Manage a Cloud
- Working With Object Metadata
- Using the Query Service
- Configuring and Using Blocking Tasks and Notifications
- XML Representations in the vCloud API
- Index
Response:
201 Created
Content-Type: application/vnd.vmware.vcloud.vApp+xml
...
<VApp
name="Example Corp’s CRM Appliance"
type="application/vnd.vmware.vcloud.vApp+xml"
status="8"
href="https://vcloud.example.com/api/vApp/vapp-33" ...>
<Link
rel="up" type="application/vnd.vmware.vcloud.vdc+xml"
href="https://vcloud.example.com/api/vdc/5"/>
...
<Description>Composed CRM Appliance</Description>
...
<Tasks>
<Task operation="Composing Virtual Application Example Corp’s CRM Appliance (33)" ...>
...
</Task>
</Tasks>
</VApp>
Recompose a vApp to Add or Remove Virtual Machines
The vCloud API supports recomposition of a vApp to add or remove virtual machines. To recompose a vApp,
make a recomposeVApp request, supplying a RecomposeVAppParams element as the request body.
The RecomposeVAppParams element allows an arbitrary number of DeleteItem elements, but is otherwise
identical to ComposeVAppParams. This means that in addition to adding or removing virtual machines, a
recomposeVApp request can also change the name and description of the vApp, and can supply new
InstantiationParams to change various sections of the composed vApp or any of the added virtual machines.
Unlike a composeVapp request, which operates on a vDC and creates a new vApp, a recomposeVapp request
operates on (and modifies) an existing vApp.
Prerequisites
Verify that you are logged in as a system administrator or member of an organization in the cloud.
Procedure
1 Find the recomposeVApp link in the target vApp.
The XML representation of a vApp contains a recomposeVapp link, which has the following form:
<Link
rel="recompose"
type="application/vnd.vmware.vcloud.recomposeVAppParams+xml"
href="https://vcloud.example.com/api/vdc/5/action/recomposeVApp" />
2 Create a RecomposeVappParams element that specifies the details of the recomposition.
See “Example: Recompose a vApp,” on page 84.
3 POST the RecomposeVappParams element to the recomposeVapp link of the target vApp.
Chapter 5 Deploying and Operating vApps
VMware, Inc. 83