reject-agentpendingaction operation
The reject-agentpendingaction
operation rejects the action that is pending with an agent. You can filter the agents by specifying a filter criterion.
The following table describes the <items>
XML and request elements for the reject-agentpendingaction
operation:
Adapter request elements for the reject-agentpendingaction operation
Element |
Definition |
Required |
---|---|---|
|
Specifies the operation name: |
Yes |
|
Specifies the parent element for the command elements |
Yes |
|
Specifies the duration after which the operation times out |
No |
|
Specifies the parent element for the command parameters |
Yes |
|
Specifies the parent element that contains the filter criterion used to retrieve the agents that have actions in the pending state |
Yes |
|
Specifies the parent element that contains the search criterion |
No |
|
Specifies the parent element for a single search criterion |
Conditional; required if the |
|
Specifies the key that is used to locate an agent
|
Conditional; required if the |
|
Specifies the value of the key specified in the |
Conditional; required if the |
|
Specifies the operation that is performed by using the values specified in the
|
Conditional; required if the |
|
Specifies whether you want to preview the results of the operation
|
No |
The following figure illustrates a sample adapter request for the reject-agentpendingaction
operation:
Sample adapter request for the reject-agentpendingaction operation
<scom-request>
<operation-name>reject-agentpendingaction</operation-name>
<command-request>
<timeout-secs>120</timeout-secs>
<command-parameters>
<agent-pending-action>
<filters>
<filter>
<agent-pending-action-key>AgentName</agent-pending-action-key>
<agent-pending-action-val>abc.neuron.com</agent-pending-action-val>
<operand>matches</operand>
</filter>
</filters>
</agent-pending-action>
<preview>true</preview>
</command-parameters>
</command-request>
</scom-request>
The following figure illustrates the adapter response for the sample request:
Sample adapter response for the reject-agentpendingaction operation
<scom-response>
<metadata>
<status>success</status>
<count>1</count>
</metadata>
<commands-output>
<command-output>
<metadata>
<command>./Microsoft.EnterpriseManagement.OperationsManager.ClientShell.
Startup.ps1;reject-agentpendingaction
-agentpendingaction (get-agentpendingaction | where-object {$_.AgentName
-match 'abc.neuron.com'})
-whatif</command>
<execution-milliseconds>3313</execution-milliseconds>
<exit-code>0</exit-code>
<status>success</status>
<count>0</count>
</metadata>
<output>
<line>What if: Performing operation "Reject-AgentPendingAction" on Target
"abc.neuron.com".</line>
</output>
</command-output>
</commands-output>
</scom-response>
Comments