Share via


System.Discovery.RelationshipSnapshotDataMapper

Applies To: System Center 2012 - Operations Manager, System Center 2012 R2 Operations Manager, System Center 2012 SP1 - Operations Manager

The System.Discovery.RelationshipSnapshotDataMapper module is a condition detection module type that maps any type of data to relationship 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 relationship System.Discovery.Data data. This module maps to only a single relationship type instance and is generally 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.RelationshipSnapshotDataMapper" Accessibility="Public" Stateful="false" PassThrough="false" Batching="false">
  <Configuration>
    <IncludeSchemaTypes>
      <SchemaType>System.Discovery.MapperSchema</SchemaType>
    </IncludeSchemaTypes>
    <xsd:element name="RelationshipId" type="xsd:string"/>
    <xsd:element name="SourceTypeId" minOccurs="0" maxOccurs="1" type="xsd:string"/>
    <xsd:element name="TargetTypeId" minOccurs="0" maxOccurs="1" type="xsd:string"/>
    <xsd:element name="SourceRoleSettings" type="SettingsType"/>
    <xsd:element name="TargetRoleSettings" type="SettingsType"/>
    <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>1</InstanceType>
          <InstanceTypeId>$Config/RelationshipId$</InstanceTypeId>
          <SourceTypeId>$Config/SourceTypeId$</SourceTypeId>
          <TargetTypeId>$Config/TargetTypeId$</TargetTypeId>
          <InstanceSettings>$Config/InstanceSettings$</InstanceSettings>
          <SourceRoleSettings>$Config/SourceRoleSettings$</SourceRoleSettings>
          <TargetRoleSettings>$Config/TargetRoleSettings$</TargetRoleSettings>
        </ConditionDetection>
      </MemberModules>
      <Composition>
        <Node ID="Mapper"/>
      </Composition>
    </Composite>
  </ModuleImplementation>
  <OutputType>System.Discovery.Data</OutputType>
  <InputTypes>
    <InputType>System.BaseData</InputType>
  </InputTypes>
</ConditionDetectionModuleType>

Parameters

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

Parameter Type Overrideable Description

RelationshipId

GUID

False

Required parameter. Specifies the ID of the relationship type into which the Windows Management Instrumentation (WMI) object is to be mapped.

SourceTypeId

GUID

False

Optional parameter. Specifies the ID of the Source class type in the relationship type into which the WMI object is to be mapped.

TargetTypeId

GUID

False

Optional parameter. Specifies the ID of the Target class type in the relationship type into which the WMI object is to be mapped.

SourceRoleSettings

SettingsType

False

Optional parameter. Defines all property values for the source class type instance in the relationship.

TargetRoleSettings

SettingsType

False

Optional parameter. Defines all property values for the target class type instance in the relationship.

InstanceSettings

SettingsType

False

Required. Defines all property values of the discovered relationship type instances.

The RelationshipId, SourceTypeId, and TargetTypeId parameters must always be in the following format: $MPElement[Name=”TypeID”]$. For more information about the $MPElement variable notation, see $MPElement.

Composition

The System.Discovery.RelationshipSnapshotDataMapper 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.ClassSnapShotDataMapper

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

External Module References

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

Module Type Library Usage

Microsoft.Windows.WmiProviderWithRelationshipSnapshotDataMapper

Microsoft.Windows.Library

Queries WMI for object data at a scheduled, recurring interval and returns the discovered relationship type instance as System.Discovery.Data type data.

Sample

The following XML sample illustrates how System.Discovery.RelationshipSnapshotDataMapper is used as a member module within a DataSourceModuleType definition. The data source module type’s ID is Microsoft.Windows.WmiProviderWithRelationshipSnapshotDataMapper.

Following the data source module type definition is a discovery definition that implements the Microsoft.Windows.WmiProviderWithRelationshipSnapshotDataMapper module type to discover a relationship type instance.

<DataSourceModuleType ID="Microsoft.Windows.WmiProviderWithRelationshipSnapshotDataMapper" 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="RelationshipId" type="xsd:string" />
    <xsd:element name="SourceTypeId" minOccurs="0" maxOccurs="1" type="xsd:string" />
    <xsd:element name="TargetTypeId" minOccurs="0" maxOccurs="1" type="xsd:string" />
    <xsd:element name="SourceRoleSettings" type="SettingsType" />
    <xsd:element name="TargetRoleSettings" type="SettingsType" />
    <xsd:element name="InstanceSettings" minOccurs="0" maxOccurs="1" type="SettingsType" />
  </Configuration>
  <OverrideableParameters>
    <OverrideableParameter ID="Frequency" Selector="$Config/Frequency$" ParameterType="int" />
  </OverrideableParameters>
  <ModuleImplementation>
    <Composite>
      <MemberModules>
        <DataSource TypeID="System!System.Discovery.Scheduler" ID="Scheduler">
          <Scheduler>
            <SimpleReccuringSchedule>
              <Interval Unit="Seconds">$Config/Frequency$</Interval>
            </SimpleReccuringSchedule>
            <ExcludeDates />
          </Scheduler>
        </DataSource>
        <ProbeAction TypeID="Microsoft.Windows.WmiProbe" ID="Probe">
          <NameSpace>$Config/NameSpace$</NameSpace>
          <Query>$Config/Query$</Query>
        </ProbeAction>
        <ConditionDetection ID="Mapper" TypeID="System!System.Discovery.RelationshipSnapshotDataMapper">
          <RelationshipId>$Config/RelationshipId$</RelationshipId>
          <SourceTypeId>$Config/SourceTypeId$</SourceTypeId>
          <TargetTypeId>$Config/TargetTypeId$</TargetTypeId>
          <SourceRoleSettings>$Config/SourceRoleSettings$</SourceRoleSettings>
          <TargetRoleSettings>$Config/TargetRoleSettings$</TargetRoleSettings>
          <InstanceSettings>$Config/InstanceSettings$</InstanceSettings>
        </ConditionDetection>
      </MemberModules>
      <Composition>
        <Node ID="Mapper">
          <Node ID="Probe">
            <Node ID="Scheduler" />
          </Node>
        </Node>
      </Composition>
    </Composite>
  </ModuleImplementation>
  <OutputType>System!System.Discovery.Data</OutputType>
</DataSourceModuleType>

<Discovery ID="Microsoft.Windows.Client.2000.DiskPartitionContainsLogicalDisk.Discovery" Enabled="onEssentialMonitoring" Target="Microsoft.Windows.Client.2000.DiskPartition">
  <Category>Discovery</Category>
  <DiscoveryTypes>
    <DiscoveryRelationship TypeID="Microsoft.Windows.Client.2000.DiskPartitionContainsLogicalDisk" />
  </DiscoveryTypes>
  <DataSource ID="DiscoveryDataSource" TypeID="Windows!Microsoft.Windows.WmiProviderWithRelationshipSnapshotDataMapper">
    <NameSpace>\\$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$\ROOT\CIMV2</NameSpace>
    <Query>associators of {win32_diskpartition='$Target/Property[Type="Windows!Microsoft.Windows.LogicalDevice"]/DeviceID$'} where ResultClass=Win32_LogicalDisk</Query>
    <Frequency>7200</Frequency>
    <RelationshipId>$MPElement[Name="Microsoft.Windows.Client.2000.DiskPartitionContainsLogicalDisk"]$</RelationshipId>
    <SourceRoleSettings>
      <Settings>
        <Setting>
          <Name>$MPElement[Name="Windows!Microsoft.Windows.Computer"]/PrincipalName$</Name>
          <Value>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/PrincipalName$</Value>
        </Setting>
        <Setting>
          <Name>$MPElement[Name="Windows!Microsoft.Windows.LogicalDevice"]/DeviceID$</Name>
          <Value>$Target/Property[Type="Windows!Microsoft.Windows.LogicalDevice"]/DeviceID$</Value>
        </Setting>
      </Settings>
    </SourceRoleSettings>
    <TargetRoleSettings>
      <Settings>
        <Setting>
          <Name>$MPElement[Name="Windows!Microsoft.Windows.Computer"]/PrincipalName$</Name>
          <Value>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/PrincipalName$</Value>
        </Setting>
        <Setting>
          <Name>$MPElement[Name="Windows!Microsoft.Windows.LogicalDevice"]/DeviceID$</Name>
          <Value>$Data/Property[@Name='DeviceID']$</Value>
        </Setting>
      </Settings>
    </TargetRoleSettings>
  </DataSource>
</Discovery>

Information

   

Module Type

ConditionDetectionModuleType

Input Type

System.BaseData

Output Type

System.Discovery.Data

Implementation

Composite

Library

System.Library