你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Autoscale Settings - Create Or Update

创建或更新自动缩放设置。

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

URI 参数

名称 必需 类型 说明
autoscaleSettingName
path True

string

自动缩放设置的名称。

resourceGroupName
path True

string

资源组的名称。 此名称不区分大小写。

subscriptionId
path True

string

目标订阅的 ID。

api-version
query True

string

要用于此操作的 API 版本。

请求正文

名称 必需 类型 说明
location True

string

资源位置

properties.profiles True

AutoscaleProfile[]

为不同时间段指定不同缩放参数的自动缩放配置文件的集合。 最多可指定 20 个配置文件。

properties.enabled

boolean

已启用的标志。 指定是否为资源启用自动缩放。 默认值为“false”。

properties.name

string

自动缩放设置的名称。

properties.notifications

AutoscaleNotification[]

通知的集合。

properties.predictiveAutoscalePolicy

PredictiveAutoscalePolicy

预测性自动缩放策略模式。

properties.targetResourceLocation

string

应将自动缩放设置添加到的资源的位置。

properties.targetResourceUri

string

自动缩放设置应添加到的资源的资源标识符。

tags

object

获取或设置描述资源的键值对的列表。 在查看此资源和为此资源分组(跨资源组)时,可以使用这些标记。 最多可以为资源提供 15 个标记。 每个标记必须具有长度不超过 128 个字符的键和长度不超过 256 个字符的值。

响应

名称 类型 说明
200 OK

AutoscaleSettingResource

成功请求创建或更新自动缩放设置

201 Created

AutoscaleSettingResource

已创建自动缩放设置

Other Status Codes

AutoscaleErrorResponse

描述操作失败原因的错误响应。

安全性

azure_auth

Azure Active Directory OAuth2 流

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

Scopes

名称 说明
user_impersonation 模拟用户帐户

示例

Create or update an autoscale setting

Sample Request

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

{
  "location": "West US",
  "tags": {
    "key1": "value1",
    "key2": "value2"
  },
  "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"
    },
    "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": {}
          }
        ]
      }
    ]
  }
}

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",
    "key2": "value2"
  },
  "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,
    "name": "MySetting",
    "targetResourceUri": "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc",
    "predictiveAutoscalePolicy": {
      "scaleMode": "Enabled",
      "scaleLookAheadTime": null
    },
    "notifications": [
      {
        "operation": "Scale",
        "email": {
          "sendToSubscriptionAdministrator": true,
          "sendToSubscriptionCoAdministrators": true,
          "customEmails": [
            "gu@ms.com",
            "ge@ns.net"
          ]
        },
        "webhooks": [
          {
            "serviceUri": "http://myservice.com",
            "properties": {}
          }
        ]
      }
    ]
  }
}
{
  "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",
    "key2": "value2"
  },
  "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,
    "name": "MySetting",
    "targetResourceUri": "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc",
    "predictiveAutoscalePolicy": {
      "scaleMode": "Enabled",
      "scaleLookAheadTime": null
    },
    "notifications": [
      {
        "operation": "Scale",
        "email": {
          "sendToSubscriptionAdministrator": true,
          "sendToSubscriptionCoAdministrators": true,
          "customEmails": [
            "gu@ms.com",
            "ge@ns.net"
          ]
        },
        "webhooks": [
          {
            "serviceUri": "http://myservice.com",
            "properties": {}
          }
        ]
      }
    ]
  }
}

定义

名称 说明
AutoscaleErrorResponse

描述错误响应的格式。

AutoscaleNotification

自动缩放通知。

AutoscaleProfile

自动缩放配置文件。

AutoscaleSettingResource

自动缩放设置资源。

ComparisonOperationType

用于比较指标数据和阈值的运算符。

createdByType

创建资源的标识类型。

EmailNotification

Email自动缩放事件的通知。

Error

错误对象。

MetricStatisticType

指标统计信息类型。 来自多个实例的指标进行组合的方式。

MetricTrigger

导致缩放操作的触发器。

OperationType

与通知关联的操作及其值必须为“scale”

PredictiveAutoscalePolicy

用于启用预测性自动缩放的参数。

PredictiveAutoscalePolicyScaleMode

预测性自动缩放模式

Recurrence

此配置文件开始的重复时间。 使用 FixedDate 元素时,不使用此元素。

RecurrenceFrequency

重复频率。 计划配置文件应生效的频率。 此值必须是 Week,意味着每周会有相同的一组配置文件。 例如,若要设置每日计划,请将 计划 设置为一周中的每一天。 frequency 属性指定每周重复计划。

RecurrentSchedule

配置文件开始时的计划约束。

ScaleAction

缩放操作的参数。

ScaleCapacity

可以在此配置文件期间使用的实例数。

ScaleDirection

缩放方向。 缩放操作是增加还是减少实例数。

ScaleRule

为缩放操作提供触发器和参数的规则。

ScaleRuleMetricDimension

指定自动缩放规则指标维度。

ScaleRuleMetricDimensionOperationType

维度运算符。 仅支持“Equals”和“NotEquals”。 “等于”等于任何值。 “NotEquals”不等于所有值

ScaleType

缩放规则触发时应发生的操作类型。

systemData

与资源的创建和上次修改相关的元数据。

TimeAggregationType

时间聚合类型。 随着时间推移,收集的数据应如何组合。 默认值为 Average。

TimeWindow

配置文件的特定日期时间。

WebhookNotification

自动缩放事件的 Webhook 通知。

AutoscaleErrorResponse

描述错误响应的格式。

名称 类型 说明
error

Error

错误对象。

systemData

systemData

与响应相关的系统元数据。

AutoscaleNotification

自动缩放通知。

名称 类型 说明
email

EmailNotification

电子邮件通知。

operation

OperationType

与通知关联的操作及其值必须为“scale”

webhooks

WebhookNotification[]

Webhook 通知的集合。

AutoscaleProfile

自动缩放配置文件。

名称 类型 说明
capacity

ScaleCapacity

在此配置文件期间可以使用的实例数。

fixedDate

TimeWindow

配置文件的特定日期时间。 使用 Recurrence 元素时,不使用此元素。

name

string

配置文件的名称。

recurrence

Recurrence

此配置文件开始的重复时间。 使用 FixedDate 元素时,不使用此元素。

rules

ScaleRule[]

为缩放操作提供触发器和参数的规则集合。 最多可指定 10 个规则。

AutoscaleSettingResource

自动缩放设置资源。

名称 类型 默认值 说明
id

string

Azure 资源 ID

location

string

资源位置

name

string

Azure 资源名称

properties.enabled

boolean

False

已启用的标志。 指定是否为资源启用自动缩放。 默认值为“false”。

properties.name

string

自动缩放设置的名称。

properties.notifications

AutoscaleNotification[]

通知的集合。

properties.predictiveAutoscalePolicy

PredictiveAutoscalePolicy

预测性自动缩放策略模式。

properties.profiles

AutoscaleProfile[]

为不同时间段指定不同缩放参数的自动缩放配置文件的集合。 最多可指定 20 个配置文件。

properties.targetResourceLocation

string

应将自动缩放设置添加到的资源的位置。

properties.targetResourceUri

string

自动缩放设置应添加到的资源的资源标识符。

systemData

systemData

与响应相关的系统元数据。

tags

object

获取或设置描述资源的键值对的列表。 在查看此资源和为此资源分组(跨资源组)时,可以使用这些标记。 最多可以为资源提供 15 个标记。 每个标记必须具有长度不超过 128 个字符的键和长度不超过 256 个字符的值。

type

string

Azure 资源类型

ComparisonOperationType

用于比较指标数据和阈值的运算符。

名称 类型 说明
Equals

string

GreaterThan

string

GreaterThanOrEqual

string

LessThan

string

LessThanOrEqual

string

NotEquals

string

createdByType

创建资源的标识类型。

名称 类型 说明
Application

string

Key

string

ManagedIdentity

string

User

string

EmailNotification

Email自动缩放事件的通知。

名称 类型 默认值 说明
customEmails

string[]

自定义电子邮件列表。 此值可以为 null 或空,在这种情况下,将忽略此属性。

sendToSubscriptionAdministrator

boolean

False

一个值,该值指示是否向订阅管理员发送电子邮件。

sendToSubscriptionCoAdministrators

boolean

False

一个 值,该值指示是否向订阅共同管理员发送电子邮件。

Error

错误对象。

名称 类型 说明
code

string

服务器定义的一组错误代码中的一个。

details

string

错误详细信息的可读表示形式。

message

string

错误的用户可读表示形式。

target

string

特定错误的目标。

MetricStatisticType

指标统计信息类型。 来自多个实例的指标进行组合的方式。

名称 类型 说明
Average

string

Count

string

Max

string

Min

string

Sum

string

MetricTrigger

导致缩放操作的触发器。

名称 类型 说明
dimensions

ScaleRuleMetricDimension[]

维度条件列表。 例如:[{“DimensionName”:“AppName”,“Operator”:“Equals”,“Values”[“App1”]},{“DimensionName”:“Deployment”,“Operator”:“Equals”,“Values”:[“default”]}]。

dividePerInstance

boolean

一个 值,该值指示指标是否应按实例划分。

metricName

string

定义规则监视的指标的名称。

metricNamespace

string

定义规则监视的指标的命名空间。

metricResourceLocation

string

规则监视的资源的位置。

metricResourceUri

string

规则监视的资源的资源标识符。

operator

ComparisonOperationType

用于比较指标数据和阈值的运算符。

statistic

MetricStatisticType

指标统计信息类型。 来自多个实例的指标进行组合的方式。

threshold

number

触发缩放操作的指标的阈值。

timeAggregation

TimeAggregationType

时间聚合类型。 随着时间推移,收集的数据应如何组合。 默认值为 Average。

timeGrain

string

规则监视的指标的粒度。 必须是从指标的指标定义返回的预定义值之一。 必须介于 12 小时和 1 分钟之间。

timeWindow

string

收集实例数据的时间范围。 此值必须大于指标集合中的延迟,可能会因资源而异。 必须介于 12 小时和 5 分钟之间。

OperationType

与通知关联的操作及其值必须为“scale”

名称 类型 说明
Scale

string

PredictiveAutoscalePolicy

用于启用预测性自动缩放的参数。

名称 类型 说明
scaleLookAheadTime

string

指定提前启动实例的时间量。 它必须介于 1 分钟到 60 分钟之间,采用 ISO 8601 格式。

scaleMode

PredictiveAutoscalePolicyScaleMode

预测性自动缩放模式

PredictiveAutoscalePolicyScaleMode

预测性自动缩放模式

名称 类型 说明
Disabled

string

Enabled

string

ForecastOnly

string

Recurrence

此配置文件开始的重复时间。 使用 FixedDate 元素时,不使用此元素。

名称 类型 说明
frequency

RecurrenceFrequency

重复频率。 计划配置文件应生效的频率。 此值必须是 Week,意味着每周会有相同的一组配置文件。 例如,若要设置每日计划,请将 计划 设置为一周中的每一天。 frequency 属性指定每周重复计划。

schedule

RecurrentSchedule

配置文件开始时间的计划约束。

RecurrenceFrequency

重复频率。 计划配置文件应生效的频率。 此值必须是 Week,意味着每周会有相同的一组配置文件。 例如,若要设置每日计划,请将 计划 设置为一周中的每一天。 frequency 属性指定每周重复计划。

名称 类型 说明
Day

string

Hour

string

Minute

string

Month

string

None

string

Second

string

Week

string

Year

string

RecurrentSchedule

配置文件开始时的计划约束。

名称 类型 说明
days

string[]

配置文件生效的天数的集合。 可能的值为 Sunday 到 Saturday。

hours

integer[]

配置文件生效的小时集合。 ) 不支持在 24 小时制 (AM/PM 时间支持的值为 0 到 23。

minutes

integer[]

配置文件生效的分钟的集合。

timeZone

string

配置文件小时数的时区。 有效时区的一些示例包括:日期线标准时间、UTC-11、夏威夷标准时间、阿拉斯加标准时间、太平洋标准时间 (墨西哥) 、太平洋标准时间、美国山区标准时间、山区标准时间 (墨西哥) 、山区标准时间、中美洲标准时间、中部标准时间、中部标准时间 (墨西哥) 、加拿大中部标准时间、 SA 太平洋标准时间、东部标准时间、美国东部标准时间、委内瑞拉标准时间、巴拉圭标准时间、大西洋标准时间、巴西中部标准时间、SA 西部标准时间、太平洋 SA 标准时间、纽芬兰标准时间、E. 南美洲标准时间、阿根廷标准时间、SA 东部标准时间、格陵兰标准时间、蒙得维的亚标准时间、巴伊亚标准时间、 UTC-02、Mid-Atlantic 标准时间、亚速尔群岛标准时间、佛得角标准时间、摩洛哥标准时间、UTC、GMT 标准时间、格林威治标准时间、W. 欧洲标准时间、中欧标准时间、浪漫标准时间、中欧标准时间、中部非洲标准时间、纳米比亚标准时间、约旦标准时间、GTB 标准时间、中东标准时间、埃及标准时间、 叙利亚标准时间、欧洲标准时间、南非标准时间、FLE 标准时间、土耳其标准时间、以色列标准时间、加里宁格勒标准时间、利比亚标准时间、阿拉伯标准时间、阿拉伯标准时间、白俄罗斯标准时间、俄罗斯标准时间、E. 非洲标准时间、伊朗标准时间、阿拉伯标准时间、阿塞拜疆标准时间、俄罗斯时区 3、毛里求斯标准时间、 格鲁吉亚标准时间、高加索标准时间、阿富汗标准时间、西亚标准时间、叶卡捷琳堡标准时间、巴基斯坦标准时间、印度标准时间、斯里兰卡标准时间、尼泊尔标准时间、中亚标准时间、孟加拉国标准时间、N.中亚标准时间、缅甸标准时间、东南亚标准时间、北欧标准时间、中国标准时间、东北亚东部标准时间、 新加坡标准时间、W.澳大利亚标准时间、台北标准时间、乌兰巴托标准时间、东京标准时间、韩国标准时间、雅库茨克标准时间、Cen。 澳大利亚标准时间、澳大利亚中部标准时间、E.澳大利亚标准时间、澳大利亚东部标准时间、西太平洋标准时间、塔斯马尼亚标准时间、马加丹标准时间、符拉迪沃斯托克标准时间、俄罗斯时区 10、中部太平洋标准时间、俄罗斯时区 11、新西兰标准时间、UTC+12、斐济标准时间、堪察加标准时间、汤加标准时间、萨摩亚标准时间、 Line Islands 标准时间

ScaleAction

缩放操作的参数。

名称 类型 默认值 说明
cooldown

string

自此操作发生前的最后一次缩放操作后等待的时间量。 它必须介于 1 周到 1 分钟之间,采用 ISO 8601 格式。

direction

ScaleDirection

缩放方向。 缩放操作是增加还是减少实例数。

type

ScaleType

缩放规则触发时应发生的操作类型。

value

string

1

缩放操作中涉及的实例数。 此值必须大于或等于 1。 默认值为 1。

ScaleCapacity

可以在此配置文件期间使用的实例数。

名称 类型 说明
default

string

如果指标不可用于评估,则将设置的实例数。 仅当当前实例计数低于默认值时,才使用默认值。

maximum

string

资源的最大实例数。 实际的最大实例数受订阅中可用核心数的限制。

minimum

string

资源的最小实例数。

ScaleDirection

缩放方向。 缩放操作是增加还是减少实例数。

名称 类型 说明
Decrease

string

Increase

string

None

string

ScaleRule

为缩放操作提供触发器和参数的规则。

名称 类型 说明
metricTrigger

MetricTrigger

导致缩放操作的触发器。

scaleAction

ScaleAction

缩放操作的参数。

ScaleRuleMetricDimension

指定自动缩放规则指标维度。

名称 类型 说明
DimensionName

string

维度的名称。

Operator

ScaleRuleMetricDimensionOperationType

维度运算符。 仅支持“Equals”和“NotEquals”。 “等于”等于任何值。 “NotEquals”不等于所有值

Values

string[]

维度值的列表。 例如:[“App1”,“App2”]。

ScaleRuleMetricDimensionOperationType

维度运算符。 仅支持“Equals”和“NotEquals”。 “等于”等于任何值。 “NotEquals”不等于所有值

名称 类型 说明
Equals

string

NotEquals

string

ScaleType

缩放规则触发时应发生的操作类型。

名称 类型 说明
ChangeCount

string

ExactCount

string

PercentChangeCount

string

ServiceAllowedNextValue

string

systemData

与资源的创建和上次修改相关的元数据。

名称 类型 说明
createdAt

string

资源创建时间戳 (UTC) 。

createdBy

string

创建资源的标识。

createdByType

createdByType

创建资源的标识类型。

lastModifiedAt

string

资源上次修改的时间戳 (UTC)

lastModifiedBy

string

上次修改资源的标识。

lastModifiedByType

createdByType

上次修改资源的标识类型。

TimeAggregationType

时间聚合类型。 随着时间推移,收集的数据应如何组合。 默认值为 Average。

名称 类型 说明
Average

string

Count

string

Last

string

Maximum

string

Minimum

string

Total

string

TimeWindow

配置文件的特定日期时间。

名称 类型 说明
end

string

ISO 8601 格式的配置文件的结束时间。

start

string

ISO 8601 格式的配置文件的开始时间。

timeZone

string

配置文件的开始和结束时间的时区。 有效时区的一些示例包括:日期线标准时间、UTC-11、夏威夷标准时间、阿拉斯加标准时间、太平洋标准时间 (墨西哥) 、太平洋标准时间、美国山区标准时间、山区标准时间 (墨西哥) 、山区标准时间、中美洲标准时间、中部标准时间、中部标准时间 (墨西哥) 、加拿大中部标准时间、 SA 太平洋标准时间、东部标准时间、美国东部标准时间、委内瑞拉标准时间、巴拉圭标准时间、大西洋标准时间、巴西中部标准时间、SA 西部标准时间、太平洋 SA 标准时间、纽芬兰标准时间、E. 南美洲标准时间、阿根廷标准时间、SA 东部标准时间、格陵兰标准时间、蒙得维的亚标准时间、巴伊亚标准时间、 UTC-02、Mid-Atlantic 标准时间、亚速尔群岛标准时间、佛得角标准时间、摩洛哥标准时间、UTC、GMT 标准时间、格林威治标准时间、W. 欧洲标准时间、中欧标准时间、浪漫标准时间、中欧标准时间、中部非洲标准时间、纳米比亚标准时间、约旦标准时间、GTB 标准时间、中东标准时间、埃及标准时间、 叙利亚标准时间、欧洲标准时间、南非标准时间、FLE 标准时间、土耳其标准时间、以色列标准时间、加里宁格勒标准时间、利比亚标准时间、阿拉伯标准时间、阿拉伯标准时间、白俄罗斯标准时间、俄罗斯标准时间、E. 非洲标准时间、伊朗标准时间、阿拉伯标准时间、阿塞拜疆标准时间、俄罗斯时区 3、毛里求斯标准时间、 格鲁吉亚标准时间、高加索标准时间、阿富汗标准时间、西亚标准时间、叶卡捷琳堡标准时间、巴基斯坦标准时间、印度标准时间、斯里兰卡标准时间、尼泊尔标准时间、中亚标准时间、孟加拉国标准时间、N.中亚标准时间、缅甸标准时间、东南亚标准时间、北欧标准时间、中国标准时间、东北亚东部标准时间、 新加坡标准时间、W.澳大利亚标准时间、台北标准时间、乌兰巴托标准时间、东京标准时间、韩国标准时间、雅库茨克标准时间、Cen。 澳大利亚标准时间、澳大利亚中部标准时间、E.澳大利亚标准时间、澳大利亚东部标准时间、西太平洋标准时间、塔斯马尼亚标准时间、马加丹标准时间、符拉迪沃斯托克标准时间、俄罗斯时区 10、中部太平洋标准时间、俄罗斯时区 11、新西兰标准时间、UTC+12、斐济标准时间、堪察加标准时间、汤加标准时间、萨摩亚标准时间、 Line Islands 标准时间

WebhookNotification

自动缩放事件的 Webhook 通知。

名称 类型 说明
properties

object

设置的属性包。 此值可以为空。

serviceUri

string

要接收通知的服务地址。