Microsoft.Insights autoscalesettings
Remarks
For guidance on deploying monitoring solutions, see Create monitoring resources by using Bicep.
Bicep resource definition
The autoscalesettings resource type can be deployed with operations that target:
- Resource groups - See resource group deployment commands
For a list of changed properties in each API version, see change log.
Resource format
To create a Microsoft.Insights/autoscalesettings resource, add the following Bicep to your template.
resource symbolicname 'Microsoft.Insights/autoscalesettings@2022-10-01' = {
location: 'string'
name: 'string'
properties: {
enabled: bool
name: 'string'
notifications: [
{
email: {
customEmails: [
'string'
]
sendToSubscriptionAdministrator: bool
sendToSubscriptionCoAdministrators: bool
}
operation: 'Scale'
webhooks: [
{
properties: {
{customized property}: 'string'
}
serviceUri: 'string'
}
]
}
]
predictiveAutoscalePolicy: {
scaleLookAheadTime: 'string'
scaleMode: 'string'
}
profiles: [
{
capacity: {
default: 'string'
maximum: 'string'
minimum: 'string'
}
fixedDate: {
end: 'string'
start: 'string'
timeZone: 'string'
}
name: 'string'
recurrence: {
frequency: 'string'
schedule: {
days: [
'string'
]
hours: [
int
]
minutes: [
int
]
timeZone: 'string'
}
}
rules: [
{
metricTrigger: {
dimensions: [
{
DimensionName: 'string'
Operator: 'string'
Values: [
'string'
]
}
]
dividePerInstance: bool
metricName: 'string'
metricNamespace: 'string'
metricResourceLocation: 'string'
metricResourceUri: 'string'
operator: 'string'
statistic: 'string'
threshold: int
timeAggregation: 'string'
timeGrain: 'string'
timeWindow: 'string'
}
scaleAction: {
cooldown: 'string'
direction: 'string'
type: 'string'
value: 'string'
}
}
]
}
]
targetResourceLocation: 'string'
targetResourceUri: 'string'
}
tags: {
{customized property}: 'string'
}
}
Property values
AutoscaleNotification
Name | Description | Value |
---|---|---|
the email notification. | EmailNotification | |
operation | the operation associated with the notification and its value must be "scale" | 'Scale' (required) |
webhooks | the collection of webhook notifications. | WebhookNotification[] |
AutoscaleProfile
Name | Description | Value |
---|---|---|
capacity | the number of instances that can be used during this profile. | ScaleCapacity (required) |
fixedDate | the specific date-time for the profile. This element is not used if the Recurrence element is used. | TimeWindow |
name | the name of the profile. | string (required) |
recurrence | the repeating times at which this profile begins. This element is not used if the FixedDate element is used. | Recurrence |
rules | the collection of rules that provide the triggers and parameters for the scaling action. A maximum of 10 rules can be specified. | ScaleRule[] (required) |
AutoscaleSetting
Name | Description | Value |
---|---|---|
enabled | the enabled flag. Specifies whether automatic scaling is enabled for the resource. The default value is 'false'. | bool |
name | the name of the autoscale setting. | string |
notifications | the collection of notifications. | AutoscaleNotification[] |
predictiveAutoscalePolicy | the predictive autoscale policy mode. | PredictiveAutoscalePolicy |
profiles | the collection of automatic scaling profiles that specify different scaling parameters for different time periods. A maximum of 20 profiles can be specified. | AutoscaleProfile[] (required) |
targetResourceLocation | the location of the resource that the autoscale setting should be added to. | string |
targetResourceUri | the resource identifier of the resource that the autoscale setting should be added to. | string |
EmailNotification
Name | Description | Value |
---|---|---|
customEmails | the custom e-mails list. This value can be null or empty, in which case this attribute will be ignored. | string[] |
sendToSubscriptionAdministrator | a value indicating whether to send email to subscription administrator. | bool |
sendToSubscriptionCoAdministrators | a value indicating whether to send email to subscription co-administrators. | bool |
MetricTrigger
Name | Description | Value |
---|---|---|
dimensions | List of dimension conditions. For example: [{"DimensionName":"AppName","Operator":"Equals","Values":["App1"]},{"DimensionName":"Deployment","Operator":"Equals","Values":["default"]}]. | ScaleRuleMetricDimension[] |
dividePerInstance | a value indicating whether metric should divide per instance. | bool |
metricName | the name of the metric that defines what the rule monitors. | string (required) |
metricNamespace | the namespace of the metric that defines what the rule monitors. | string |
metricResourceLocation | the location of the resource the rule monitors. | string |
metricResourceUri | the resource identifier of the resource the rule monitors. | string (required) |
operator | the operator that is used to compare the metric data and the threshold. | 'Equals' 'GreaterThan' 'GreaterThanOrEqual' 'LessThan' 'LessThanOrEqual' 'NotEquals' (required) |
statistic | the metric statistic type. How the metrics from multiple instances are combined. | 'Average' 'Count' 'Max' 'Min' 'Sum' (required) |
threshold | the threshold of the metric that triggers the scale action. | int (required) |
timeAggregation | time aggregation type. How the data that is collected should be combined over time. The default value is Average. | 'Average' 'Count' 'Last' 'Maximum' 'Minimum' 'Total' (required) |
timeGrain | the granularity of metrics the rule monitors. Must be one of the predefined values returned from metric definitions for the metric. Must be between 12 hours and 1 minute. | string (required) |
timeWindow | the range of time in which instance data is collected. This value must be greater than the delay in metric collection, which can vary from resource-to-resource. Must be between 12 hours and 5 minutes. | string (required) |
Microsoft.Insights/autoscalesettings
Name | Description | Value |
---|---|---|
location | Resource location | string (required) |
name | The resource name | string (required) |
properties | The autoscale setting of the resource. | AutoscaleSetting (required) |
tags | Resource tags | Dictionary of tag names and values. See Tags in templates |
PredictiveAutoscalePolicy
Name | Description | Value |
---|---|---|
scaleLookAheadTime | 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. | string |
scaleMode | the predictive autoscale mode | 'Disabled' 'Enabled' 'ForecastOnly' (required) |
Recurrence
Name | Description | Value |
---|---|---|
frequency | the recurrence frequency. How often the schedule profile should take effect. This value must be Week, meaning each week will have the same set of profiles. For example, to set a daily schedule, set schedule to every day of the week. The frequency property specifies that the schedule is repeated weekly. | 'Day' 'Hour' 'Minute' 'Month' 'None' 'Second' 'Week' 'Year' (required) |
schedule | the scheduling constraints for when the profile begins. | RecurrentSchedule (required) |
RecurrentSchedule
Name | Description | Value |
---|---|---|
days | the collection of days that the profile takes effect on. Possible values are Sunday through Saturday. | string[] (required) |
hours | A collection of hours that the profile takes effect on. Values supported are 0 to 23 on the 24-hour clock (AM/PM times are not supported). | int[] (required) |
minutes | A collection of minutes at which the profile takes effect at. | int[] (required) |
timeZone | the timezone for the hours of the profile. Some examples of valid time zones are: Dateline Standard Time, UTC-11, Hawaiian Standard Time, Alaskan Standard Time, Pacific Standard Time (Mexico), Pacific Standard Time, US Mountain Standard Time, Mountain Standard Time (Mexico), Mountain Standard Time, Central America Standard Time, Central Standard Time, Central Standard Time (Mexico), Canada Central Standard Time, SA Pacific Standard Time, Eastern Standard Time, US Eastern Standard Time, Venezuela Standard Time, Paraguay Standard Time, Atlantic Standard Time, Central Brazilian Standard Time, SA Western Standard Time, Pacific SA Standard Time, Newfoundland Standard Time, E. South America Standard Time, Argentina Standard Time, SA Eastern Standard Time, Greenland Standard Time, Montevideo Standard Time, Bahia Standard Time, UTC-02, Mid-Atlantic Standard Time, Azores Standard Time, Cape Verde Standard Time, Morocco Standard Time, UTC, GMT Standard Time, Greenwich Standard Time, W. Europe Standard Time, Central Europe Standard Time, Romance Standard Time, Central European Standard Time, W. Central Africa Standard Time, Namibia Standard Time, Jordan Standard Time, GTB Standard Time, Middle East Standard Time, Egypt Standard Time, Syria Standard Time, E. Europe Standard Time, South Africa Standard Time, FLE Standard Time, Turkey Standard Time, Israel Standard Time, Kaliningrad Standard Time, Libya Standard Time, Arabic Standard Time, Arab Standard Time, Belarus Standard Time, Russian Standard Time, E. Africa Standard Time, Iran Standard Time, Arabian Standard Time, Azerbaijan Standard Time, Russia Time Zone 3, Mauritius Standard Time, Georgian Standard Time, Caucasus Standard Time, Afghanistan Standard Time, West Asia Standard Time, Ekaterinburg Standard Time, Pakistan Standard Time, India Standard Time, Sri Lanka Standard Time, Nepal Standard Time, Central Asia Standard Time, Bangladesh Standard Time, N. Central Asia Standard Time, Myanmar Standard Time, SE Asia Standard Time, North Asia Standard Time, China Standard Time, North Asia East Standard Time, Singapore Standard Time, W. Australia Standard Time, Taipei Standard Time, Ulaanbaatar Standard Time, Tokyo Standard Time, Korea Standard Time, Yakutsk Standard Time, Cen. Australia Standard Time, AUS Central Standard Time, E. Australia Standard Time, AUS Eastern Standard Time, West Pacific Standard Time, Tasmania Standard Time, Magadan Standard Time, Vladivostok Standard Time, Russia Time Zone 10, Central Pacific Standard Time, Russia Time Zone 11, New Zealand Standard Time, UTC+12, Fiji Standard Time, Kamchatka Standard Time, Tonga Standard Time, Samoa Standard Time, Line Islands Standard Time | string (required) |
ResourceTags
Name | Description | Value |
---|
ScaleAction
Name | Description | Value |
---|---|---|
cooldown | the amount of time to wait since the last scaling action before this action occurs. It must be between 1 week and 1 minute in ISO 8601 format. | string (required) |
direction | the scale direction. Whether the scaling action increases or decreases the number of instances. | 'Decrease' 'Increase' 'None' (required) |
type | the type of action that should occur when the scale rule fires. | 'ChangeCount' 'ExactCount' 'PercentChangeCount' 'ServiceAllowedNextValue' (required) |
value | the number of instances that are involved in the scaling action. This value must be 1 or greater. The default value is 1. | string |
ScaleCapacity
Name | Description | Value |
---|---|---|
default | the number of instances that will be set if metrics are not available for evaluation. The default is only used if the current instance count is lower than the default. | string (required) |
maximum | the maximum number of instances for the resource. The actual maximum number of instances is limited by the cores that are available in the subscription. | string (required) |
minimum | the minimum number of instances for the resource. | string (required) |
ScaleRule
Name | Description | Value |
---|---|---|
metricTrigger | the trigger that results in a scaling action. | MetricTrigger (required) |
scaleAction | the parameters for the scaling action. | ScaleAction (required) |
ScaleRuleMetricDimension
Name | Description | Value |
---|---|---|
DimensionName | Name of the dimension. | string (required) |
Operator | the dimension operator. Only 'Equals' and 'NotEquals' are supported. 'Equals' being equal to any of the values. 'NotEquals' being not equal to all of the values | 'Equals' 'NotEquals' (required) |
Values | list of dimension values. For example: ["App1","App2"]. | string[] (required) |
TimeWindow
Name | Description | Value |
---|---|---|
end | the end time for the profile in ISO 8601 format. | string (required) |
start | the start time for the profile in ISO 8601 format. | string (required) |
timeZone | the timezone of the start and end times for the profile. Some examples of valid time zones are: Dateline Standard Time, UTC-11, Hawaiian Standard Time, Alaskan Standard Time, Pacific Standard Time (Mexico), Pacific Standard Time, US Mountain Standard Time, Mountain Standard Time (Mexico), Mountain Standard Time, Central America Standard Time, Central Standard Time, Central Standard Time (Mexico), Canada Central Standard Time, SA Pacific Standard Time, Eastern Standard Time, US Eastern Standard Time, Venezuela Standard Time, Paraguay Standard Time, Atlantic Standard Time, Central Brazilian Standard Time, SA Western Standard Time, Pacific SA Standard Time, Newfoundland Standard Time, E. South America Standard Time, Argentina Standard Time, SA Eastern Standard Time, Greenland Standard Time, Montevideo Standard Time, Bahia Standard Time, UTC-02, Mid-Atlantic Standard Time, Azores Standard Time, Cape Verde Standard Time, Morocco Standard Time, UTC, GMT Standard Time, Greenwich Standard Time, W. Europe Standard Time, Central Europe Standard Time, Romance Standard Time, Central European Standard Time, W. Central Africa Standard Time, Namibia Standard Time, Jordan Standard Time, GTB Standard Time, Middle East Standard Time, Egypt Standard Time, Syria Standard Time, E. Europe Standard Time, South Africa Standard Time, FLE Standard Time, Turkey Standard Time, Israel Standard Time, Kaliningrad Standard Time, Libya Standard Time, Arabic Standard Time, Arab Standard Time, Belarus Standard Time, Russian Standard Time, E. Africa Standard Time, Iran Standard Time, Arabian Standard Time, Azerbaijan Standard Time, Russia Time Zone 3, Mauritius Standard Time, Georgian Standard Time, Caucasus Standard Time, Afghanistan Standard Time, West Asia Standard Time, Ekaterinburg Standard Time, Pakistan Standard Time, India Standard Time, Sri Lanka Standard Time, Nepal Standard Time, Central Asia Standard Time, Bangladesh Standard Time, N. Central Asia Standard Time, Myanmar Standard Time, SE Asia Standard Time, North Asia Standard Time, China Standard Time, North Asia East Standard Time, Singapore Standard Time, W. Australia Standard Time, Taipei Standard Time, Ulaanbaatar Standard Time, Tokyo Standard Time, Korea Standard Time, Yakutsk Standard Time, Cen. Australia Standard Time, AUS Central Standard Time, E. Australia Standard Time, AUS Eastern Standard Time, West Pacific Standard Time, Tasmania Standard Time, Magadan Standard Time, Vladivostok Standard Time, Russia Time Zone 10, Central Pacific Standard Time, Russia Time Zone 11, New Zealand Standard Time, UTC+12, Fiji Standard Time, Kamchatka Standard Time, Tonga Standard Time, Samoa Standard Time, Line Islands Standard Time | string |
WebhookNotification
Name | Description | Value |
---|---|---|
properties | a property bag of settings. This value can be empty. | WebhookNotificationProperties |
serviceUri | the service address to receive the notification. | string |
WebhookNotificationProperties
Name | Description | Value |
---|
Quickstart samples
The following quickstart samples deploy this resource type.
Bicep File | Description |
---|---|
Deploy a VM Scale Set with Windows VMs and Auto Scale | This template allows you to deploy a simple VM Scale Set of Windows VMs using the latest patched version of Windows 2008-R2-SP1, 2012-Datacenter, or 2012-R2-Datacenter. These VMs are behind a load balancer with NAT rules for RDP connections. They also have Auto Scale integrated |
Deploy VM Scale Set with Python Bottle server & AutoScale | Deploy a VM Scale Set behind a load balancer/NAT & each VM running a simple Python Bottle app that does work. With Autoscale configured Scale Set will scale out & in as needed |
VM Scale Set with autoscale running an IIS WebApp | Deploys a Windows VM Scale Set running IIS and a very basic .NET MVC web app. The VMSS PowerShell DSC Extension is leveraged to do the IIS install and WebDeploy package deployment. |
ARM template resource definition
The autoscalesettings resource type can be deployed with operations that target:
- Resource groups - See resource group deployment commands
For a list of changed properties in each API version, see change log.
Resource format
To create a Microsoft.Insights/autoscalesettings resource, add the following JSON to your template.
{
"type": "Microsoft.Insights/autoscalesettings",
"apiVersion": "2022-10-01",
"name": "string",
"location": "string",
"properties": {
"enabled": "bool",
"name": "string",
"notifications": [
{
"email": {
"customEmails": [ "string" ],
"sendToSubscriptionAdministrator": "bool",
"sendToSubscriptionCoAdministrators": "bool"
},
"operation": "Scale",
"webhooks": [
{
"properties": {
"{customized property}": "string"
},
"serviceUri": "string"
}
]
}
],
"predictiveAutoscalePolicy": {
"scaleLookAheadTime": "string",
"scaleMode": "string"
},
"profiles": [
{
"capacity": {
"default": "string",
"maximum": "string",
"minimum": "string"
},
"fixedDate": {
"end": "string",
"start": "string",
"timeZone": "string"
},
"name": "string",
"recurrence": {
"frequency": "string",
"schedule": {
"days": [ "string" ],
"hours": [ "int" ],
"minutes": [ "int" ],
"timeZone": "string"
}
},
"rules": [
{
"metricTrigger": {
"dimensions": [
{
"DimensionName": "string",
"Operator": "string",
"Values": [ "string" ]
}
],
"dividePerInstance": "bool",
"metricName": "string",
"metricNamespace": "string",
"metricResourceLocation": "string",
"metricResourceUri": "string",
"operator": "string",
"statistic": "string",
"threshold": "int",
"timeAggregation": "string",
"timeGrain": "string",
"timeWindow": "string"
},
"scaleAction": {
"cooldown": "string",
"direction": "string",
"type": "string",
"value": "string"
}
}
]
}
],
"targetResourceLocation": "string",
"targetResourceUri": "string"
},
"tags": {
"{customized property}": "string"
}
}
Property values
AutoscaleNotification
Name | Description | Value |
---|---|---|
the email notification. | EmailNotification | |
operation | the operation associated with the notification and its value must be "scale" | 'Scale' (required) |
webhooks | the collection of webhook notifications. | WebhookNotification[] |
AutoscaleProfile
Name | Description | Value |
---|---|---|
capacity | the number of instances that can be used during this profile. | ScaleCapacity (required) |
fixedDate | the specific date-time for the profile. This element is not used if the Recurrence element is used. | TimeWindow |
name | the name of the profile. | string (required) |
recurrence | the repeating times at which this profile begins. This element is not used if the FixedDate element is used. | Recurrence |
rules | the collection of rules that provide the triggers and parameters for the scaling action. A maximum of 10 rules can be specified. | ScaleRule[] (required) |
AutoscaleSetting
Name | Description | Value |
---|---|---|
enabled | the enabled flag. Specifies whether automatic scaling is enabled for the resource. The default value is 'false'. | bool |
name | the name of the autoscale setting. | string |
notifications | the collection of notifications. | AutoscaleNotification[] |
predictiveAutoscalePolicy | the predictive autoscale policy mode. | PredictiveAutoscalePolicy |
profiles | the collection of automatic scaling profiles that specify different scaling parameters for different time periods. A maximum of 20 profiles can be specified. | AutoscaleProfile[] (required) |
targetResourceLocation | the location of the resource that the autoscale setting should be added to. | string |
targetResourceUri | the resource identifier of the resource that the autoscale setting should be added to. | string |
EmailNotification
Name | Description | Value |
---|---|---|
customEmails | the custom e-mails list. This value can be null or empty, in which case this attribute will be ignored. | string[] |
sendToSubscriptionAdministrator | a value indicating whether to send email to subscription administrator. | bool |
sendToSubscriptionCoAdministrators | a value indicating whether to send email to subscription co-administrators. | bool |
MetricTrigger
Name | Description | Value |
---|---|---|
dimensions | List of dimension conditions. For example: [{"DimensionName":"AppName","Operator":"Equals","Values":["App1"]},{"DimensionName":"Deployment","Operator":"Equals","Values":["default"]}]. | ScaleRuleMetricDimension[] |
dividePerInstance | a value indicating whether metric should divide per instance. | bool |
metricName | the name of the metric that defines what the rule monitors. | string (required) |
metricNamespace | the namespace of the metric that defines what the rule monitors. | string |
metricResourceLocation | the location of the resource the rule monitors. | string |
metricResourceUri | the resource identifier of the resource the rule monitors. | string (required) |
operator | the operator that is used to compare the metric data and the threshold. | 'Equals' 'GreaterThan' 'GreaterThanOrEqual' 'LessThan' 'LessThanOrEqual' 'NotEquals' (required) |
statistic | the metric statistic type. How the metrics from multiple instances are combined. | 'Average' 'Count' 'Max' 'Min' 'Sum' (required) |
threshold | the threshold of the metric that triggers the scale action. | int (required) |
timeAggregation | time aggregation type. How the data that is collected should be combined over time. The default value is Average. | 'Average' 'Count' 'Last' 'Maximum' 'Minimum' 'Total' (required) |
timeGrain | the granularity of metrics the rule monitors. Must be one of the predefined values returned from metric definitions for the metric. Must be between 12 hours and 1 minute. | string (required) |
timeWindow | the range of time in which instance data is collected. This value must be greater than the delay in metric collection, which can vary from resource-to-resource. Must be between 12 hours and 5 minutes. | string (required) |
Microsoft.Insights/autoscalesettings
Name | Description | Value |
---|---|---|
apiVersion | The api version | '2022-10-01' |
location | Resource location | string (required) |
name | The resource name | string (required) |
properties | The autoscale setting of the resource. | AutoscaleSetting (required) |
tags | Resource tags | Dictionary of tag names and values. See Tags in templates |
type | The resource type | 'Microsoft.Insights/autoscalesettings' |
PredictiveAutoscalePolicy
Name | Description | Value |
---|---|---|
scaleLookAheadTime | 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. | string |
scaleMode | the predictive autoscale mode | 'Disabled' 'Enabled' 'ForecastOnly' (required) |
Recurrence
Name | Description | Value |
---|---|---|
frequency | the recurrence frequency. How often the schedule profile should take effect. This value must be Week, meaning each week will have the same set of profiles. For example, to set a daily schedule, set schedule to every day of the week. The frequency property specifies that the schedule is repeated weekly. | 'Day' 'Hour' 'Minute' 'Month' 'None' 'Second' 'Week' 'Year' (required) |
schedule | the scheduling constraints for when the profile begins. | RecurrentSchedule (required) |
RecurrentSchedule
Name | Description | Value |
---|---|---|
days | the collection of days that the profile takes effect on. Possible values are Sunday through Saturday. | string[] (required) |
hours | A collection of hours that the profile takes effect on. Values supported are 0 to 23 on the 24-hour clock (AM/PM times are not supported). | int[] (required) |
minutes | A collection of minutes at which the profile takes effect at. | int[] (required) |
timeZone | the timezone for the hours of the profile. Some examples of valid time zones are: Dateline Standard Time, UTC-11, Hawaiian Standard Time, Alaskan Standard Time, Pacific Standard Time (Mexico), Pacific Standard Time, US Mountain Standard Time, Mountain Standard Time (Mexico), Mountain Standard Time, Central America Standard Time, Central Standard Time, Central Standard Time (Mexico), Canada Central Standard Time, SA Pacific Standard Time, Eastern Standard Time, US Eastern Standard Time, Venezuela Standard Time, Paraguay Standard Time, Atlantic Standard Time, Central Brazilian Standard Time, SA Western Standard Time, Pacific SA Standard Time, Newfoundland Standard Time, E. South America Standard Time, Argentina Standard Time, SA Eastern Standard Time, Greenland Standard Time, Montevideo Standard Time, Bahia Standard Time, UTC-02, Mid-Atlantic Standard Time, Azores Standard Time, Cape Verde Standard Time, Morocco Standard Time, UTC, GMT Standard Time, Greenwich Standard Time, W. Europe Standard Time, Central Europe Standard Time, Romance Standard Time, Central European Standard Time, W. Central Africa Standard Time, Namibia Standard Time, Jordan Standard Time, GTB Standard Time, Middle East Standard Time, Egypt Standard Time, Syria Standard Time, E. Europe Standard Time, South Africa Standard Time, FLE Standard Time, Turkey Standard Time, Israel Standard Time, Kaliningrad Standard Time, Libya Standard Time, Arabic Standard Time, Arab Standard Time, Belarus Standard Time, Russian Standard Time, E. Africa Standard Time, Iran Standard Time, Arabian Standard Time, Azerbaijan Standard Time, Russia Time Zone 3, Mauritius Standard Time, Georgian Standard Time, Caucasus Standard Time, Afghanistan Standard Time, West Asia Standard Time, Ekaterinburg Standard Time, Pakistan Standard Time, India Standard Time, Sri Lanka Standard Time, Nepal Standard Time, Central Asia Standard Time, Bangladesh Standard Time, N. Central Asia Standard Time, Myanmar Standard Time, SE Asia Standard Time, North Asia Standard Time, China Standard Time, North Asia East Standard Time, Singapore Standard Time, W. Australia Standard Time, Taipei Standard Time, Ulaanbaatar Standard Time, Tokyo Standard Time, Korea Standard Time, Yakutsk Standard Time, Cen. Australia Standard Time, AUS Central Standard Time, E. Australia Standard Time, AUS Eastern Standard Time, West Pacific Standard Time, Tasmania Standard Time, Magadan Standard Time, Vladivostok Standard Time, Russia Time Zone 10, Central Pacific Standard Time, Russia Time Zone 11, New Zealand Standard Time, UTC+12, Fiji Standard Time, Kamchatka Standard Time, Tonga Standard Time, Samoa Standard Time, Line Islands Standard Time | string (required) |
ResourceTags
Name | Description | Value |
---|
ScaleAction
Name | Description | Value |
---|---|---|
cooldown | the amount of time to wait since the last scaling action before this action occurs. It must be between 1 week and 1 minute in ISO 8601 format. | string (required) |
direction | the scale direction. Whether the scaling action increases or decreases the number of instances. | 'Decrease' 'Increase' 'None' (required) |
type | the type of action that should occur when the scale rule fires. | 'ChangeCount' 'ExactCount' 'PercentChangeCount' 'ServiceAllowedNextValue' (required) |
value | the number of instances that are involved in the scaling action. This value must be 1 or greater. The default value is 1. | string |
ScaleCapacity
Name | Description | Value |
---|---|---|
default | the number of instances that will be set if metrics are not available for evaluation. The default is only used if the current instance count is lower than the default. | string (required) |
maximum | the maximum number of instances for the resource. The actual maximum number of instances is limited by the cores that are available in the subscription. | string (required) |
minimum | the minimum number of instances for the resource. | string (required) |
ScaleRule
Name | Description | Value |
---|---|---|
metricTrigger | the trigger that results in a scaling action. | MetricTrigger (required) |
scaleAction | the parameters for the scaling action. | ScaleAction (required) |
ScaleRuleMetricDimension
Name | Description | Value |
---|---|---|
DimensionName | Name of the dimension. | string (required) |
Operator | the dimension operator. Only 'Equals' and 'NotEquals' are supported. 'Equals' being equal to any of the values. 'NotEquals' being not equal to all of the values | 'Equals' 'NotEquals' (required) |
Values | list of dimension values. For example: ["App1","App2"]. | string[] (required) |
TimeWindow
Name | Description | Value |
---|---|---|
end | the end time for the profile in ISO 8601 format. | string (required) |
start | the start time for the profile in ISO 8601 format. | string (required) |
timeZone | the timezone of the start and end times for the profile. Some examples of valid time zones are: Dateline Standard Time, UTC-11, Hawaiian Standard Time, Alaskan Standard Time, Pacific Standard Time (Mexico), Pacific Standard Time, US Mountain Standard Time, Mountain Standard Time (Mexico), Mountain Standard Time, Central America Standard Time, Central Standard Time, Central Standard Time (Mexico), Canada Central Standard Time, SA Pacific Standard Time, Eastern Standard Time, US Eastern Standard Time, Venezuela Standard Time, Paraguay Standard Time, Atlantic Standard Time, Central Brazilian Standard Time, SA Western Standard Time, Pacific SA Standard Time, Newfoundland Standard Time, E. South America Standard Time, Argentina Standard Time, SA Eastern Standard Time, Greenland Standard Time, Montevideo Standard Time, Bahia Standard Time, UTC-02, Mid-Atlantic Standard Time, Azores Standard Time, Cape Verde Standard Time, Morocco Standard Time, UTC, GMT Standard Time, Greenwich Standard Time, W. Europe Standard Time, Central Europe Standard Time, Romance Standard Time, Central European Standard Time, W. Central Africa Standard Time, Namibia Standard Time, Jordan Standard Time, GTB Standard Time, Middle East Standard Time, Egypt Standard Time, Syria Standard Time, E. Europe Standard Time, South Africa Standard Time, FLE Standard Time, Turkey Standard Time, Israel Standard Time, Kaliningrad Standard Time, Libya Standard Time, Arabic Standard Time, Arab Standard Time, Belarus Standard Time, Russian Standard Time, E. Africa Standard Time, Iran Standard Time, Arabian Standard Time, Azerbaijan Standard Time, Russia Time Zone 3, Mauritius Standard Time, Georgian Standard Time, Caucasus Standard Time, Afghanistan Standard Time, West Asia Standard Time, Ekaterinburg Standard Time, Pakistan Standard Time, India Standard Time, Sri Lanka Standard Time, Nepal Standard Time, Central Asia Standard Time, Bangladesh Standard Time, N. Central Asia Standard Time, Myanmar Standard Time, SE Asia Standard Time, North Asia Standard Time, China Standard Time, North Asia East Standard Time, Singapore Standard Time, W. Australia Standard Time, Taipei Standard Time, Ulaanbaatar Standard Time, Tokyo Standard Time, Korea Standard Time, Yakutsk Standard Time, Cen. Australia Standard Time, AUS Central Standard Time, E. Australia Standard Time, AUS Eastern Standard Time, West Pacific Standard Time, Tasmania Standard Time, Magadan Standard Time, Vladivostok Standard Time, Russia Time Zone 10, Central Pacific Standard Time, Russia Time Zone 11, New Zealand Standard Time, UTC+12, Fiji Standard Time, Kamchatka Standard Time, Tonga Standard Time, Samoa Standard Time, Line Islands Standard Time | string |
WebhookNotification
Name | Description | Value |
---|---|---|
properties | a property bag of settings. This value can be empty. | WebhookNotificationProperties |
serviceUri | the service address to receive the notification. | string |
WebhookNotificationProperties
Name | Description | Value |
---|
Quickstart templates
The following quickstart templates deploy this resource type.
Template | Description |
---|---|
Autoscale LANSA Windows VM ScaleSet with Azure SQL Database |
The template deploys a Windows VMSS with a desired count of VMs in the scale set and a LANSA MSI to install into each VM. Once the VM Scale Set is deployed a custom script extension is used to install the LANSA MSI) |
Deploy a VM Scale Set with a Linux custom image |
This template allows you to deploy a custom VM Linux image inside an Scale Set. These VMs are behind a load balancer with HTTP load balancing (by default on port 80). The example uses a custom script to do the application deployment and update, you may have to provide your custom script for your own update procedure. You will have to provide a generalized image of your VM in the same subscription and region where you create the VMSS. |
Deploy a VM Scale Set with Linux VMs and Auto Scale |
This template allows you to deploy a simple VM Scale Set of Linux VMs using the latest patched version of Ubuntu Linux 15.04 or 14.04.4-LTS. These VMs are behind a load balancer with NAT rules for ssh connections.They also have Auto Scale integrated |
Deploy a VM Scale Set with Windows VMs and Auto Scale |
This template allows you to deploy a simple VM Scale Set of Windows VMs using the latest patched version of Windows 2008-R2-SP1, 2012-Datacenter, or 2012-R2-Datacenter. These VMs are behind a load balancer with NAT rules for RDP connections. They also have Auto Scale integrated |
Deploy an Autoscale Setting for App Service Plan |
This template allows you to deploy an autoscale policy for Azure AppService Plan resource. |
Deploy an Autoscale Setting for Virtual Machine ScaleSet |
This template allows you to deploy an autoscale policy for Virtual Machine ScaleSet resource. |
Deploy Darktrace Autoscaling vSensors |
This template allows you to deploy an automatically autoscaling deployment of Darktrace vSensors |
Deploy Drupal with VM Scale Set, Azure Files and Mysql |
Deploy a VM Scale Set behind a load balancer/NAT & each VM running Drupal (Apache / PHP). All nodes share the created Azure file share storage and MySQL database |
Deploy VM Scale Set with Python Bottle server & AutoScale |
Deploy a VM Scale Set behind a load balancer/NAT & each VM running a simple Python Bottle app that does work. With Autoscale configured Scale Set will scale out & in as needed |
Deploy Windows VMSS configure windows featurtes SSL DSC |
This template allows you to deploy two Windows VMSS, configure windows features like IIS/Web Role, .Net Framework 4.5, windows auth, application initialization, download application deployment packages, URL Rewrite & SSL configuration using DSC and Azure Key Vault |
Enterprise Governance-AppService, SQL DB, AD, OMS, Runbooks |
Cloud adoption for an Enterprise, small or large, require responsible and efficient governance models to derive value from their cloud deployments. CloudWise (a code-name for the solution), is a composite solution available from Azure Partner QuickStarts, is an adoption enabler for Customers, System Integrators and Partners alike, that delivers a self-serviceable, automated governance and operations solution, focused on Optimizing Your Costs, Improve Your Application(s) Reliability, Reducing Business Risk. The solution highlights the core governance pillars of Visibility and Control. |
Kentico Xperience |
This template facilitates the deployment of resources required to host Kentico Xperience environments in Microsoft Azure. |
Manually change the number of VMs in a Scale Set |
This template allows you to manually change the number of VMs in a Scale Set. |
Scalable Umbraco CMS Web App |
This template provides a easy way to deploy umbraco CMS web app on Azure App Service Web Apps. |
Simple Umbraco CMS Web App |
This template provides a easy way to deploy umbraco CMS web app on Azure App Service Web Apps. |
VM Scale Set with autoscale running an IIS WebApp |
Deploys a Windows VM Scale Set running IIS and a very basic .NET MVC web app. The VMSS PowerShell DSC Extension is leveraged to do the IIS install and WebDeploy package deployment. |
Terraform (AzAPI provider) resource definition
The autoscalesettings resource type can be deployed with operations that target:
- Resource groups
For a list of changed properties in each API version, see change log.
Resource format
To create a Microsoft.Insights/autoscalesettings resource, add the following Terraform to your template.
resource "azapi_resource" "symbolicname" {
type = "Microsoft.Insights/autoscalesettings@2022-10-01"
name = "string"
location = "string"
tags = {
{customized property} = "string"
}
body = jsonencode({
properties = {
enabled = bool
name = "string"
notifications = [
{
email = {
customEmails = [
"string"
]
sendToSubscriptionAdministrator = bool
sendToSubscriptionCoAdministrators = bool
}
operation = "Scale"
webhooks = [
{
properties = {
{customized property} = "string"
}
serviceUri = "string"
}
]
}
]
predictiveAutoscalePolicy = {
scaleLookAheadTime = "string"
scaleMode = "string"
}
profiles = [
{
capacity = {
default = "string"
maximum = "string"
minimum = "string"
}
fixedDate = {
end = "string"
start = "string"
timeZone = "string"
}
name = "string"
recurrence = {
frequency = "string"
schedule = {
days = [
"string"
]
hours = [
int
]
minutes = [
int
]
timeZone = "string"
}
}
rules = [
{
metricTrigger = {
dimensions = [
{
DimensionName = "string"
Operator = "string"
Values = [
"string"
]
}
]
dividePerInstance = bool
metricName = "string"
metricNamespace = "string"
metricResourceLocation = "string"
metricResourceUri = "string"
operator = "string"
statistic = "string"
threshold = int
timeAggregation = "string"
timeGrain = "string"
timeWindow = "string"
}
scaleAction = {
cooldown = "string"
direction = "string"
type = "string"
value = "string"
}
}
]
}
]
targetResourceLocation = "string"
targetResourceUri = "string"
}
})
}
Property values
AutoscaleNotification
Name | Description | Value |
---|---|---|
the email notification. | EmailNotification | |
operation | the operation associated with the notification and its value must be "scale" | 'Scale' (required) |
webhooks | the collection of webhook notifications. | WebhookNotification[] |
AutoscaleProfile
Name | Description | Value |
---|---|---|
capacity | the number of instances that can be used during this profile. | ScaleCapacity (required) |
fixedDate | the specific date-time for the profile. This element is not used if the Recurrence element is used. | TimeWindow |
name | the name of the profile. | string (required) |
recurrence | the repeating times at which this profile begins. This element is not used if the FixedDate element is used. | Recurrence |
rules | the collection of rules that provide the triggers and parameters for the scaling action. A maximum of 10 rules can be specified. | ScaleRule[] (required) |
AutoscaleSetting
Name | Description | Value |
---|---|---|
enabled | the enabled flag. Specifies whether automatic scaling is enabled for the resource. The default value is 'false'. | bool |
name | the name of the autoscale setting. | string |
notifications | the collection of notifications. | AutoscaleNotification[] |
predictiveAutoscalePolicy | the predictive autoscale policy mode. | PredictiveAutoscalePolicy |
profiles | the collection of automatic scaling profiles that specify different scaling parameters for different time periods. A maximum of 20 profiles can be specified. | AutoscaleProfile[] (required) |
targetResourceLocation | the location of the resource that the autoscale setting should be added to. | string |
targetResourceUri | the resource identifier of the resource that the autoscale setting should be added to. | string |
EmailNotification
Name | Description | Value |
---|---|---|
customEmails | the custom e-mails list. This value can be null or empty, in which case this attribute will be ignored. | string[] |
sendToSubscriptionAdministrator | a value indicating whether to send email to subscription administrator. | bool |
sendToSubscriptionCoAdministrators | a value indicating whether to send email to subscription co-administrators. | bool |
MetricTrigger
Name | Description | Value |
---|---|---|
dimensions | List of dimension conditions. For example: [{"DimensionName":"AppName","Operator":"Equals","Values":["App1"]},{"DimensionName":"Deployment","Operator":"Equals","Values":["default"]}]. | ScaleRuleMetricDimension[] |
dividePerInstance | a value indicating whether metric should divide per instance. | bool |
metricName | the name of the metric that defines what the rule monitors. | string (required) |
metricNamespace | the namespace of the metric that defines what the rule monitors. | string |
metricResourceLocation | the location of the resource the rule monitors. | string |
metricResourceUri | the resource identifier of the resource the rule monitors. | string (required) |
operator | the operator that is used to compare the metric data and the threshold. | 'Equals' 'GreaterThan' 'GreaterThanOrEqual' 'LessThan' 'LessThanOrEqual' 'NotEquals' (required) |
statistic | the metric statistic type. How the metrics from multiple instances are combined. | 'Average' 'Count' 'Max' 'Min' 'Sum' (required) |
threshold | the threshold of the metric that triggers the scale action. | int (required) |
timeAggregation | time aggregation type. How the data that is collected should be combined over time. The default value is Average. | 'Average' 'Count' 'Last' 'Maximum' 'Minimum' 'Total' (required) |
timeGrain | the granularity of metrics the rule monitors. Must be one of the predefined values returned from metric definitions for the metric. Must be between 12 hours and 1 minute. | string (required) |
timeWindow | the range of time in which instance data is collected. This value must be greater than the delay in metric collection, which can vary from resource-to-resource. Must be between 12 hours and 5 minutes. | string (required) |
Microsoft.Insights/autoscalesettings
Name | Description | Value |
---|---|---|
location | Resource location | string (required) |
name | The resource name | string (required) |
properties | The autoscale setting of the resource. | AutoscaleSetting (required) |
tags | Resource tags | Dictionary of tag names and values. |
type | The resource type | "Microsoft.Insights/autoscalesettings@2022-10-01" |
PredictiveAutoscalePolicy
Name | Description | Value |
---|---|---|
scaleLookAheadTime | 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. | string |
scaleMode | the predictive autoscale mode | 'Disabled' 'Enabled' 'ForecastOnly' (required) |
Recurrence
Name | Description | Value |
---|---|---|
frequency | the recurrence frequency. How often the schedule profile should take effect. This value must be Week, meaning each week will have the same set of profiles. For example, to set a daily schedule, set schedule to every day of the week. The frequency property specifies that the schedule is repeated weekly. | 'Day' 'Hour' 'Minute' 'Month' 'None' 'Second' 'Week' 'Year' (required) |
schedule | the scheduling constraints for when the profile begins. | RecurrentSchedule (required) |
RecurrentSchedule
Name | Description | Value |
---|---|---|
days | the collection of days that the profile takes effect on. Possible values are Sunday through Saturday. | string[] (required) |
hours | A collection of hours that the profile takes effect on. Values supported are 0 to 23 on the 24-hour clock (AM/PM times are not supported). | int[] (required) |
minutes | A collection of minutes at which the profile takes effect at. | int[] (required) |
timeZone | the timezone for the hours of the profile. Some examples of valid time zones are: Dateline Standard Time, UTC-11, Hawaiian Standard Time, Alaskan Standard Time, Pacific Standard Time (Mexico), Pacific Standard Time, US Mountain Standard Time, Mountain Standard Time (Mexico), Mountain Standard Time, Central America Standard Time, Central Standard Time, Central Standard Time (Mexico), Canada Central Standard Time, SA Pacific Standard Time, Eastern Standard Time, US Eastern Standard Time, Venezuela Standard Time, Paraguay Standard Time, Atlantic Standard Time, Central Brazilian Standard Time, SA Western Standard Time, Pacific SA Standard Time, Newfoundland Standard Time, E. South America Standard Time, Argentina Standard Time, SA Eastern Standard Time, Greenland Standard Time, Montevideo Standard Time, Bahia Standard Time, UTC-02, Mid-Atlantic Standard Time, Azores Standard Time, Cape Verde Standard Time, Morocco Standard Time, UTC, GMT Standard Time, Greenwich Standard Time, W. Europe Standard Time, Central Europe Standard Time, Romance Standard Time, Central European Standard Time, W. Central Africa Standard Time, Namibia Standard Time, Jordan Standard Time, GTB Standard Time, Middle East Standard Time, Egypt Standard Time, Syria Standard Time, E. Europe Standard Time, South Africa Standard Time, FLE Standard Time, Turkey Standard Time, Israel Standard Time, Kaliningrad Standard Time, Libya Standard Time, Arabic Standard Time, Arab Standard Time, Belarus Standard Time, Russian Standard Time, E. Africa Standard Time, Iran Standard Time, Arabian Standard Time, Azerbaijan Standard Time, Russia Time Zone 3, Mauritius Standard Time, Georgian Standard Time, Caucasus Standard Time, Afghanistan Standard Time, West Asia Standard Time, Ekaterinburg Standard Time, Pakistan Standard Time, India Standard Time, Sri Lanka Standard Time, Nepal Standard Time, Central Asia Standard Time, Bangladesh Standard Time, N. Central Asia Standard Time, Myanmar Standard Time, SE Asia Standard Time, North Asia Standard Time, China Standard Time, North Asia East Standard Time, Singapore Standard Time, W. Australia Standard Time, Taipei Standard Time, Ulaanbaatar Standard Time, Tokyo Standard Time, Korea Standard Time, Yakutsk Standard Time, Cen. Australia Standard Time, AUS Central Standard Time, E. Australia Standard Time, AUS Eastern Standard Time, West Pacific Standard Time, Tasmania Standard Time, Magadan Standard Time, Vladivostok Standard Time, Russia Time Zone 10, Central Pacific Standard Time, Russia Time Zone 11, New Zealand Standard Time, UTC+12, Fiji Standard Time, Kamchatka Standard Time, Tonga Standard Time, Samoa Standard Time, Line Islands Standard Time | string (required) |
ResourceTags
Name | Description | Value |
---|
ScaleAction
Name | Description | Value |
---|---|---|
cooldown | the amount of time to wait since the last scaling action before this action occurs. It must be between 1 week and 1 minute in ISO 8601 format. | string (required) |
direction | the scale direction. Whether the scaling action increases or decreases the number of instances. | 'Decrease' 'Increase' 'None' (required) |
type | the type of action that should occur when the scale rule fires. | 'ChangeCount' 'ExactCount' 'PercentChangeCount' 'ServiceAllowedNextValue' (required) |
value | the number of instances that are involved in the scaling action. This value must be 1 or greater. The default value is 1. | string |
ScaleCapacity
Name | Description | Value |
---|---|---|
default | the number of instances that will be set if metrics are not available for evaluation. The default is only used if the current instance count is lower than the default. | string (required) |
maximum | the maximum number of instances for the resource. The actual maximum number of instances is limited by the cores that are available in the subscription. | string (required) |
minimum | the minimum number of instances for the resource. | string (required) |
ScaleRule
Name | Description | Value |
---|---|---|
metricTrigger | the trigger that results in a scaling action. | MetricTrigger (required) |
scaleAction | the parameters for the scaling action. | ScaleAction (required) |
ScaleRuleMetricDimension
Name | Description | Value |
---|---|---|
DimensionName | Name of the dimension. | string (required) |
Operator | the dimension operator. Only 'Equals' and 'NotEquals' are supported. 'Equals' being equal to any of the values. 'NotEquals' being not equal to all of the values | 'Equals' 'NotEquals' (required) |
Values | list of dimension values. For example: ["App1","App2"]. | string[] (required) |
TimeWindow
Name | Description | Value |
---|---|---|
end | the end time for the profile in ISO 8601 format. | string (required) |
start | the start time for the profile in ISO 8601 format. | string (required) |
timeZone | the timezone of the start and end times for the profile. Some examples of valid time zones are: Dateline Standard Time, UTC-11, Hawaiian Standard Time, Alaskan Standard Time, Pacific Standard Time (Mexico), Pacific Standard Time, US Mountain Standard Time, Mountain Standard Time (Mexico), Mountain Standard Time, Central America Standard Time, Central Standard Time, Central Standard Time (Mexico), Canada Central Standard Time, SA Pacific Standard Time, Eastern Standard Time, US Eastern Standard Time, Venezuela Standard Time, Paraguay Standard Time, Atlantic Standard Time, Central Brazilian Standard Time, SA Western Standard Time, Pacific SA Standard Time, Newfoundland Standard Time, E. South America Standard Time, Argentina Standard Time, SA Eastern Standard Time, Greenland Standard Time, Montevideo Standard Time, Bahia Standard Time, UTC-02, Mid-Atlantic Standard Time, Azores Standard Time, Cape Verde Standard Time, Morocco Standard Time, UTC, GMT Standard Time, Greenwich Standard Time, W. Europe Standard Time, Central Europe Standard Time, Romance Standard Time, Central European Standard Time, W. Central Africa Standard Time, Namibia Standard Time, Jordan Standard Time, GTB Standard Time, Middle East Standard Time, Egypt Standard Time, Syria Standard Time, E. Europe Standard Time, South Africa Standard Time, FLE Standard Time, Turkey Standard Time, Israel Standard Time, Kaliningrad Standard Time, Libya Standard Time, Arabic Standard Time, Arab Standard Time, Belarus Standard Time, Russian Standard Time, E. Africa Standard Time, Iran Standard Time, Arabian Standard Time, Azerbaijan Standard Time, Russia Time Zone 3, Mauritius Standard Time, Georgian Standard Time, Caucasus Standard Time, Afghanistan Standard Time, West Asia Standard Time, Ekaterinburg Standard Time, Pakistan Standard Time, India Standard Time, Sri Lanka Standard Time, Nepal Standard Time, Central Asia Standard Time, Bangladesh Standard Time, N. Central Asia Standard Time, Myanmar Standard Time, SE Asia Standard Time, North Asia Standard Time, China Standard Time, North Asia East Standard Time, Singapore Standard Time, W. Australia Standard Time, Taipei Standard Time, Ulaanbaatar Standard Time, Tokyo Standard Time, Korea Standard Time, Yakutsk Standard Time, Cen. Australia Standard Time, AUS Central Standard Time, E. Australia Standard Time, AUS Eastern Standard Time, West Pacific Standard Time, Tasmania Standard Time, Magadan Standard Time, Vladivostok Standard Time, Russia Time Zone 10, Central Pacific Standard Time, Russia Time Zone 11, New Zealand Standard Time, UTC+12, Fiji Standard Time, Kamchatka Standard Time, Tonga Standard Time, Samoa Standard Time, Line Islands Standard Time | string |
WebhookNotification
Name | Description | Value |
---|---|---|
properties | a property bag of settings. This value can be empty. | WebhookNotificationProperties |
serviceUri | the service address to receive the notification. | string |
WebhookNotificationProperties
Name | Description | Value |
---|