Autoscale Settings - Get

Gets an autoscale setting

GET https://management.azure.com/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/autoscalesettings/{autoscaleSettingName}?api-version=2022-10-01

URI Parameters

Name In Required Type Description
autoscaleSettingName
path True

string

The autoscale setting name.

resourceGroupName
path True

string

The name of the resource group. The name is case insensitive.

subscriptionId
path True

string

The ID of the target subscription.

api-version
query True

string

The API version to use for this operation.

Responses

Name Type Description
200 OK

AutoscaleSettingResource

Successful request to get one autoscale setting

Other Status Codes

AutoscaleErrorResponse

Error response describing why the operation failed.

Security

azure_auth

Azure Active Directory OAuth2 Flow

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation impersonate your user account

Examples

Get an autoscale setting

Sample request

GET https://management.azure.com/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourcegroups/TestingMetricsScaleSet/providers/Microsoft.Insights/autoscalesettings/MySetting?api-version=2022-10-01

Sample response

{
  "id": "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/microsoft.insights/autoscalesettings/MySetting",
  "name": "MySetting",
  "type": "Microsoft.Insights/autoscaleSettings",
  "location": "West US",
  "tags": {
    "key1": "value1"
  },
  "properties": {
    "profiles": [
      {
        "name": "adios",
        "capacity": {
          "minimum": "1",
          "maximum": "10",
          "default": "1"
        },
        "rules": [
          {
            "metricTrigger": {
              "metricName": "Percentage CPU",
              "metricResourceUri": "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc",
              "timeGrain": "PT1M",
              "statistic": "Average",
              "timeWindow": "PT5M",
              "timeAggregation": "Average",
              "operator": "GreaterThan",
              "threshold": 10,
              "dividePerInstance": false
            },
            "scaleAction": {
              "direction": "Increase",
              "type": "ChangeCount",
              "value": "1",
              "cooldown": "PT5M"
            }
          },
          {
            "metricTrigger": {
              "metricName": "Percentage CPU",
              "metricResourceUri": "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc",
              "timeGrain": "PT2M",
              "statistic": "Average",
              "timeWindow": "PT5M",
              "timeAggregation": "Average",
              "operator": "GreaterThan",
              "threshold": 15,
              "dividePerInstance": false
            },
            "scaleAction": {
              "direction": "Decrease",
              "type": "ChangeCount",
              "value": "2",
              "cooldown": "PT6M"
            }
          }
        ],
        "fixedDate": {
          "timeZone": "UTC",
          "start": "2015-03-05T14:00:00Z",
          "end": "2015-03-05T14:30:00Z"
        }
      },
      {
        "name": "saludos",
        "capacity": {
          "minimum": "1",
          "maximum": "10",
          "default": "1"
        },
        "rules": [
          {
            "metricTrigger": {
              "metricName": "Percentage CPU",
              "metricResourceUri": "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc",
              "timeGrain": "PT1M",
              "statistic": "Average",
              "timeWindow": "PT5M",
              "timeAggregation": "Average",
              "operator": "GreaterThan",
              "threshold": 10,
              "dividePerInstance": false
            },
            "scaleAction": {
              "direction": "Increase",
              "type": "ChangeCount",
              "value": "1",
              "cooldown": "PT5M"
            }
          },
          {
            "metricTrigger": {
              "metricName": "Percentage CPU",
              "metricResourceUri": "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc",
              "timeGrain": "PT2M",
              "statistic": "Average",
              "timeWindow": "PT5M",
              "timeAggregation": "Average",
              "operator": "GreaterThan",
              "threshold": 15,
              "dividePerInstance": false
            },
            "scaleAction": {
              "direction": "Decrease",
              "type": "ChangeCount",
              "value": "2",
              "cooldown": "PT6M"
            }
          }
        ],
        "recurrence": {
          "frequency": "Week",
          "schedule": {
            "timeZone": "UTC",
            "days": [
              "1"
            ],
            "hours": [
              5
            ],
            "minutes": [
              15
            ]
          }
        }
      }
    ],
    "enabled": true,
    "predictiveAutoscalePolicy": {
      "scaleMode": "Enabled"
    },
    "name": "MySetting",
    "targetResourceUri": "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc",
    "notifications": [
      {
        "operation": "Scale",
        "email": {
          "sendToSubscriptionAdministrator": true,
          "sendToSubscriptionCoAdministrators": true,
          "customEmails": [
            "gu@ms.com",
            "ge@ns.net"
          ]
        },
        "webhooks": [
          {
            "serviceUri": "http://myservice.com",
            "properties": {}
          }
        ]
      }
    ]
  }
}

Definitions

Name Description
AutoscaleErrorResponse

Describes the format of Error response.

AutoscaleNotification

Autoscale notification.

AutoscaleProfile

Autoscale profile.

AutoscaleSettingResource

The autoscale setting resource.

ComparisonOperationType

the operator that is used to compare the metric data and the threshold.

createdByType

The type of identity that created the resource.

EmailNotification

Email notification of an autoscale event.

Error

The error object.

MetricStatisticType

the metric statistic type. How the metrics from multiple instances are combined.

MetricTrigger

The trigger that results in a scaling action.

OperationType

the operation associated with the notification and its value must be "scale"

PredictiveAutoscalePolicy

The parameters for enabling predictive autoscale.

PredictiveAutoscalePolicyScaleMode

the predictive autoscale mode

Recurrence

The repeating times at which this profile begins. This element is not used if the FixedDate element is used.

RecurrenceFrequency

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.

RecurrentSchedule

The scheduling constraints for when the profile begins.

ScaleAction

The parameters for the scaling action.

ScaleCapacity

The number of instances that can be used during this profile.

ScaleDirection

the scale direction. Whether the scaling action increases or decreases the number of instances.

ScaleRule

A rule that provide the triggers and parameters for the scaling action.

ScaleRuleMetricDimension

Specifies an auto scale rule metric dimension.

ScaleRuleMetricDimensionOperationType

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

ScaleType

the type of action that should occur when the scale rule fires.

systemData

Metadata pertaining to creation and last modification of the resource.

TimeAggregationType

time aggregation type. How the data that is collected should be combined over time. The default value is Average.

TimeWindow

A specific date-time for the profile.

WebhookNotification

Webhook notification of an autoscale event.

AutoscaleErrorResponse

Describes the format of Error response.

Name Type Description
error

Error

The error object.

systemData

systemData

The system metadata related to the response.

AutoscaleNotification

Autoscale notification.

Name Type Description
email

EmailNotification

the email notification.

operation

OperationType

the operation associated with the notification and its value must be "scale"

webhooks

WebhookNotification[]

the collection of webhook notifications.

AutoscaleProfile

Autoscale profile.

Name Type Description
capacity

ScaleCapacity

the number of instances that can be used during this profile.

fixedDate

TimeWindow

the specific date-time for the profile. This element is not used if the Recurrence element is used.

name

string

the name of the profile.

recurrence

Recurrence

the repeating times at which this profile begins. This element is not used if the FixedDate element is used.

rules

ScaleRule[]

the collection of rules that provide the triggers and parameters for the scaling action. A maximum of 10 rules can be specified.

AutoscaleSettingResource

The autoscale setting resource.

Name Type Default value Description
id

string

Azure resource Id

location

string

Resource location

name

string

Azure resource name

properties.enabled

boolean

False

the enabled flag. Specifies whether automatic scaling is enabled for the resource. The default value is 'false'.

properties.name

string

the name of the autoscale setting.

properties.notifications

AutoscaleNotification[]

the collection of notifications.

properties.predictiveAutoscalePolicy

PredictiveAutoscalePolicy

the predictive autoscale policy mode.

properties.profiles

AutoscaleProfile[]

the collection of automatic scaling profiles that specify different scaling parameters for different time periods. A maximum of 20 profiles can be specified.

properties.targetResourceLocation

string

the location of the resource that the autoscale setting should be added to.

properties.targetResourceUri

string

the resource identifier of the resource that the autoscale setting should be added to.

systemData

systemData

The system metadata related to the response.

tags

object

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.

type

string

Azure resource type

ComparisonOperationType

the operator that is used to compare the metric data and the threshold.

Name Type Description
Equals

string

GreaterThan

string

GreaterThanOrEqual

string

LessThan

string

LessThanOrEqual

string

NotEquals

string

createdByType

The type of identity that created the resource.

Name Type Description
Application

string

Key

string

ManagedIdentity

string

User

string

EmailNotification

Email notification of an autoscale event.

Name Type Default value Description
customEmails

string[]

the custom e-mails list. This value can be null or empty, in which case this attribute will be ignored.

sendToSubscriptionAdministrator

boolean

False

a value indicating whether to send email to subscription administrator.

sendToSubscriptionCoAdministrators

boolean

False

a value indicating whether to send email to subscription co-administrators.

Error

The error object.

Name Type Description
code

string

One of a server-defined set of error codes.

details

string

A human-readable representation of the error's details.

message

string

A human-readable representation of the error.

target

string

The target of the particular error.

MetricStatisticType

the metric statistic type. How the metrics from multiple instances are combined.

Name Type Description
Average

string

Count

string

Max

string

Min

string

Sum

string

MetricTrigger

The trigger that results in a scaling action.

Name Type Description
dimensions

ScaleRuleMetricDimension[]

List of dimension conditions. For example: [{"DimensionName":"AppName","Operator":"Equals","Values":["App1"]},{"DimensionName":"Deployment","Operator":"Equals","Values":["default"]}].

dividePerInstance

boolean

a value indicating whether metric should divide per instance.

metricName

string

the name of the metric that defines what the rule monitors.

metricNamespace

string

the namespace of the metric that defines what the rule monitors.

metricResourceLocation

string

the location of the resource the rule monitors.

metricResourceUri

string

the resource identifier of the resource the rule monitors.

operator

ComparisonOperationType

the operator that is used to compare the metric data and the threshold.

statistic

MetricStatisticType

the metric statistic type. How the metrics from multiple instances are combined.

threshold

number

the threshold of the metric that triggers the scale action.

timeAggregation

TimeAggregationType

time aggregation type. How the data that is collected should be combined over time. The default value is Average.

timeGrain

string

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.

timeWindow

string

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.

OperationType

the operation associated with the notification and its value must be "scale"

Name Type Description
Scale

string

PredictiveAutoscalePolicy

The parameters for enabling predictive autoscale.

Name Type Description
scaleLookAheadTime

string

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.

scaleMode

PredictiveAutoscalePolicyScaleMode

the predictive autoscale mode

PredictiveAutoscalePolicyScaleMode

the predictive autoscale mode

Name Type Description
Disabled

string

Enabled

string

ForecastOnly

string

Recurrence

The repeating times at which this profile begins. This element is not used if the FixedDate element is used.

Name Type Description
frequency

RecurrenceFrequency

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.

schedule

RecurrentSchedule

the scheduling constraints for when the profile begins.

RecurrenceFrequency

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.

Name Type Description
Day

string

Hour

string

Minute

string

Month

string

None

string

Second

string

Week

string

Year

string

RecurrentSchedule

The scheduling constraints for when the profile begins.

Name Type Description
days

string[]

the collection of days that the profile takes effect on. Possible values are Sunday through Saturday.

hours

integer[]

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).

minutes

integer[]

A collection of minutes at which the profile takes effect at.

timeZone

string

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

ScaleAction

The parameters for the scaling action.

Name Type Default value Description
cooldown

string

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.

direction

ScaleDirection

the scale direction. Whether the scaling action increases or decreases the number of instances.

type

ScaleType

the type of action that should occur when the scale rule fires.

value

string

1

the number of instances that are involved in the scaling action. This value must be 1 or greater. The default value is 1.

ScaleCapacity

The number of instances that can be used during this profile.

Name Type Description
default

string

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.

maximum

string

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.

minimum

string

the minimum number of instances for the resource.

ScaleDirection

the scale direction. Whether the scaling action increases or decreases the number of instances.

Name Type Description
Decrease

string

Increase

string

None

string

ScaleRule

A rule that provide the triggers and parameters for the scaling action.

Name Type Description
metricTrigger

MetricTrigger

the trigger that results in a scaling action.

scaleAction

ScaleAction

the parameters for the scaling action.

ScaleRuleMetricDimension

Specifies an auto scale rule metric dimension.

Name Type Description
DimensionName

string

Name of the dimension.

Operator

ScaleRuleMetricDimensionOperationType

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

Values

string[]

list of dimension values. For example: ["App1","App2"].

ScaleRuleMetricDimensionOperationType

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

Name Type Description
Equals

string

NotEquals

string

ScaleType

the type of action that should occur when the scale rule fires.

Name Type Description
ChangeCount

string

ExactCount

string

PercentChangeCount

string

ServiceAllowedNextValue

string

systemData

Metadata pertaining to creation and last modification of the resource.

Name Type Description
createdAt

string

The timestamp of resource creation (UTC).

createdBy

string

The identity that created the resource.

createdByType

createdByType

The type of identity that created the resource.

lastModifiedAt

string

The timestamp of resource last modification (UTC)

lastModifiedBy

string

The identity that last modified the resource.

lastModifiedByType

createdByType

The type of identity that last modified the resource.

TimeAggregationType

time aggregation type. How the data that is collected should be combined over time. The default value is Average.

Name Type Description
Average

string

Count

string

Last

string

Maximum

string

Minimum

string

Total

string

TimeWindow

A specific date-time for the profile.

Name Type Description
end

string

the end time for the profile in ISO 8601 format.

start

string

the start time for the profile in ISO 8601 format.

timeZone

string

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

WebhookNotification

Webhook notification of an autoscale event.

Name Type Description
properties

object

a property bag of settings. This value can be empty.

serviceUri

string

the service address to receive the notification.