# Data Object - VsanMassCollectorSpec(vim.VsanMassCollectorSpec)

Parameter to
  VsanRetrieveProperties
Extends
  DynamicData
See also
  VsanMassCollectorPropertyParams, VsanResourceConstraint
Since
  vSAN API 6.6

## Data Object Description

Spec for VsanMassCollector.VsanRetrieveProperties

Properties

Name | Type | Description
--- | --- | ---
constraint* | VsanResourceConstraint | Filter the returned result with VsanResourceConstraint
objectCollection* | xsd:string | Specify mass hosts or clusters collection. Support regular or vSAN enabled host or cluster objects. See VsanMassCollectorObjectCollectionEnum for possible collection enum. Note that either the
    objects
or the
    objectCollection
parameter is required. See VsanMassCollectorObjectCollectionEnum
objects* | ManagedObjectReference[] | List of ManagedObject to retrieve properties for. These are typically HostSystem or ClusterComputeResource. The object type should be homogeneous (mixed-type is not supported) since we collecting the same properties for them. This parameter will be ignored when the objectCollection parameter is specified (i.e.
    objectCollection =
        VsanMassCollectorObjectCollectionEnum.ALL_HOSTS
). Note that either the
    objects
or the
    objectCollection
parameter is required.
properties | xsd:string[] | List of properties to retrieve. Properties for vSAN enabled ClusterComputeResource can be: a d a l a r a t c a c l c l c l c l c l c l c l c l c l c l c l c l c m d a d a d p e n e s f i h c h o h o i s i s i s i s i s i s i s i s i s i s i s i s n o n u o b o b p h p h p r q u q u r e r u s m s p s t s t s t s u s u s y t i u p v e v e v s v s v s v s v s v s v s v s v s v s v s v s v s v s v s v s w i Properties for vSAN enabled HostSystem can be: a d a l c h c l c o d a d i d i d i e n f i h c h o h o h o h o k m o b p h p r s t v e v e v s v s v s v s
propertiesParams* | VsanMassCollectorPropertyParams[] | Some property required additional parameters to be passed in (e.g. perfQuery). Code example for perfQuery properties_params:
           def test_mass_collector_vsan_perf_query(vsanStub):
              mc = GetMassCollector(vsanStub)
              massCollectorSpec = build_mass_collector_spec(
                 properties=['vsanPerf'],
                 objectType='ALL_CLUSTERS',
                 propertiesParams=[build_vsan_perf_params()])
              result = mc.VsanRetrieveProperties(massCollectorSpecs=[massCollectorSpec])

           def build_vsan_perf_params():
              return vim.VsanMassCollectorPropertyParams( propertyName='vsanPerf',
                 propertyParams=[build_perf_query_specs()])

           def build_perf_query_specs():
              property_param = vim.KeyAnyValue()
              property_param.key = 'querySpecs'

              endTime = datetime.datetime.utcnow()
              startTime = endTime - datetime.timedelta(2)

              perfQuerySpec = vim.cluster.VsanPerfQuerySpec(
                 entityRefId="*", startTime=startTime, endTime=endTime)

              property_param.value = vim.DynamicArray(val=[perfQuerySpec])
              return property_param

           def build_mass_collector_spec(properties=None, objectType=None,
              propertiesParams=None):
              massCollectorSpec = vim.VsanMassCollectorSpec()
              massCollectorSpec.properties = properties
              objCollection = vim.VsanMassCollectorObjectCollectionEnum(objectType)
              massCollectorSpec.objectCollection = objCollection
              if propertiesParams:
                 massCollectorSpec.propertiesParams = propertiesParams
              return massCollectorSpec
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="VsanMassCollectorSpec"> <complexContent> <extension base="vsan:DynamicData"> <sequence> <element name="objects" type="vsan:ManagedObjectReference" minOccurs="0" maxOccurs="unbounded"/> <element name="objectCollection" type="xsd:string" minOccurs="0"/> <element name="properties" type="xsd:string" maxOccurs="unbounded"/> <element name="propertiesParams" type="vsan:VsanMassCollectorPropertyParams" minOccurs="0" maxOccurs="unbounded"/> <element name="constraint" type="vsan:VsanResourceConstraint" minOccurs="0"/> </sequence> </extension> </complexContent> </complexType>