az monitor autoscale
Manage autoscale settings.
Commands
Name | Description | Type | Status |
---|---|---|---|
az monitor autoscale create |
Create new autoscale settings. |
Core | GA |
az monitor autoscale delete |
Delete an autoscale setting. |
Core | GA |
az monitor autoscale list |
Lists the autoscale settings for a resource group. |
Core | GA |
az monitor autoscale profile |
Manage autoscaling profiles. |
Core | GA |
az monitor autoscale profile create |
Create a fixed or recurring autoscale profile. |
Core | GA |
az monitor autoscale profile delete |
Delete an autoscale profile. |
Core | GA |
az monitor autoscale profile list |
List autoscale profiles. |
Core | GA |
az monitor autoscale profile list-timezones |
Look up time zone information. |
Core | GA |
az monitor autoscale profile show |
Show details of an autoscale profile. |
Core | GA |
az monitor autoscale rule |
Manage autoscale scaling rules. |
Core | GA |
az monitor autoscale rule copy |
Copy autoscale rules from one profile to another. |
Core | GA |
az monitor autoscale rule create |
Add a new autoscale rule. |
Core | GA |
az monitor autoscale rule delete |
Remove autoscale rules from a profile. |
Core | GA |
az monitor autoscale rule list |
List autoscale rules for a profile. |
Core | GA |
az monitor autoscale show |
Get an autoscale setting. |
Core | GA |
az monitor autoscale show-predictive-metric |
Show predictive autoscale metric future data. |
Core | GA |
az monitor autoscale update |
Update an autoscale setting. |
Core | GA |
az monitor autoscale create
Create new autoscale settings.
For more information on autoscaling, visit: https://learn.microsoft.com/azure/monitoring-and-diagnostics/monitoring-understanding-autoscale-settings.
az monitor autoscale create --count
--resource
[--action]
[--disabled {false, true}]
[--email-administrator {false, true}]
[--email-coadministrators {false, true}]
[--location]
[--max-count]
[--min-count]
[--name]
[--resource-group]
[--resource-namespace]
[--resource-parent]
[--resource-type]
[--scale-look-ahead-time]
[--scale-mode {Disabled, Enabled, ForecastOnly}]
[--tags]
Examples
Create autoscale settings to scale between 2 and 5 instances (3 as default). Email the administrator when scaling occurs.
az monitor autoscale create -g {myrg} --resource {resource-id} --min-count 2 --max-count 5 \
--count 3 --email-administrator
az monitor autoscale rule create -g {myrg} --autoscale-name {resource-name} --scale out 1 \
--condition "Percentage CPU > 75 avg 5m"
az monitor autoscale rule create -g {myrg} --autoscale-name {resource-name} --scale in 1 \
--condition "Percentage CPU < 25 avg 5m"
Create autoscale settings for exactly 4 instances.
az monitor autoscale create -g {myrg} --resource {resource-id} --count 4
Create new autoscale settings. (autogenerated)
az monitor autoscale create --count 3 --max-count 5 --min-count 2 --name MyAutoscaleSettings --resource myScaleSet --resource-group MyResourceGroup --resource-type Microsoft.Compute/virtualMachineScaleSets
Required Parameters
The numer of instances to use. If used with --min/max-count, the default number of instances to use.
Property | Value |
---|---|
Parameter group: | Instance Limit Arguments |
Name or ID of the target resource.
Property | Value |
---|---|
Parameter group: | Target Resource Arguments |
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Add an action to fire when a scaling event occurs.
Usage: --action TYPE KEY [ARG ...]
Email: --action email bob@contoso.com ann@contoso.com
Webhook: --action webhook https://www.contoso.com/alert
apiKey=value
Webhook: --action webhook https://www.contoso.com/alert?apiKey=value
Multiple actions can be specified by using more than one --action
argument.
Property | Value |
---|---|
Parameter group: | Notification Arguments |
Create the autoscale settings in a disabled state.
Property | Value |
---|---|
Accepted values: | false, true |
Send email to subscription administrator on scaling.
Property | Value |
---|---|
Parameter group: | Notification Arguments |
Accepted values: | false, true |
Send email to subscription co-administrators on scaling.
Property | Value |
---|---|
Parameter group: | Notification Arguments |
Accepted values: | false, true |
Location. Values from: az account list-locations
. You can configure the default location using az configure --defaults location=<location>
.
The maximum number of instances.
Property | Value |
---|---|
Parameter group: | Instance Limit Arguments |
The minimum number of instances.
Property | Value |
---|---|
Parameter group: | Instance Limit Arguments |
Name of the autoscale settings.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Property | Value |
---|---|
Parameter group: | Target Resource Arguments |
Target resource provider namespace.
Property | Value |
---|---|
Parameter group: | Target Resource Arguments |
Target resource parent path, if applicable.
Property | Value |
---|---|
Parameter group: | Target Resource Arguments |
Target resource type. Can also accept namespace/type format (Ex: 'Microsoft.Compute/virtualMachines').
Property | Value |
---|---|
Parameter group: | Target Resource Arguments |
The amount of time to specify by which instances are launched in advance. It must be between 1 minute and 60 minutes in ISO 8601 format (for example, 100 days would be P100D).
Property | Value |
---|---|
Parameter group: | Predictive Policy Arguments |
The predictive autoscale mode.
Property | Value |
---|---|
Parameter group: | Predictive Policy Arguments |
Accepted values: | Disabled, Enabled, ForecastOnly |
Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
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.
Property | Value |
---|---|
Default value: | False |
az monitor autoscale delete
Delete an autoscale setting.
az monitor autoscale delete [--autoscale-name --name]
[--ids]
[--resource-group]
[--subscription]
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
The autoscale setting name.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
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.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
Property | Value |
---|---|
Default value: | False |
az monitor autoscale list
Lists the autoscale settings for a resource group.
az monitor autoscale list --resource-group
[--max-items]
[--next-token]
Required Parameters
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Total number of items to return in the command's output. If the total number of items available is more than the value specified, a token is provided in the command's output. To resume pagination, provide the token value in --next-token
argument of a subsequent command.
Property | Value |
---|---|
Parameter group: | Pagination Arguments |
Token to specify where to start paginating. This is the token value from a previously truncated response.
Property | Value |
---|---|
Parameter group: | Pagination Arguments |
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
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.
Property | Value |
---|---|
Default value: | False |
az monitor autoscale show
Get an autoscale setting.
az monitor autoscale show [--autoscale-name --name]
[--ids]
[--resource-group]
[--subscription]
Examples
Show autoscale setting details.
az monitor autoscale show --name MyAutoscaleSettings --resource-group MyResourceGroup
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
The autoscale setting name.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
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.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
Property | Value |
---|---|
Default value: | False |
az monitor autoscale show-predictive-metric
Show predictive autoscale metric future data.
az monitor autoscale show-predictive-metric --aggregation
--interval
--metric-name
--metric-namespace
--timespan
[--autoscale-setting-name]
[--ids]
[--resource-group]
[--subscription]
Required Parameters
The list of aggregation types (comma separated) to retrieve.
The interval (i.e. timegrain) of the query.
The names of the metrics (comma separated) to retrieve. Special case: If a metricname itself has a comma in it then use %2 to indicate it. Eg: 'Metric,Name1' should be 'Metric%2Name1'.
Metric namespace to query metric definitions for.
The timespan of the query. It is a string with the following format 'startDateTime_ISO/endDateTime_ISO'.
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
The autoscale setting name.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
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.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
Property | Value |
---|---|
Default value: | False |
az monitor autoscale update
Update an autoscale setting.
For more information on autoscaling, visit: https://learn.microsoft.com/azure/monitoring-and-diagnostics/monitoring-understanding-autoscale-settings.
az monitor autoscale update [--add]
[--add-action --add-actions]
[--autoscale-name --name]
[--count]
[--email-administrator {0, 1, f, false, n, no, t, true, y, yes}]
[--email-coadministrators {0, 1, f, false, n, no, t, true, y, yes}]
[--enabled {0, 1, f, false, n, no, t, true, y, yes}]
[--force-string {0, 1, f, false, n, no, t, true, y, yes}]
[--ids]
[--max-count]
[--min-count]
[--remove]
[--remove-action --remove-actions]
[--resource-group]
[--scale-look-ahead-time]
[--scale-mode {Disabled, Enabled, ForecastOnly}]
[--set]
[--subscription]
[--tags]
Examples
Update autoscale settings to use a fixed 3 instances by default.
az monitor autoscale update -g myrg -n autoscale-name --count 3
Update autoscale settings to remove an email notification.
az monitor autoscale update -g myrg -n autoscale-name --remove-action email bob@contoso.com
Update autoscale settings.
az monitor autoscale update --count 3 --email-administrator true --enabled true --max-count 5 --min-count 2 --name MyAutoscaleSettings --resource-group MyResourceGroup --tags key[=value]
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Add an object to a list of objects by specifying a path and key value pairs. Example: --add property.listProperty <key=value, string or JSON string>
.
Property | Value |
---|---|
Parameter group: | Generic Update Arguments |
Add an action to fire when a scaling event occurs.
Usage: --add-action TYPE KEY [ARG ...]
Email: --add-action email bob@contoso.com ann@contoso.com
Webhook: --add-action webhook https://www.contoso.com/alert
apiKey=value
Webhook: --add-action webhook https://www.contoso.com/alert?apiKey=value
Multiple actions can be specified by using more than one --add-action
argument.
Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
Property | Value |
---|---|
Parameter group: | Notification Arguments |
The autoscale setting name.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
The numer of instances to use. If used with --min/max-count, the default number of instances to use.
Property | Value |
---|---|
Parameter group: | Instance Limit Arguments |
Send email to subscription administrator on scaling.
Property | Value |
---|---|
Parameter group: | Notification Arguments |
Accepted values: | 0, 1, f, false, n, no, t, true, y, yes |
Send email to subscription co-administrators on scaling.
Property | Value |
---|---|
Parameter group: | Notification Arguments |
Accepted values: | 0, 1, f, false, n, no, t, true, y, yes |
The enabled flag. Specifies whether automatic scaling is enabled for the resource. The default value is 'false'.
Property | Value |
---|---|
Accepted values: | 0, 1, f, false, n, no, t, true, y, yes |
When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.
Property | Value |
---|---|
Parameter group: | Generic Update Arguments |
Accepted values: | 0, 1, f, false, n, no, t, true, y, yes |
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.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
The maximum number of instances.
Property | Value |
---|---|
Parameter group: | Instance Limit Arguments |
The minimum number of instances.
Property | Value |
---|---|
Parameter group: | Instance Limit Arguments |
Remove a property or an element from a list. Example: --remove property.list <indexToRemove>
OR --remove propertyToRemove
.
Property | Value |
---|---|
Parameter group: | Generic Update Arguments |
Remove one or more actions.
Usage: --remove-action TYPE KEY [KEY ...]
Email: --remove-action email bob@contoso.com ann@contoso.com
Webhook: --remove-action webhook https://contoso.com/alert
https://alerts.contoso.com
.
Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
Property | Value |
---|---|
Parameter group: | Notification Arguments |
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
The amount of time to specify by which instances are launched in advance. It must be between 1 minute and 60 minutes in ISO 8601 format (for example, 100 days would be P100D).
Property | Value |
---|---|
Parameter group: | Predictive Policy Arguments |
The predictive autoscale mode.
Property | Value |
---|---|
Parameter group: | Predictive Policy Arguments |
Accepted values: | Disabled, Enabled, ForecastOnly |
Update an object by specifying a property path and value to set. Example: --set property1.property2=<value>
.
Property | Value |
---|---|
Parameter group: | Generic Update Arguments |
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Gets or sets a list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater in length than 128 characters and a value no greater in length than 256 characters. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
Property | Value |
---|---|
Default value: | False |