You can retrieve the list of resource pools available on a vCenter server registered to a cloud. To retrieve the list, you make a GET request to the server's resourcePoolList link.

The ResourcePoolList of a VimServer element contains an entry for every available resource pool on the server. Resource pools that a provider VDC is already using are not listed, because they are considered unavailable. See Finding Available vCenter Resources.

Prerequisites

  • This operation is restricted to system administrators.

  • Retrieve the XML representation of a vCenter server registered to your cloud. See Finding Available vCenter Resources.

Procedure

  1. Examine the VimServer element to locate its resourcePoolList link.
    The link has the following form:
    <vcloud:Link
       rel="down"
       type="application/vnd.vmware.admin.resourcePoolList+xml"
       href="https://vcloud.example.com/api/admin/extension/vimServer/9/resourcePoolList" />
  2. GET the URL in the value of this link's href attribute to retrieve the list of resource pools.
    See Retrieve a List of Resource Pools from a vCenter Server. If the list is empty, all resource pools on the server are already in use.

Example: Retrieve a List of Resource Pools from a vCenter Server

Request:
GET https://vcloud.example.com/api/admin/extension/vimServer/9/resourcePoolList
Response:
200 OK
Content-Type: application/vnd.vmware.admin.resourcepoollist+xml
...
<vmext:ResourcePoolList
   xmlns:vmext="http://www.vmware.com/vcloud/extension/v1.5"
   xmlns:vcloud="http://www.vmware.com/vcloud/v1.5"
   type="application/vnd.vmware.admin.resourcePoolList+xml" ... >
   <vcloud:Link
      rel="up"
      type="application/vnd.vmware.admin.vmwvirtualcenter+xml"
      href="https://vcloud.example.com/api/admin/extension/vimServer/9" />
   <vmext:ResourcePool
      name="cluster2">
      <vmext:MoRef>resgroup-195</vmext:MoRef>
      <vmext:VimObjectType>RESOURCE_POOL</vmext:VimObjectType>
      <vmext:DataStoreRefs>
         <vmext:VimObjectRef>
            <vmext:VimServerRef
               type="application/vnd.vmware.admin.vmwvirtualcenter+xml"
               name="vc9-ds1"
               href="https://vcloud.example.com/api/admin/extension/vimServer/9" />
            <vmext:MoRef>datastore-172</vmext:MoRef>
            <vmext:VimObjectType>DATASTORE</vmext:VimObjectType>
         </vmext:VimObjectRef>
         <vmext:VimObjectRef>
            <vmext:VimServerRef
               type="application/vnd.vmware.admin.vmwvirtualcenter+xml"
               name="vc9-ds2"
               href="https://vcloud.example.com/api/admin/extension/vimServer/9" />
            <vmext:MoRef>datastore-173</vmext:MoRef>
            <vmext:VimObjectType>DATASTORE</vmext:VimObjectType>
         </vmext:VimObjectRef>
       </vmext:DataStoreRefs>
   </vmext:ResourcePool>
   <vmext:ResourcePool
      name="cluster3">
       <vmext:MoRef>resgroup-230</vmext:MoRef>
      <vmext:VimObjectType>RESOURCE_POOL</vmext:VimObjectType>
      <vmext:DataStoreRefs>
         <vmext:VimObjectRef>
            <vmext:VimServerRef
               type="application/vnd.vmware.admin.vmwvirtualcenter+xml"
               name="vc9-ds10"
               href="https://vcloud.example.com/api/admin/extension/vimServer/9" />
            <vmext:MoRef>datastore-174</vmext:MoRef>
            <vmext:VimObjectType>DATASTORE</vmext:VimObjectType>
         </vmext:VimObjectRef>
      </vmext:DataStoreRefs>
   </vmext:ResourcePool>
   ...
</vmext:ResourcePoolList>