Retrieve a List of Storage Profiles from a vCenter Server
You can retrieve the list of storage profiles that have been defined on a vCenter server registered to a cloud. To retrieve the list, you make a GET request to the server's storageProfiles link.
Storage profiles are represented as Storage Policies in the VMware Cloud Director HTML5 UI.
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
Example: Retrieve a List of Storage Profiles from a vCenter Server
GET https://vcloud.example.com/api/admin/extension/vimServer/9/storageProfiles
This response shows that the
specified vCenter server contains three storage profiles, named
Gold
,
Silver
, and
Bronze
. Storage profile details, including datastore
identifiers and capacities, are included in the response, but only the value of
the
name
attribute of a
VMWStorageProfile is
needed when adding that storage profile to a Provider VDC.
200 OK Content-Type: application/vnd.vmware.admin.vmwstorageprofiles+xml ... <?xml version="1.0" encoding="UTF-8"?> <vmext:VMWStorageProfiles xmlns:vmext="http://www.vmware.com/vcloud/extension/v1.5" xmlns:vcloud="http://www.vmware.com/vcloud/v1.5" ...> ... <vmext:VMWStorageProfile name="Gold"> <vmext:MoRef>storageProfile-CFAA6D92-36FC-4C16-9B30-FAC79B902371</vmext:MoRef> <vmext:VimObjectType>STORAGE_PROFILE</vmext:VimObjectType> <vmext:FreeStorageMb>169203.0</vmext:FreeStorageMb> <vmext:TotalStorageMb>325120.0</vmext:TotalStorageMb> <vmext:DataStoreRefs> <vmext:VimObjectRef> <vmext:VimServerRef type="application/vnd.vmware.admin.vmwvirtualcenter+xml" name="" href="https://vcloud.example.com/api/admin/extension/vimServer/9" /> <vmext:MoRef>datastore-44</vmext:MoRef> <vmext:VimObjectType>DATASTORE</vmext:VimObjectType> </vmext:VimObjectRef> <vmext:VimObjectRef> <vmext:VimServerRef type="application/vnd.vmware.admin.vmwvirtualcenter+xml" name="" href="https://vcloud.example.com/api/admin/extension/vimServer/9" /> <vmext:MoRef>datastore-45</vmext:MoRef> <vmext:VimObjectType>DATASTORE</vmext:VimObjectType> </vmext:VimObjectRef> </vmext:DataStoreRefs> </vmext:VMWStorageProfile> <vmext:VMWStorageProfile name="Silver"> ... </vmext:VMWStorageProfile> <vmext:VMWStorageProfile name="Bronze"> ... </vmext:VMWStorageProfile> </vmext:VMWStorageProfiles>