You can update a selector extension by making a PUT request to its edit URL and supplying a modified SelectorExtension in the request body.

Verify that you are logged in to the vCloud API as a system administrator.

1

Retrieve the selector extension.

Use a request like this one, where ID is the ID of the extension that you want to retrieve.

GET https://vcloud.example.com/api/admin/type/extension/ID
2

Examine the response to find the object extension's edit link.

<vcloud:Link  
      rel="edit"  
      href="https://vcloud.example.com/api/admin/providervdcs/extension/b3...f8ee"  
      type="application/vnd.vmware.admin.extensibility.selector+xml" />
3

Update the retrieved SelectorExtension.

4

Make a PUT request to the URL in the edit link, supplying the modified SelectorExtension in the request body. See Example: Update a Selector Extension

This example updates the selector extension created in Example: Create a Selector Extension for a Registered Object Extension to enable it by setting the value of Enabled to true.

Request:

PUT https://vcloud.example.com/api/admin/providervdcs/extension/b3...f8ee
Content Type: application/vnd.vmware.admin.extensibility.selector+xml
...
Content Type: application/vnd.vmware.admin.extensibility.selector+xml
<?xml version="1.0" encoding="UTF-8"?>
<SelectorExtension
   xmlns="http://www.vmware.com/vcloud/v1.5" >
   <Enabled>true</Enabled>
   <Priority>1</Priority>
   <ObjectExtensionId>83...0d39</ObjectExtensionId>
   <Phases>
      <Phase
         name="urn:extensionPoint:vm:gatherRequirements"
         type="async"
         optional="true" />
   </Phases>
</SelectorExtension>

The system updates the extension and returns an updated SelectorExtension element similar to the one shown in Example: Create a Selector Extension for a Registered Object Extension.

Response:

200 OK
Content Type: application/vnd.vmware.admin.extensibility.selector+xml
...
<SelectorExtension  
   xmlns="http://www.vmware.com/vcloud/v1.5"  
   id="b3...f8ee"  
   href="https://vcloud.example.com/api/admin/providervdcs/extension/b3...f8ee"  
   ... >
   <Link  
      rel="remove"  
      href="https://vcloud.example.com/api/admin/providervdcs/extension/b3...f8ee" />
   <Link  
      rel="edit"  
      href="https://vcloud.example.com/api/admin/providervdcs/extension/b3...f8ee"  
      type="application/vnd.vmware.admin.extensibility.selector+xml" />
   <Link  
      rel="up"  
      href="https://vcloud.example.com/api/admin/providervdcs/extension"  
      type="application/vnd.vmware.admin.extensibility.selectors+xml" />
   <Enabled>true</Enabled>
   <Priority>1</Priority>
   <ObjectExtensionId>83...0d39</ObjectExtensionId>
   <Phases>
      <Phase  
         name="urn:extensionPoint:vm:gatherRequirements"  
         optional="true"  
         type="ASYNC" />
    </Phases>
</SelectorExtension>