Share via


MOMRelationshipInstance Object

Applies To: System Center 2012 - Operations Manager

[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

Represents a relationship between two management pack 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 on each other. For example, a database could reference another database that it is replicating. The existence of each of the databases is not dependent on 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 exist only when it is hosted within another class. For example, a hosting relationship exists when a Structured Query Language (SQL) database is hosted within an instance of Microsoft 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 MOMDiscoveryData. 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 or System Center 2012 – Operations Manager

See Also

Other Resources

Operations Manager Scripting Objects