You can update a selector extension by making a PUT request to its edit URL and supplying a modified SelectorExtension in the request body.
Prerequisites
This operation is restricted to system administrators.
Procedure
Example: Update a Selector Extension
This example updates the selector extension created in 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 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>