# Data Object - CnsQueryFilter(vim.cns.QueryFilter)

Parameter to
  CnsQueryAsync, CnsQueryVolume
Extended by
  CnsKubernetesQueryFilter
Extends
  DynamicData
See also
  CnsCursor, CnsVolumeId, Datastore, KeyValue
Since
  vSAN API vSAN 6.7U3

## Data Object Description

Filter object to query matching volumes.
Every property criteria that is specified through array, like labels, datastores and so on will add complexity in retrieving the query result, and it should be minimal (preferrably less than or equal to 10). The query may be slow or fail if this guideline is not honored. All string matchings will be absolute, unless specified.

Properties

Name | Type | Description
--- | --- | ---
complianceStatus* | xsd:string | Storage policy compliance status of the volume. This must be one of the compliance status exposed by SPBM. See pbm.compliance.ComplianceStatus.
containerClusterIds* | xsd:string[] | Container orchestrator cluster identifiers.
cursor* | CnsCursor | Cursor object, pointing to desired range of results.
datastoreAccessibilityStatus* | xsd:string | Deprecated. since vSphere 7.0 in favor of healthStatus. Datastore accessibility status of the volume. This must be one of the datastore accessibility status exposed by SPBM. See pbm.compliance.EntityHealthStatus.DatastoreAccessibilityStatus.
datastores* | ManagedObjectReference[] to a Datastore[] | Volumes located on this Datastore will be returned.
healthStatus* | xsd:string | Health status of the volume. This will be one of the health status exposed by SPBM. See pbm.compliance.EntityHealthStatus.healthStatus. Since vSAN API 7.0
labels* | KeyValue[] | Labels to be matched for this volume. Label key and value should be an exact match. All volumes that match any of the labels will be returned in the result.
names* | xsd:string[] | Volume names to be queried. Currently only full string match will be supported. No regex or substring matching will be done.
storagePolicyId* | xsd:string | Storage policy id associated with volume. This will be matched to the actual storage policy attached with the volume.
volumeIds* | CnsVolumeId[] | Volume identifiers to be queried.
Properties inherited from DynamicData
None

*Need not be set
Show WSDL type definition
<complexType xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vsan="urn:vsan" name="CnsQueryFilter"> <complexContent> <extension base="vsan:DynamicData"> <sequence> <element name="volumeIds" type="vsan:CnsVolumeId" minOccurs="0" maxOccurs="unbounded"/> <element name="names" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/> <element name="containerClusterIds" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/> <element name="storagePolicyId" type="xsd:string" minOccurs="0"/> <element name="datastores" type="vsan:ManagedObjectReference" minOccurs="0" maxOccurs="unbounded"/> <element name="labels" type="vsan:KeyValue" minOccurs="0" maxOccurs="unbounded"/> <element name="complianceStatus" type="xsd:string" minOccurs="0"/> <element name="datastoreAccessibilityStatus" type="xsd:string" minOccurs="0"/> <element name="cursor" type="vsan:CnsCursor" minOccurs="0"/> <element name="healthStatus" type="xsd:string" minOccurs="0"/> </sequence> </extension> </complexContent> </complexType>