Hyper-v - Resume VM Replica

QND.Hyperv2012R2.ResumeReplica (Recovery)

Element properties:

TargetQND.Hyperv.2012R2.ReplicaVM
MonitorQND.Hyperv2012R2.VMReplica.Status
Reset MonitorFalse
RemotableTrue
Timeout300
CategoryMaintenance
Enabledfalse
AccessibilityPublic

Member Modules:

ID Module Type TypeId RunAs 
WA WriteAction QND.Hyperv2012R2.ResumeReplica.WAT Default

Source Code:

<Recovery ID="QND.Hyperv2012R2.ResumeReplica" Target="QND.Hyperv.2012R2.ReplicaVM" Monitor="QND.Hyperv2012R2.VMReplica.Status" Accessibility="Public" Enabled="false" ExecuteOnState="Warning" Remotable="true" ResetMonitor="false" Timeout="300">
<Category>Maintenance</Category>
<!-- Please fill in the type of the condition detection module
or remove the ConditionDetection section. This can be used to
inspect the Monitor State, Data Item that caused the State Change,
or the Diagnostic ProbeAction Output (if the ExecuteOnDiagnostic
attribute is present). If this Condition Detection does not "pass"
the WriteAction will not be executed. -->
<ConditionDetection ID="Filter" TypeID="System!System.ExpressionFilter">
<Expression>
<RegExExpression>
<ValueExpression>
<XPathQuery>StateChange/DataItem/Context/Property[@Name='ReplicationStateCode']</XPathQuery>
</ValueExpression>
<Operator>MatchesRegularExpression</Operator>
<Pattern>^(7,8,9,11)$</Pattern>
</RegExExpression>
</Expression>
</ConditionDetection>
<!-- Please fill in the type of the write action module.
Without a ConditionDetection, the WriteAction always executes.
The output of the write action will be shown in the
Health Explorer detail pane. -->
<WriteAction ID="WA" TypeID="QND.Hyperv2012R2.ResumeReplica.WAT">
<TimeoutSeconds>300</TimeoutSeconds>
<TraceLevel>2</TraceLevel>
<VMId>$Target/Property[Type='QND.Hyperv.2012R2.VM']/VirtualMachineId$</VMId>
</WriteAction>
</Recovery>