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.
Method | Description |
---|---|
PbmQueryAssociatedEntities | Returns the virtual machine and disks that are associated with the given storage policies. With empty parameter, returns all virtual machine and disks that are associated with a storage policy. |
PbmQueryAssociatedEntity | 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.
|
PbmQueryAssociatedProfiles | Returns
PbmQueryProfileResult
objects. Each result object identifies an entity and one or more profiles.
Profile type is determined by entity type.
|
PbmQueryByRollupComplianceStatus | Returns all virtual machines for the given rollup compliance status. |
PbmQueryDefaultRequirementProfile | Returns the default requirement profile ID for
the given datastore. For legacy hubs, returns
null .
|
PbmQueryDefaultRequirementProfiles | Returns the default profiles for the given
datastores. For legacy datastores, the
defaultProfile is set to null.
|
PbmQueryMatchingHub (deprecated) | Finds matching placement
hubs for the specified requirements profile. This method returns only hubs that
match the profile. If this method is called for
VVolDefaultProfile , then all VVol containers are
returned as matching.
|
PbmQueryMatchingHubWithSpec (deprecated) | Finds matching placement hubs based on a profile creation specification. This method returns only those hubs that match the specification. |
PbmQueryProfile | Returns requirement profiles or resource profiles, or both. |
PbmQueryReplicationGroups | Returns identifiers for replication groups
associated with virtual machines, virtual disks, or virtual machines and all
their disks. If the query is performed for a virtual machine and all its disks
are
virtualMachineAndDisks , an entry per disk and
one for the virtual machine configuration are returned.
|
PbmQuerySpaceStatsForStorageContainer | Retrieves space statistics of a datastore. |