az automation runbook
Note
This reference is part of the automation extension for the Azure CLI (version 2.55.0 or higher). The extension will automatically install the first time you run an az automation runbook command. Learn more about extensions.
This command group is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Automation Runbook.
Name | Description | Type | Status |
---|---|---|---|
az automation runbook create |
Create the runbook identified by runbook name. |
Extension | Experimental |
az automation runbook delete |
Delete the runbook by name. |
Extension | Experimental |
az automation runbook list |
Retrieve a list of runbooks. |
Extension | Experimental |
az automation runbook publish |
Publish runbook draft. |
Extension | Experimental |
az automation runbook replace-content |
Replace content of the runbook. |
Extension | Experimental |
az automation runbook revert-to-published |
Revert the runbook content to last known published state. |
Extension | Experimental |
az automation runbook show |
Retrieve the runbook identified by runbook name. |
Extension | Experimental |
az automation runbook start |
Start the runbook. |
Extension | Experimental |
az automation runbook update |
Update the runbook identified by runbook name. |
Extension | Experimental |
az automation runbook wait |
Place the CLI in a waiting state until a condition of the automation runbook is met. |
Extension | Experimental |
Command group 'automation runbook' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Create the runbook identified by runbook name.
az automation runbook create --automation-account-name
--name
--resource-group
--type {Graph, GraphPowerShell, GraphPowerShellWorkflow, PowerShell, PowerShellWorkflow, Python2, Python3, Script}
[--description]
[--location]
[--log-activity-trace]
[--log-progress {false, true}]
[--log-verbose {false, true}]
[--tags]
Create a runbook
az automation runbook create --automation-account-name "myAutomationAccount" --resource-group "rg" --name "myRunbook" --type "PowerShell" --location "East US 2"
The name of the automation account.
The runbook name.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Type of the runbook.
Description of the runbook.
Location. Values from: az account list-locations
. You can configure the default location using az configure --defaults location=<location>
.
Activity level tracing options of the runbook.
Progress log option of the runbook.
Verbose log option of the runbook.
Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
Command group 'automation runbook' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Delete the runbook by name.
az automation runbook delete [--automation-account-name]
[--ids]
[--name]
[--resource-group]
[--subscription]
[--yes]
Delete a runbook
az automation runbook delete --automation-account-name "myAutomationAccount" --resource-group "rg" --name "myRunbook"
The name of the automation account.
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
The runbook name.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Do not prompt for confirmation.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
Command group 'automation runbook' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Retrieve a list of runbooks.
az automation runbook list --automation-account-name
--resource-group
List runbooks by automation account
az automation runbook list --automation-account-name "myAutomationAccount" --resource-group "rg"
The name of the automation account.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
Command group 'automation runbook' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Publish runbook draft.
az automation runbook publish [--automation-account-name]
[--ids]
[--name]
[--no-wait]
[--resource-group]
[--subscription]
Publish runbook draft
az automation runbook publish --automation-account-name "myAutomationAccount" --resource-group "rg" --name "myRunbook"
The name of the automation account.
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
The parameters supplied to the publish runbook operation.
Do not wait for the long-running operation to finish.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
Command group 'automation runbook' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Replace content of the runbook.
az automation runbook replace-content --content
[--automation-account-name]
[--ids]
[--name]
[--no-wait]
[--resource-group]
[--subscription]
Replace content of the runbook
az automation runbook replace-content --automation-account-name "myAutomationAccount" --resource-group "rg" --name "myRunbook" --content @/path/to/script
The runbook content.
The name of the automation account.
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
The runbook name.
Do not wait for the long-running operation to finish.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
Command group 'automation runbook' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Revert the runbook content to last known published state.
az automation runbook revert-to-published [--automation-account-name]
[--ids]
[--name]
[--resource-group]
[--subscription]
Replace content of the runbook
az automation runbook revert-to-published --automation-account-name "myAutomationAccount" --resource-group "rg" --name "myRunbook"
The name of the automation account.
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
The runbook name.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
Command group 'automation runbook' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Retrieve the runbook identified by runbook name.
az automation runbook show [--automation-account-name]
[--ids]
[--name]
[--resource-group]
[--subscription]
Get runbook
az automation runbook show --automation-account-name "myAutomationAccount" --resource-group "rg" --name "myRunbook"
The name of the automation account.
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
The runbook name.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
Command group 'automation runbook' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Start the runbook.
az automation runbook start [--automation-account-name]
[--ids]
[--name]
[--parameters]
[--resource-group]
[--run-on]
[--subscription]
Start the runbook
az automation runbook start --automation-account-name "myAutomationAccount" --resource-group "rg" --name "myRunbook"
The name of the automation account.
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
The runbook name.
Parameters of the job. Expect value: KEY1=VALUE1 KEY2=VALUE2 ...
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
RunOn which specifies the group name where the job is to be executed.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
Command group 'automation runbook' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Update the runbook identified by runbook name.
az automation runbook update [--automation-account-name]
[--description]
[--ids]
[--log-activity-trace]
[--log-progress {false, true}]
[--log-verbose {false, true}]
[--name]
[--resource-group]
[--subscription]
[--tags]
Update a runbook
az automation runbook update --automation-account-name "myAutomationAccount" --description "Runbook Description" --log-activity-trace 1 --log-progress true --log-verbose false --resource-group "rg" --runbook-name "myRunbook"
The name of the automation account.
Description of the runbook.
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
Activity level tracing options of the runbook.
Progress log option of the runbook.
Verbose log option of the runbook.
The runbook name.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
Command group 'automation runbook' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Place the CLI in a waiting state until a condition of the automation runbook is met.
az automation runbook wait [--automation-account-name]
[--created]
[--custom]
[--deleted]
[--exists]
[--ids]
[--interval]
[--name]
[--resource-group]
[--subscription]
[--timeout]
[--updated]
Pause executing next line of CLI script until the automation runbook is successfully created.
az automation runbook wait --automation-account-name "myAutomationAccount" --resource-group "rg" --name "myRunbook" --created
The name of the automation account.
Wait until created with 'provisioningState' at 'Succeeded'.
Wait until the condition satisfies a custom JMESPath query. E.g. provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running'].
Wait until deleted.
Wait until the resource exists.
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
Polling interval in seconds.
The runbook name.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Maximum wait in seconds.
Wait until updated with provisioningState at 'Succeeded'.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
Azure CLI feedback
Azure CLI is an open source project. Select a link to provide feedback: