Storage Profile Queries

The Storage Policy API includes several methods that you can use to query for profiles and vSphere entities, such as datastores, virtual machines, and virtual disks.
The following table provides an overview of these methods. For more information, see the Storage Policy API Reference.
Storage Profile API Query Methods
Method
Description
PbmQueryAssociatedEntiy
Returns references to entities associated with the specified profile.
PbmQueryAssociatedProfile
Returns profiles associated with the specified entity. The type of profile is determined by the type of entity that you specify.
  • If you specify a datastore, the method returns one or more capability (resource) profiles.
  • If you specify a virtual machine or virtual disk, the method returns one or more requirement profiles.
PbmQueryAssociatedProfiles
Returns
PbmQueryProfileResult
objects. Each result object identifies an entity and one or more profiles. Profile type is determined by entity type.
  • If the entity is a datastore, the result object contains one or more capability (resource) profiles.
  • If the entity is a virtual machine or virtual disk, the result object contains one or more requirement profiles.
PbmQueryMatchingHub
Returns datastores and/or datastore clusters that satisfy the specified requirement profile. To retrieve the profiles associated with a datastore, call
PbmQueryMatchingHub
for each profile in the system. In the
, datastore clusters are called storage pods.
PbmQueryMatchingHubWithSpec
Returns datastores and or datastore clusters that satisfy the criteria in the capability create specification.
PbmQueryProfile
Returns requirement profiles or resource profiles, or both.