You can make a GET request to the URL of any modifiable section to retrieve it for modification. After you modify the section, you can make a PUT request to its edit link to update the section with your modifications.

Prerequisites

This operation requires the rights included in the predefined vApp Author role or an equivalent set of rights.

Procedure

  1. Retrieve the section to modify.
    Make a GET request to the URL in the section's href attribute value.
  2. Modify the retrieved section.

    Request bodies must contain all required elements and attributes, even if you are not changing their values. Because optional elements and attributes typically revert to default values if they are omitted or empty, it is a best practice to include optional elements in request bodies that modify existing objects. Link elements and href attributes from responses do not need to be included in modified sections. Some elements and attributes are read-only and cannot be modified. See the schema reference for details.

  3. Update the section with your modifications.
    Find the Link element in the section where rel="edit". Make a PUT request to the URL in that link's href attribute value, and supply the modified section as the request body.
    For most section types, the response to this request is a Task element that tracks the update operation. When the task completes, the section is updated.

Results

The modified section replaces the contents of the original section. For some section types, modifications take effect immediately. For others, modifications take effect only after a power or deployment state change.

Example: Retrieve a NetworkConfigSection

This example retrieves the NetworkConfigSection of the vApp shown in Configuration Links in a vApp.

Request:
GET https://vcloud.example.com/api/vApp/vapp-7/networkConfigSection
Response:
200 OK
Content-type: application/vnd.vmware.vcloud.networkConfigSection+xml
...
<NetworkConfigSection
   xmlns="http://www.vmware.com/vcloud/v1.5"
   xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1"
   href="https://vcloud.example.com/api/vApp/vapp-7/networkConfigSection/"
   ovf:required="false">
   <ovf:Info>Configuration parameters for logical networks</ovf:Info>
   <Link
      rel="edit"
      type="application/vnd.vmware.vcloud.networkConfigSection+xml"
      href="https://vcloud.example.com/api/vApp/vapp-7/networkConfigSection/" />
   <NetworkConfig
      networkName="vAppNetwork">
      <Configuration>
         <IpScopes>
            <IpScope>
               <IsInherited>true</IsInherited>
               <Gateway>10.147.56.253</Gateway>
               <Netmask>255.255.255.0</Netmask>
               <Dns1>10.147.115.1</Dns1>
               <Dns2>10.147.115.2</Dns2>
               <DnsSuffix>example.com</DnsSuffix>
               <IpRanges>
                  <IpRange>
                     <StartAddress>10.147.56.1</StartAddress>
                     <EndAddress>10.147.56.255</EndAddress>
                  </IpRange>
               </IpRanges>
            </IpScope>
         </IpScopes>
         <ParentNetwork
            type="application/vnd.vmware.vcloud.network+xml"
            name="Internet"
            href="https://vcloud.example.com/api/network/54" />
         <FenceMode>bridged</FenceMode>
      </Configuration>
      <IsDeployed>false</IsDeployed>
   </NetworkConfig>
</NetworkConfigSection>

For an example that updates this section, see Update a NetworkConfigSection .