Previous Topic: dpmpolicy resetruleexeccount Command--Reset Retries to Run a RuleNext Topic: dpmpolicy setruleexeclimit Command--Set Limits for a Rule


dpmpolicy runaction Command--Run an Action

The dpmpolicy runaction command runs actions and action sequences.

This command has the following format:

dpmpolicy  runaction [-sc sc_url] -action_name action name [-event_source event source] [-event_message event_message] [-rule_name rule name] [-server_name server name] [-service_name service name] [-propagate] [-vm_name vm name] [-datacenter datacenter name] [-host_system host system] [-wait_rc] [-pre] [-post] [-ws_user username -ws_password password][-locale iso639value] [-D-overwrite Parameter=value] 
-sc sc_url

(Optional) Defines the URL for the service controller host.

Example: https://hostname:port/...

hostname

Defines the fully qualified host where the service controller is installed.

Example: localhost.ca.com

port

Defines the listening port for the service controller server.

Example: 80

-action_name actionname

Defines the name of the action.

-event_source eventsource

(Optional) Defines the value with which to populate the %EVENTSOURCE% substitution variable.

-event_message eventmessage

(Optional) Defines the value with which to populate the %EVENTMESSAGE% substitution variable.

-rule_name rulename

(Optional) Defines the value with which to populate the %RULENAME% substitution variable.

-server_name servername

(Optional) Defines the value with which to populate the %SERVER% substitution variable.

-service_name servicename

(Optional) Defines the value with which to populate the %SERVICE% substitution variable.

-propagate

(Optional) Specifies that you want to run an action against all servers in the service that you specified in the -service_name option.

-vm_name vmname

(Optional) Defines the value with which to populate the %VMNAME% substitution variable.

-datacenter_name datacentername

(Optional) Defines the value with which to populate the %DATACENTER% substitution variable.

-host_system hostsystem

(Optional) Defines the value (the name of the VMware ESX host computer) with which to populate the %HOSTSYSTEM% substitution variable.

-wait_rc

(Optional) Specifies whether to wait for a Run Command Script action to finish.

-pre

(Optional) Specifies whether to generate an event before the operation is performed.

-post

(Optional) Specifies whether to generate an event after the operation is performed.

-ws_user username -ws_password password

(Optional) Specifies the credentials to use for the web service security check. If you do not include credentials, you are prompted to enter them. Avoid the prompt for credentials by setting up your own session using caaipsecurity.

-locale iso639value

(Optional) Specifies an IS0 639_3166 combination to override the default English output, for example, fr_FR for French. To use the locale of the command prompt, specify "native".

-D-overwrite Parameter=value

(Optional) Defines a new value for the specified parameter.

Example: Run Action to Bring a Server Online

This example runs an action that brings a server online.

dpmpolicy runaction -action_name  BringServerOnline -server_name Server001 -service_name Production -pre -post

Example: Run Action

This example runs an action.

dpmpolicy runaction -action_name Action1

Example: Run an Action Against all Servers in a Service

This example runs an action against all servers in the SERVICE1 service.

dpmpolicy runaction -action_name ACTION1 -service_name SERVICE1 -propagate

Example: Run an Action Requiring a VM

This example runs an action using a VM.

dpmpolicy runaction -action_name vc_action -vm_name Finance\Group\FinVMServer1 -datacenter FINANCE\NYC

Example: Run an Action with a Different Parameter Value

This example runs an action with a vm_name parameter value that is different to the value set in the CA Virtual Assurance user interface.

dpmpolicy runaction -action_name Create_snapshot -D-vm_name=VM02