5.1

Table Of Contents
Prerequisites
n
Verify that you are logged in to the vCloud API as a system administrator.
n
Retrieve the XML representation of a vCenter server registered to your cloud. See “Finding Available
vCenter Resources,” on page 200.
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 Retrieve the list of resource pools.
See “Example: Retrieve a List of Resource Pools from a vCenter Server,” on page 202. 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>
vCloud API Programming Guide
202 VMware, Inc.