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
n
If a Property element that is present in the existing ProductSection has different attributes, qualifiers,
or other details in the update, the Property in the update replaces the existing one.
n
If a Property element that is present in the existing ProductSection has no Value in the update, the
existing Property and Value remain unchanged.
3 Update the section with your modifications.
Find the Link element in the ProductSectionList where rel="edit". Make a PUT request to the URL in
that link's href attribute value, and supply the modified ProductSectionList as the request body.
The response to this request is a Task element that tracks the update operation. When the task is complete,
the section is updated.
The modified section replaces the contents of the original section, subject to the rules listed in Step 2.
Example: Update a ProductSection in a vApp
This request creates or updates a ProductSectionList that contains a single ProductSection. The
ProductSection sets three properties. The response is a Task.
Request:
PUT https://vcloud.example.com/api/vApp/vapp-123/productSections
Content-Type: application/vnd.vmware.vcloud.productSections+xml
...
<?xml version="1.0" encoding="UTF-8"?>
<ProductSectionList
xmlns="http://www.vmware.com/vcloud/v1.5"
xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1">
<ovf:ProductSection
required="true">
<ovf:Info>Information about the installed software</ovf:Info>
<ovf:Property
ovf:type="string"
ovf:key="CRM_Database_Host"
ovf:value="CRM.example.com">
<ovf:Label>CRM Database Host</ovf:Label>
</ovf:Property>
<ovf:Property
ovf:type="string"
ovf:key="CRM_Database_Username"
ovf:value="dbuser">
<ovf:Label>CRM Database Usernname</ovf:Label>
</ovf:Property>
<ovf:Property
ovf:type="string"
ovf:key="CRM_Password"
ovf:value="Pa55w0rd">
<ovf:Label>CRM Database User Password</ovf:Label>
</ovf:Property>
</ovf:ProductSection>
</ProductSectionList>
Chapter 5 Deploying and Operating vApps
VMware, Inc. 103