MembershipRuleType

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

The MembershipRuleType complex data type is used to define membership criteria in group discoveries that implement Microsoft.SystemCenter.GroupPopulator.

Schema Definition

<xsd:complexType name="MembershipRuleType" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <xsd:sequence>
    <xsd:sequence minOccurs="1" maxOccurs="1">
      <xsd:element name="MonitoringClass" type="xsd:string" minOccurs="1" maxOccurs="1" />
      <xsd:element name="RelationshipClass" type="xsd:string" minOccurs="1" maxOccurs="1" />
    </xsd:sequence>
    <xsd:element name="Expression" type="ExpressionType" minOccurs="0" maxOccurs="1" />
    <xsd:element name="IncludeList" type="MonitoringObjectIdListType" minOccurs="0" maxOccurs="1" />
    <xsd:element name="ExcludeList" type="MonitoringObjectIdListType" minOccurs="0" maxOccurs="1" />
  </xsd:sequence>
  <xsd:attribute name="Comment" type="xsd:string" use="optional" />
</xsd:complexType>

Remarks

The MembershipRuleType data type contains the parameters described in the following table.

Parameter Type Description

MonitoringClass

Complex

Required. Refers to the ID of the class type instance to be contained in the group.

RelationshipClass

CorrelationExpressionType

Required. Refers to the ID of the relationship type instance that defines the group and its contained class type instances.

Expression

ExpressionType (GroupPopulationSchema)

Optional. Defines an expression for determining which monitoring objects are to be included within the group.

IncludeList

MonitoringObjectIdListType

Optional. Specifies monitoring objects to include in the group that would otherwise not be included based on the current membership rules. This parameter is used only from within the Operations Manager console by the user so that they can make exceptions to your defined filter.

ExcludeList

MonitoringObjectIdListType

Optional. Specifies monitoring objects to exclude in the group that would otherwise be included based on the current membership rules. This parameter is used only from within the Operations Manager console by the user so that they can make exceptions to your defined filter.

MonitoringClass

The MonitoringClass parameter identifies the class type instances that are to be contained in your group.

The MonitoringClass parameter value must be expressed in the following format:

$MPElement[Name="Windows!Microsoft.Windows.Computer"]$

In this case, the group will be populated with all instances of Microsoft.Windows.Computer.

Before defining a monitoring class type that is to be contained in your group, you must first ensure that it is defined within a RelationshipType definition as the target of that group.

RelationshipClass

The RelationshipClass parameter identifies the containment relationship type that is to define the class type instance of the group and its contained class type instances.

The RelationshipClass parameter value must be expressed in the following format:

$MPElement[Name="InstanceGroup!Microsoft.SystemCenter.InstanceGroupContainsEntities"]$

The Microsoft.SystemCenter.InstanceGroupContainsEntities relationship class type is defined in the Microsoft.SystemCenter.InstanceGroup.Library core management pack. It is defined as follows:

<EntityTypes>
  <ClassTypes>
    <ClassType ID="Microsoft.SystemCenter.InstanceGroup" Base="System!System.Group" Abstract="true" Accessibility="Public" Hosted="false" />
  </ClassTypes>
  <RelationshipTypes>
    <RelationshipType ID="Microsoft.SystemCenter.InstanceGroupContainsEntities" Base="System!System.Containment" Abstract="false" Accessibility="Public">
      <Source>Microsoft.SystemCenter.InstanceGroup</Source>
      <Target>System!System.Entity</Target>
    </RelationshipType>
  </RelationshipTypes>
</EntityTypes>

All custom group relationship types that you define must ultimately inherit from the base System.Containment relationship type. It is the base relationship type that defines the containment structure of a group and its contained class types. For every instance of the target class type instance found, a new relationship type instance will be instantiated in the system.

The source (group) of the Microsoft.SystemCenter.InstanceGroupContainsEntities relationship type is an abstract class type, which means that either your source group must already be derived from System.Group or you must define a new group that derives from it.

For more information about the structure and meaning of a relationship definition in a management pack, see RelationshipType.

Expression

The Expression parameter allows you to define a filter for target class type instances that could be part of your group. For example, suppose your group targets Microsoft.Windows.Computer instances but you want to include only those instances that have a specific name. In that case, you would define something similar to the following expression:

Note

For more information about how to define filters for group inclusion and exclusion, see ExpressionType (GroupPopulationSchema).

<SimpleExpression>
  <ValueExpression>
    <Property>$MPElement[Name="Windows!Microsoft.Windows.Computer"]/NetworkName$</Property>
  </ValueExpression>
  <Operator>Equal</Operator>
  <ValueExpression>
    <Value>ServerName</Value>
  </ValueExpression>
</SimpleExpression>
</Expression>

Information

   

Schema Type

Microsoft.SystemCenter.GroupPopulationSchema

Library

Microsoft.SystemCenter.Library