다음을 통해 공유


WriteActionModuleType

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

Represents a write action module type definition in a management pack.

Schema Hierarchy

ManagementPack
  TypeDefinitions
    ModuleTypes
      WriteActionModuleType

Syntax

<WriteActionModuleType ID=”Company.Product.WriteActionModuleTypeID” Comment=”Comment” Accessibility=”Public/Internal” RunAs=”SecureReferenceID” Batching=”True/False” PassThrough=”True/False”>
   <Configuration>…</Configuration>
   <OverrideableParameters>…</OverrideableParameters>
   <ModuleImplementation>…</ModuleImplementation>
   <OutputType>DataType</OutputType>
   <InputType>DataType</InputType>
</WriteActionModuleType>

Attributes and Elements

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

Attributes

Attribute Description

ID

Required attribute. Represents the identity of the element. To learn how to identify your element in a management pack, see Element Identity and Namespace Conventions.

Comment

Optional attribute. Represents commentary by the management pack author.

Accessibility

Required attribute. Defines the visibility of the module type definition.

RunAs

Optional attribute. Refers to a SecureReference type ID. All instances of this module type definition will run under the credentials set for the SecureReference ID. When not specified, the module will run under the default action account.

Batching

Optional attribute. Indicates whether or not the module type can accept a batch of input data at one time. Not relevant for composite module types. Default value is false.

Accessibility Attribute Values

Value Description

Public

Indicates that the module type definition is visible to external management packs.

Internal

Indicates that the module type definition is not visible to external management packs.

Child Elements

Element Description

Configuration (WriteActionModuleType)

Required element. Represents the parameters for a monitor or module type definition in XSD schema.

OverrideableParameters (WriteActionModuleType)

Optional element. Contains any overrideable configuration parameters in a monitor or module type definition.

ModuleImplementation (WriteActionModuleType)

Required element. Defines the implementation type for native or managed module type definitions and defines the composite elements for composite module type definitions.

OutputType (WriteActionModuleType)

Optional element. Defines the output data type of a module type definition.

InputType (WriteActionModuleType)

Required element. Defines the input data type of a module type definition.

Parent Elements

Element Description

ModuleTypes

Contains module type definitions in a management pack.

Remarks

WriteActionModuleType definitions are used to update the system by writing to the database, creating an alert, or starting a service.

Write action module type definitions specify a single input data type and, optionally, a single output. When the module specifies an output data type, it is identifying the data type that will be sent to the operations database. The output data is never sent to another module in a workflow.

All composite module types define one internal workflow. That workflow is composed of module type implementations. In the case of the write action module type definition, only one or more WriteAction (WriteActionModuleType) modules are expected. For more information, see MemberModules (WriteActionModuleType).

Example

The following XML sample shows a WriteActionModuleType element that is defined in the System.Windows.Library management pack. This particular write action module is used to start a service on the specified computer name. The reason for defining this module type is to provide a specialized version of the System.CommandExecuter write action module type.

<WriteActionModuleType ID="Microsoft.Windows.ServiceControlManager.StartService" Accessibility="Public">
  <Configuration>
    <xsd:element name="ComputerName" type="xsd:string" />
    <xsd:element name="ServiceName" type="xsd:string" />
  </Configuration>
  <OverrideableParameters>
    <OverrideableParameter ID="ComputerName" ParameterType="string" Selector="$Config/ComputerName$" />
    <OverrideableParameter ID="ServiceName" ParameterType="string" Selector="$Config/ServiceName$" />
  </OverrideableParameters>
  <ModuleImplementation>
    <Composite>
      <MemberModules>
        <WriteAction ID="StartService" TypeID="System!System.CommandExecuter">
          <ApplicationName><![CDATA[%WinDir%\System32\sc.exe]]></ApplicationName>
          <WorkingDirectory />
          <CommandLine>\\$Config/ComputerName$ start $Config/ServiceName$</CommandLine>
          <TimeoutSeconds>60</TimeoutSeconds>
          <RequireOutput>true</RequireOutput>
        </WriteAction>
      </MemberModules>
      <Composition>
        <Node ID="StartService" />
      </Composition>
    </Composite>
  </ModuleImplementation>
  <OutputType>System!System.CommandOutput</OutputType>
  <InputType>System!System.BaseData</InputType>
</WriteActionModuleType>

See Also

Reference

ModuleTypes
WriteAction (WriteActionModuleType)