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
4 Update the section by making a PUT request to the section’s edit link, a Link element in the section where
rel="edit", and supplying the modified section in the request body.
Modified sections must contain all required elements, even if you are not changing their values. Because
optional elements revert to default values if they are omitted or empty, it is a best practice to include optional
elements in updates. Link elements and href attributes from responses do not need to be included in modified
sections. Some elements and attributes might be read-only. See the schema reference for details.
NOTE You cannot make configuration changes to a vApp if it is in maintenance mode. A system administrator
can put a vApp into maintenance mode to prevent metadata changes during administrative operations such
as backup, restore, and upgrade. See “Summary of vSphere Platform Extension Requests,” on page 161.
Retrieve the Configuration Links for a vApp
Each modifiable section of a vApp includes a Link element whose rel attribute has the value edit. You cannot
modify sections that do not contain this Link element.
Any ovf:SectionType element can include an arbitrary number of Link elements. Sections that you can modify
include a Link element where rel="edit". To modify one of these sections, retrieve it by making a GET request
to the URL in section's href attribute. Then make a PUT request to the href attribute value of Link where
rel="edit" to update the section with your modifications.
Prerequisites
Verify that you are logged in as a system administrator or member of an organization in the cloud.
Procedure
1 Retrieve the XML representation of the vApp.
Use a GET request as shown in “Example: Configuration Links in a vApp,” on page 88.
2 Examine the response for edit links to modifiable sections.
The response portion of “Example: Configuration Links in a vApp,” on page 88 includes one of these
links for each of the modifiable sections of the vApp. You cannot modify sections that do not contain a
Link element where rel="edit".
Example: Configuration Links in a vApp
In this example, the response was edited to show only the modifiable sections of the VApp element. Each Vm in
the Children element of the VApp includes additional configuration links, shown in “Example: Configuration
Links in a Vm Element,” on page 90.
Request:
GET https://vcloud.example.com/api/vApp/vapp-7
Response:
200 OK
Content-Type: application/vnd.vmware.vcloud.vApp+xml
...
<VApp ... href="https://vcloud.example.com/api/vApp/vapp-7">
...
<LeaseSettingsSection ...
href="https://vcloud.example.com/api/vApp/vapp-7/leaseSettingsSection/" ...>
...
<Link
rel="edit"
type="application/vnd.vmware.vcloud.leaseSettingsSection+xml"
vCloud API Programming Guide
88 VMware, Inc.