Microsoft.Insights autoscalesettings 2021-05-01-preview

Bicep resource definition

The autoscalesettings resource type can be deployed with operations that target:

For a list of changed properties in each API version, see change log.

Remarks

For guidance on deploying monitoring solutions, see Create monitoring resources by using Bicep.

Resource format

To create a Microsoft.Insights/autoscalesettings resource, add the following Bicep to your template.

resource symbolicname 'Microsoft.Insights/autoscalesettings@2021-05-01-preview' = {
  name: 'string'
  location: 'string'
  tags: {
    tagName1: 'tagValue1'
    tagName2: 'tagValue2'
  }
  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

autoscalesettings

Name Description Value
name The resource name string (required)

Character limit: 1-260

Valid characters:
Can't use:
:<>+/&%\?| or control characters

Can't end with space or period.
location Resource location string (required)
tags 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. Dictionary of tag names and values. See Tags in templates
properties The autoscale setting of the resource. AutoscaleSetting (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)

Constraints:
Max length = 20
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

AutoscaleNotification

Name Description Value
email 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[]

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

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
{customized property} string

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)

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)

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)

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, Türkiye 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

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, Türkiye 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)

ScaleRule

Name Description Value
metricTrigger the trigger that results in a scaling action. MetricTrigger (required)
scaleAction the parameters for the scaling action. ScaleAction (required)

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)

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)

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

Quickstart templates

The following quickstart templates deploy this resource type.

Template Description
Deploy Darktrace Autoscaling vSensors

Deploy to Azure
This template allows you to deploy an automatically autoscaling deployment of Darktrace vSensors
Deploy Drupal with VM Scale Set, Azure Files and Mysql

Deploy to Azure
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
Kentico Xperience

Deploy to Azure
This template facilitates the deployment of resources required to host Kentico Xperience environments in Microsoft Azure.
Autoscale LANSA Windows VM ScaleSet with Azure SQL Database

Deploy to Azure
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 VM Scale Set with Python Bottle server & AutoScale

Deploy to Azure
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
Scalable Umbraco CMS Web App

Deploy to Azure
This template provides a easy way to deploy umbraco CMS web app on Azure App Service Web Apps.
Simple Umbraco CMS Web App

Deploy to Azure
This template provides a easy way to deploy umbraco CMS web app on Azure App Service Web Apps.
Enterprise Governance-AppService, SQL DB, AD, OMS, Runbooks

Deploy to Azure
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.
Deploy an Autoscale Setting for Virtual Machine ScaleSet

Deploy to Azure
This template allows you to deploy an autoscale policy for Virtual Machine ScaleSet resource.
Deploy an Autoscale Setting for App Service Plan

Deploy to Azure
This template allows you to deploy an autoscale policy for Azure AppService Plan resource.
Deploy Windows VMSS configure windows featurtes SSL DSC

Deploy to Azure
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
VM Scale Set with autoscale running an IIS WebApp

Deploy to Azure
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.
Deploy a VM Scale Set with a Linux custom image

Deploy to Azure
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.
Manually change the number of VMs in a Scale Set

Deploy to Azure
This template allows you to manually change the number of VMs in a Scale Set.
Deploy a VM Scale Set with Linux VMs and Auto Scale

Deploy to Azure
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

Deploy to Azure
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

ARM template resource definition

The autoscalesettings resource type can be deployed with operations that target:

For a list of changed properties in each API version, see change log.

Remarks

For guidance on deploying monitoring solutions, see Create monitoring resources by using Bicep.

Resource format

To create a Microsoft.Insights/autoscalesettings resource, add the following JSON to your template.

{
  "type": "Microsoft.Insights/autoscalesettings",
  "apiVersion": "2021-05-01-preview",
  "name": "string",
  "location": "string",
  "tags": {
    "tagName1": "tagValue1",
    "tagName2": "tagValue2"
  },
  "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

autoscalesettings

Name Description Value
type The resource type 'Microsoft.Insights/autoscalesettings'
apiVersion The resource api version '2021-05-01-preview'
name The resource name string (required)

Character limit: 1-260

Valid characters:
Can't use:
:<>+/&%\?| or control characters

Can't end with space or period.
location Resource location string (required)
tags 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. Dictionary of tag names and values. See Tags in templates
properties The autoscale setting of the resource. AutoscaleSetting (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)

Constraints:
Max length = 20
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

AutoscaleNotification

Name Description Value
email 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[]

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

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
{customized property} string

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)

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)

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)

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, Türkiye 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

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, Türkiye 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)

ScaleRule

Name Description Value
metricTrigger the trigger that results in a scaling action. MetricTrigger (required)
scaleAction the parameters for the scaling action. ScaleAction (required)

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)

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)

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

Quickstart templates

The following quickstart templates deploy this resource type.

Template Description
Deploy Darktrace Autoscaling vSensors

Deploy to Azure
This template allows you to deploy an automatically autoscaling deployment of Darktrace vSensors
Deploy Drupal with VM Scale Set, Azure Files and Mysql

Deploy to Azure
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
Kentico Xperience

Deploy to Azure
This template facilitates the deployment of resources required to host Kentico Xperience environments in Microsoft Azure.
Autoscale LANSA Windows VM ScaleSet with Azure SQL Database

Deploy to Azure
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 VM Scale Set with Python Bottle server & AutoScale

Deploy to Azure
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
Scalable Umbraco CMS Web App

Deploy to Azure
This template provides a easy way to deploy umbraco CMS web app on Azure App Service Web Apps.
Simple Umbraco CMS Web App

Deploy to Azure
This template provides a easy way to deploy umbraco CMS web app on Azure App Service Web Apps.
Enterprise Governance-AppService, SQL DB, AD, OMS, Runbooks

Deploy to Azure
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.
Deploy an Autoscale Setting for Virtual Machine ScaleSet

Deploy to Azure
This template allows you to deploy an autoscale policy for Virtual Machine ScaleSet resource.
Deploy an Autoscale Setting for App Service Plan

Deploy to Azure
This template allows you to deploy an autoscale policy for Azure AppService Plan resource.
Deploy Windows VMSS configure windows featurtes SSL DSC

Deploy to Azure
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
VM Scale Set with autoscale running an IIS WebApp

Deploy to Azure
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.
Deploy a VM Scale Set with a Linux custom image

Deploy to Azure
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.
Manually change the number of VMs in a Scale Set

Deploy to Azure
This template allows you to manually change the number of VMs in a Scale Set.
Deploy a VM Scale Set with Linux VMs and Auto Scale

Deploy to Azure
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

Deploy to Azure
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

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@2021-05-01-preview"
  name = "string"
  location = "string"
  parent_id = "string"
  tags = {
    tagName1 = "tagValue1"
    tagName2 = "tagValue2"
  }
  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

autoscalesettings

Name Description Value
type The resource type "Microsoft.Insights/autoscalesettings@2021-05-01-preview"
name The resource name string (required)

Character limit: 1-260

Valid characters:
Can't use:
:<>+/&%\?| or control characters

Can't end with space or period.
location Resource location string (required)
parent_id To deploy to a resource group, use the ID of that resource group. string (required)
tags 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. Dictionary of tag names and values.
properties The autoscale setting of the resource. AutoscaleSetting (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)

Constraints:
Max length = 20
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

AutoscaleNotification

Name Description Value
email 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[]

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

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
{customized property} string

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)

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)

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)

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, Türkiye 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

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, Türkiye 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)

ScaleRule

Name Description Value
metricTrigger the trigger that results in a scaling action. MetricTrigger (required)
scaleAction the parameters for the scaling action. ScaleAction (required)

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)

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)

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