az monitor autoscale
Manage autoscale settings.
For more information on autoscaling, visit: https://docs.microsoft.com/azure/monitoring-and-diagnostics/monitoring-understanding-autoscale-settings.
Commands
az monitor autoscale create |
Create new autoscale settings. |
az monitor autoscale delete |
Deletes and autoscale setting. |
az monitor autoscale list |
Lists the autoscale settings for a resource group. |
az monitor autoscale profile |
Manage autoscaling profiles. |
az monitor autoscale profile create |
Create a fixed or recurring autoscale profile. |
az monitor autoscale profile delete |
Delete an autoscale profile. |
az monitor autoscale profile list |
List autoscale profiles. |
az monitor autoscale profile list-timezones |
Look up time zone information. |
az monitor autoscale profile show |
Show details of an autoscale profile. |
az monitor autoscale rule |
Manage autoscale scaling rules. |
az monitor autoscale rule copy |
Copy autoscale rules from one profile to another. |
az monitor autoscale rule create |
Add a new autoscale rule. |
az monitor autoscale rule delete |
Remove autoscale rules from a profile. |
az monitor autoscale rule list |
List autoscale rules for a profile. |
az monitor autoscale show |
Show autoscale setting details. |
az monitor autoscale update |
Update autoscale settings. |
az monitor autoscale create
Create new autoscale settings.
For more information on autoscaling, visit: https://docs.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]
[--subscription]
[--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.
Name or ID of the target resource.
Optional Parameters
Add an action to fire when a scaling event occurs.
Create the autoscale settings in a disabled state.
Send email to subscription administrator on scaling.
Send email to subscription co-administrators on scaling.
Location. Values from: az account list-locations
. You can configure the default location using az configure --defaults location=<location>
.
The maximum number of instances.
The minimum number of instances.
Name of the autoscale settings.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Target resource provider namespace.
Target resource parent path, if applicable.
Target resource type. Can also accept namespace/type format (Ex: 'Microsoft.Compute/virtualMachines').
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.
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.
Increase logging verbosity. Use --debug for full debug logs.
az monitor autoscale delete
Deletes and autoscale setting.
az monitor autoscale delete [--ids]
[--name]
[--resource-group]
[--subscription]
Optional Parameters
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.
Name of the autoscale settings.
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
.
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.
Increase logging verbosity. Use --debug for full debug logs.
az monitor autoscale list
Lists the autoscale settings for a resource group.
az monitor autoscale list --resource-group
[--query-examples]
[--subscription]
Required Parameters
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
Recommend JMESPath string for you. You can copy one of the query and paste it after --query parameter within double quotation marks to see the results. You can add one or more positional keywords so that we can give suggestions based on these key words.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
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.
Increase logging verbosity. Use --debug for full debug logs.
az monitor autoscale show
Show autoscale setting details.
az monitor autoscale show [--ids]
[--name]
[--query-examples]
[--resource-group]
[--subscription]
Examples
Show autoscale setting details. (autogenerated)
az monitor autoscale show --name MyAutoscaleSettings --resource-group MyResourceGroup
Optional Parameters
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.
Name of the autoscale settings.
Recommend JMESPath string for you. You can copy one of the query and paste it after --query parameter within double quotation marks to see the results. You can add one or more positional keywords so that we can give suggestions based on these key words.
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
.
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.
Increase logging verbosity. Use --debug for full debug logs.
az monitor autoscale update
Update autoscale settings.
For more information on autoscaling, visit: https://docs.microsoft.com/azure/monitoring-and-diagnostics/monitoring-understanding-autoscale-settings.
az monitor autoscale update [--add]
[--add-action]
[--count]
[--email-administrator {false, true}]
[--email-coadministrators {false, true}]
[--enabled {false, true}]
[--force-string]
[--ids]
[--max-count]
[--min-count]
[--name]
[--remove]
[--remove-action]
[--resource-group]
[--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. (autogenerated)
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
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>.
Add an action to fire when a scaling event occurs.
The numer of instances to use. If used with --min/max-count, the default number of instances to use.
Send email to subscription administrator on scaling.
Send email to subscription co-administrators on scaling.
Autoscale settings enabled status.
When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.
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 maximum number of instances.
The minimum number of instances.
Name of the autoscale settings.
Remove a property or an element from a list. Example: --remove property.list OR --remove propertyToRemove.
Remove one or more actions.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Update an object by specifying a property path and value to set. Example: --set property1.property2=.
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.
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.
Increase logging verbosity. Use --debug for full debug logs.