MOMRelationshipInstance Object

Applies To: Operations Manager 2007 R2, Operations Manager 2007 SP1, System Center Operations Manager 2007

Represents a relationship between two monitoring classes.

When a relationship type is declared in a Management Pack it must use one of the following three base relationship types:

  • Reference. Parent and child classes are not dependent upon each other. For example, a database could reference another database that it is replicating. The existence of each of the databases is not dependent upon the other and the objects are discovered separately. There is no restriction on the number of sources that can be connected to a single target or the number of targets that can be connected to a single source. This constitutes a many-to-many relationship type.

  • Containment. One class can be contained within another class. For example, a computer is contained within a computer group, but the computer can exist even if it is not part of a computer group. This constitutes a many to many relationship type.

  • Hosting. The instance of a class can only exist when it is hosted within another class. For example a hosting relationship exists when an SQL database is hosted within an instance of SQL Server. An instance of the target class can be hosted only by an instance of the source class, and it cannot be part of any other hosting relationship. A member of the target class can be hosted only by an instance of the source class and it cannot be part of any other hosting relationship. This constitutes a one-to-many relationship type.

All relationship types require a source class and a target class. The source and target objects must have been created by the MOMDiscoveryData.CreateClassInstance method of the discovery data object.

An example of this object is shown in the CreateRelationshipInstance method.

Methods

Name Description

MOMRelationshipInstance.AddProperty

Adds a new property value to the relationship instance.

Properties

Name Description

MOMRelationshipInstance.Source

Gets or sets the value of the relationship instance source.

MOMRelationshipInstance.Target

Gets or sets the monitoring object to which this relationship instance is targeted.

Requirements

Platforms: Requires Windows Server 2003, Windows Vista, or Windows Server 2008

Version: Requires Operations Manager 2007

See Also

Other Resources

Operations Manager 2007 R2 Scripting Objects