Share via


System.Discovery.ClassSnapShotDataMapper

Applies To: Operations Manager 2007 R2

The System.Discovery.ClassSnapshotDataMapper module is a condition detection module type that maps any type of data to class type instance System.Discovery.Data data.

Usage

This module is only used in discovery workflows. Use this module when you want to map any type of data to class type instance System.Discovery.Data. This module only maps a single class type instance. Generally, this module is used as a member module in various existing discovery data source module type definitions. Rarely will you have to use this module directly. See the “External Module References” section later in this topic to see which modules use this module as a member module.

Type Definition

<ConditionDetectionModuleType ID="System.Discovery.ClassSnapshotDataMapper" Accessibility="Public" Stateful="false" PassThrough="false" Batching="false">
  <Configuration>
    <IncludeSchemaTypes>
      <SchemaType>System.Discovery.MapperSchema</SchemaType>
    </IncludeSchemaTypes>
    <xsd:element name="ClassId" type="xsd:string"/>
    <xsd:element name="InstanceSettings" minOccurs="0" maxOccurs="1" type="SettingsType"/>
  </Configuration>
  <ModuleImplementation Isolation="Any">
    <Composite>
      <MemberModules>
        <ConditionDetection TypeID="System.Discovery.SnapshotDataMapper" ID="Mapper">
          <DiscoverySourceType>0</DiscoverySourceType>
          <DiscoverySourceObjectId>$MPElement$</DiscoverySourceObjectId>
          <DiscoverySourceManagedEntityId>$Target/Id$</DiscoverySourceManagedEntityId>
          <InstanceType>0</InstanceType>
          <InstanceTypeId>$Config/ClassId$</InstanceTypeId>
          <InstanceSettings>$Config/InstanceSettings$</InstanceSettings>
        </ConditionDetection>
      </MemberModules>
      <Composition>
        <Node ID="Mapper"/>
      </Composition>
    </Composite>
  </ModuleImplementation>
  <OutputType>System.Discovery.Data</OutputType>
  <InputTypes>
    <InputType>System.BaseData</InputType>
  </InputTypes>
</ConditionDetectionModuleType>

Parameters

System.Discovery.ClassSnapshotDataMapper supports the configuration parameters described in the following table.

Parameter Type Overrideable Description

ClassId

String

False

Required parameter. The class that is being discovered.

InstanceSettings

SettingsType

False

Optional parameter. The property settings for the instance or instances of the class that is being discovered.

The ClassID parameter takes a string that must be in the $MPElement format. This element must refer to a defined class in the same management pack or a publicly available class in a referenced management pack. The following XML snippet shows the ClassID configuration element.

<ClassId>$MPElement[Name="Microsoft.Samples.ApplicationX"]$</ClassId>

The InstanceSettings parameter defines the mapping of configuration, data, target, and static values to the discovered instance or instances. The exact mapping depends on the discovery scenario and the hosting relationships that are related to the class that is being discovered. For more information about the InstanceSettings parameter, see SettingsType.

Composition

The System.Discovery.ClassSnapshotDataMapper module is a composite module that contains the member module described in the following table.

Workflow Run Order Module Type Usage

1

System.Discovery.SnapshotDataMapper

Internal module.

Module Type Usage

System.Discovery.RelationshipSnapshotDataMapper

Maps relationship type instance data to System.Discovery.Data data.

External Module References

The System.Discovery.ClassSnapshotDataMapper module is a member of the public module described in the following table.

Module Type Library Usage

Microsoft.Windows.Discovery.WMISinglePropertyProvider2

Microsoft.Windows.Library

Queries Windows Management Instrumentation (WMI) at the specified frequency and returns the results as System.Discovery.Data type data.

System.Discovery.FilteredClassSnapshotDataMapper

Microsoft.Windows.Library

Queries the Windows registry on a timed interval and returns System.Discovery.Data data. This type takes an expression to filter data on.

Sample

The following XML sample shows how System.Discovery.ClassSnapshotDataMapper is used to map property bag data, which is output from the Microsoft.Windows.WmiProvider module, into discovery data.

<DataSourceModuleType ID="Microsoft.Windows.Discovery.WMISinglePropertyProvider2" Accessibility="Public">
  <Configuration>
    <IncludeSchemaTypes>
      <SchemaType>System!System.Discovery.MapperSchema</SchemaType>
    </IncludeSchemaTypes>
    <xsd:element name="NameSpace" type="xsd:string" />
    <xsd:element name="Query" type="xsd:string" />
    <xsd:element name="Frequency" type="xsd:unsignedInt" />
    <xsd:element name="ClassID" type="xsd:string" />
    <xsd:element name="PropertyName" type="xsd:string" />
    <xsd:element name="InstanceSettings" type="SettingsType" />
  </Configuration>
  <OverrideableParameters>
    <OverrideableParameter ID="Frequency" Selector="$Config/Frequency$" ParameterType="int" />
  </OverrideableParameters>
  <ModuleImplementation>
    <Composite>
      <MemberModules>
        <DataSource ID="DS" TypeID="Microsoft.Windows.WmiProvider">
          <NameSpace>$Config/NameSpace$</NameSpace>
          <Query>$Config/Query$</Query>
          <Frequency>$Config/Frequency$</Frequency>
        </DataSource>
        <ConditionDetection ID="Mapping" TypeID="System!System.Discovery.ClassSnapshotDataMapper">
          <ClassId>$Config/ClassID$</ClassId>
          <InstanceSettings>$Config/InstanceSettings$</InstanceSettings>
        </ConditionDetection>
      </MemberModules>
      <Composition>
        <Node ID="Mapping">
          <Node ID="DS" />
        </Node>
      </Composition>
    </Composite>
  </ModuleImplementation>
  <OutputType>System!System.Discovery.Data</OutputType>
</DataSourceModuleType>

Information

   

Module Type

ConditionDetectionModuleType

Input Type

System.BaseData

Output Type

System.Discovery.Data

Implementation

Composite

Library

System.Library