Share via


Property (RelationshipType)

Applies To: System Center Service Manager 2010

Represents a property of a relationship type that is defined in a management pack.

Schema Hierarchy

ManagementPack
  TypeDefinitions
    EntityTypes
      RelationshipTypes
        RelationshipType
          Property (RelationshipType)

Syntax

<Property ID=”PropertyName” Comment=”Comments” Type=”datatype” Key=”True/False” CaseSensitive=”True/False” Length=”256” MinLength=”0”>
</Property>

Attributes and Elements

The following sections describe attributes, child elements, and the parent element of the Property element.

Attributes

Attribute Description

ID

Required attribute. Represents the identity of the property. Must be unique within the relationship type.

Comment

Optional attribute. Represents commentary by the management pack author.

Type

Required attribute. Represents the data type of the property.

CaseSensitive

Optional attribute. Defines whether or not this property’s value is case sensitive. If not specified, the value defaults to False.

Length

Optional attribute. Pertains only to properties of type string. Defines the length of the string value. Value must be between 1 and 256 inclusively. If not specified, the value defaults to 256.

Type Attribute Values

Value Description

int

Indicates the property is of integer type.

decimal

Indicates the property is of decimal type.

double

Indicates the property is of double type.

string

Indicates the property is of string type.

datetime

Indicates the property is of datetime type.

guid

Indicates the property is of GUID type.

bool

Indicates the property is of Boolean type.

Child Elements

None.

Parent Elements

Element Description

RelationshipType

Represents a relationship type definition in a management pack.

Remarks

All System.Reference type relationships can have properties that are populated by discoveries. Because System.Hosting and System.Containment both derive from the System.Reference relationship type, they too can have properties. RelationshipType properties, unlike ClassType properties, do not require a key property. For more information about the Key attribute of a property, see Property (ClassType).

Example

Property elements inside RelationshipType elements are quite rare. However, the following XML snippet is taken from the Microsoft.Windows.Server.AD management pack. Instead of storing the properties on the class Windows!Microsoft.Windows.Server.DC.Computer class type, it stores them in the containment relationship type. The values of these properties are populated during the discovery process.

Generally, if there is data that must be preserved and the value of that data is dependent on a relationship between two class types, it is best to define the properties on the RelationshipType element rather than on the ClassType element.

<RelationshipType ID="Microsoft.Windows.Server.AD.Site.contains.Microsoft.Windows.Server.DC.Computer" Accessibility="Public" Abstract="false" Base="System!System.Containment">
  <Source>Microsoft.Windows.Server.AD.Site</Source>
  <Target>Windows!Microsoft.Windows.Server.DC.Computer</Target>
  <Property ID="IsBridgeheadIP" Type="string" CaseSensitive="false" Length="255"/>
  <Property ID="IsBridgeheadSMTP" Type="string" CaseSensitive="false" Length="255"/>
</RelationshipType> 

See Also

Reference

RelationshipType