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 参数
名称 | 在 | 必需 | 类型 | 说明 |
---|---|---|---|---|
autoscale
|
path | True |
string |
自动缩放设置名称。 |
resource
|
path | True |
string minLength: 1maxLength: 90 |
资源组的名称。 名称不区分大小写。 |
subscription
|
path | True |
string minLength: 1 |
目标订阅的 ID。 |
api-version
|
query | True |
string minLength: 1 |
用于此作的 API 版本。 |
请求正文
名称 | 必需 | 类型 | 说明 |
---|---|---|---|
___location | True |
string |
资源位置 |
properties.profiles | True |
自动缩放配置文件的集合,这些配置文件指定不同时间段的不同缩放参数。 最多可以指定 20 个配置文件。 |
|
properties.enabled |
boolean |
已启用的标志。 指定是否为资源启用自动缩放。 默认值为“false”。 |
|
properties.name |
string |
自动缩放设置的名称。 |
|
properties.notifications |
通知的集合。 |
||
properties.predictiveAutoscalePolicy |
预测性自动缩放策略模式。 |
||
properties.targetResourceLocation |
string |
应将自动缩放设置添加到的资源的位置。 |
|
properties.targetResourceUri |
string |
自动缩放设置应添加到的资源的资源标识符。 |
|
tags |
object |
获取或设置描述资源的键值对的列表。 这些标记可用于查看和分组此资源(跨资源组)。 最多可为资源提供 15 个标记。 每个标记的长度不得超过 128 个字符,且长度不超过 256 个字符的值。 |
响应
名称 | 类型 | 说明 |
---|---|---|
200 OK |
成功创建或更新自动缩放设置的请求 |
|
201 Created |
已创建自动缩放设置 |
|
Other Status Codes |
描述操作失败的原因的错误响应。 |
安全性
azure_auth
Azure Active Directory OAuth2 Flow
类型:
oauth2
流向:
implicit
授权 URL:
https://login.microsoftonline.com/common/oauth2/authorize
作用域
名称 | 说明 |
---|---|
user_impersonation | 模拟用户帐户 |
示例
Create or update an autoscale setting
示例请求
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": {}
}
]
}
]
}
}
示例响应
{
"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": {}
}
]
}
]
}
}
定义
名称 | 说明 |
---|---|
Autoscale |
描述错误响应的格式。 |
Autoscale |
自动缩放通知。 |
Autoscale |
自动缩放配置文件。 |
Autoscale |
自动缩放设置资源。 |
Comparison |
用于比较指标数据和阈值的运算符。 |
created |
创建资源的标识的类型。 |
Email |
自动缩放事件的电子邮件通知。 |
Error |
错误对象。 |
Metric |
指标统计信息类型。 如何合并来自多个实例的指标。 |
Metric |
导致缩放作的触发器。 |
Operation |
与通知关联的操作及其值必须是“缩放” |
Predictive |
用于启用预测自动缩放的参数。 |
Predictive |
预测自动缩放模式 |
Recurrence |
此配置文件开始的重复时间。 如果使用 FixedDate 元素,则不使用此元素。 |
Recurrence |
重复频率。 计划配置文件的生效频率。 此值必须为 Week,这意味着每周将具有相同的配置文件集。 例如,若要设置每日计划,请将 计划 设置为每周的每一天。 frequency 属性指定计划每周重复一次。 |
Recurrent |
配置文件开始时的计划约束。 |
Scale |
缩放作的参数。 |
Scale |
此配置文件期间可以使用的实例数。 |
Scale |
刻度方向。 缩放操作是增加还是减少实例数。 |
Scale |
为缩放作提供触发器和参数的规则。 |
Scale |
指定自动缩放规则指标维度。 |
Scale |
维度运算符。 仅支持“Equals”和“NotEquals”。 “Equals”等于任何值。 “NotEquals”不等于所有值 |
Scale |
缩放规则触发时应发生的操作的类型。 |
system |
与创建和上次修改资源相关的元数据。 |
Time |
时间聚合类型。 收集的数据如何随时间推移进行组合。 默认值为 Average。 |
Time |
配置文件的特定日期时间。 |
Webhook |
自动缩放事件的 Webhook 通知。 |
AutoscaleErrorResponse
描述错误响应的格式。
名称 | 类型 | 说明 |
---|---|---|
error |
错误对象。 |
|
systemData |
与响应相关的系统元数据。 |
AutoscaleNotification
自动缩放通知。
名称 | 类型 | 说明 |
---|---|---|
电子邮件通知。 |
||
operation |
与通知关联的操作及其值必须是“缩放” |
|
webhooks |
Webhook 通知的集合。 |
AutoscaleProfile
自动缩放配置文件。
名称 | 类型 | 说明 |
---|---|---|
capacity |
此配置文件期间可以使用的实例数。 |
|
fixedDate |
配置文件的特定日期时间。 如果使用 Recurrence 元素,则不使用此元素。 |
|
name |
string |
配置文件的名称。 |
recurrence |
此配置文件开始的重复时间。 如果使用 FixedDate 元素,则不使用此元素。 |
|
rules |
为缩放操作提供触发器和参数的规则集合。 最多可以指定 10 条规则。 |
AutoscaleSettingResource
自动缩放设置资源。
名称 | 类型 | 默认值 | 说明 |
---|---|---|---|
id |
string |
Azure 资源 ID |
|
___location |
string |
资源位置 |
|
name |
string |
Azure 资源名称 |
|
properties.enabled |
boolean |
False |
已启用的标志。 指定是否为资源启用自动缩放。 默认值为“false”。 |
properties.name |
string |
自动缩放设置的名称。 |
|
properties.notifications |
通知的集合。 |
||
properties.predictiveAutoscalePolicy |
预测性自动缩放策略模式。 |
||
properties.profiles |
自动缩放配置文件的集合,这些配置文件指定不同时间段的不同缩放参数。 最多可以指定 20 个配置文件。 |
||
properties.targetResourceLocation |
string |
应将自动缩放设置添加到的资源的位置。 |
|
properties.targetResourceUri |
string |
自动缩放设置应添加到的资源的资源标识符。 |
|
systemData |
与响应相关的系统元数据。 |
||
tags |
object |
获取或设置描述资源的键值对的列表。 这些标记可用于查看和分组此资源(跨资源组)。 最多可为资源提供 15 个标记。 每个标记的长度不得超过 128 个字符,且长度不超过 256 个字符的值。 |
|
type |
string |
Azure 资源类型 |
ComparisonOperationType
用于比较指标数据和阈值的运算符。
值 | 说明 |
---|---|
Equals | |
GreaterThan | |
GreaterThanOrEqual | |
LessThan | |
LessThanOrEqual | |
NotEquals |
createdByType
创建资源的标识的类型。
值 | 说明 |
---|---|
Application | |
Key | |
ManagedIdentity | |
User |
EmailNotification
自动缩放事件的电子邮件通知。
名称 | 类型 | 默认值 | 说明 |
---|---|---|---|
customEmails |
string[] |
自定义电子邮件列表。 此值可以为 null 或空,在这种情况下,将忽略此属性。 |
|
sendToSubscriptionAdministrator |
boolean |
False |
一个值,指示是否向订阅管理员发送电子邮件。 |
sendToSubscriptionCoAdministrators |
boolean |
False |
一个值,该值指示是否向订阅共同管理员发送电子邮件。 |
Error
错误对象。
名称 | 类型 | 说明 |
---|---|---|
code |
string |
服务器定义的错误代码集之一。 |
details |
string |
错误详细信息的可读表示形式。 |
message |
string |
错误的人工可读表示形式。 |
target |
string |
特定错误的目标。 |
MetricStatisticType
指标统计信息类型。 如何合并来自多个实例的指标。
值 | 说明 |
---|---|
Average | |
Count | |
Max | |
Min | |
Sum |
MetricTrigger
导致缩放作的触发器。
名称 | 类型 | 说明 |
---|---|---|
dimensions |
维度条件列表。 例如:[{“DimensionName”:“AppName”,“Operator”:“Equals”,“Values”:[“App1”]},{“DimensionName”:“Deployment”,“Operator”:“Equals”,“Values”:[“default”]}]。 |
|
dividePerInstance |
boolean |
一个值,该值指示指标是否应按实例划分。 |
metricName |
string |
定义规则监视器的指标的名称。 |
metricNamespace |
string |
定义规则监视器的指标的命名空间。 |
metricResourceLocation |
string |
规则监视的资源的位置。 |
metricResourceUri |
string |
规则监视的资源的资源标识符。 |
operator |
用于比较指标数据和阈值的运算符。 |
|
statistic |
指标统计信息类型。 如何合并来自多个实例的指标。 |
|
threshold |
number (double) |
触发缩放操作的指标的阈值。 |
timeAggregation |
时间聚合类型。 收集的数据如何随时间推移进行组合。 默认值为 Average。 |
|
timeGrain |
string (duration) |
规则监视器的指标粒度。 必须是从指标定义的预定义值之一。 必须介于 12 小时到 1 分钟之间。 |
timeWindow |
string (duration) |
收集实例数据的时间范围。 此值必须大于指标集合中的延迟,这可能因资源到资源而异。 必须介于 12 小时到 5 分钟之间。 |
OperationType
与通知关联的操作及其值必须是“缩放”
值 | 说明 |
---|---|
Scale |
PredictiveAutoscalePolicy
用于启用预测自动缩放的参数。
名称 | 类型 | 说明 |
---|---|---|
scaleLookAheadTime |
string (duration) |
指定提前启动实例的时间量。 它必须采用 ISO 8601 格式的 1 分钟到 60 分钟。 |
scaleMode |
预测自动缩放模式 |
PredictiveAutoscalePolicyScaleMode
预测自动缩放模式
值 | 说明 |
---|---|
Disabled | |
Enabled | |
ForecastOnly |
Recurrence
此配置文件开始的重复时间。 如果使用 FixedDate 元素,则不使用此元素。
名称 | 类型 | 说明 |
---|---|---|
frequency |
重复频率。 计划配置文件的生效频率。 此值必须为 Week,这意味着每周将具有相同的配置文件集。 例如,若要设置每日计划,请将 计划 设置为每周的每一天。 frequency 属性指定计划每周重复一次。 |
|
schedule |
配置文件开始时间的计划约束。 |
RecurrenceFrequency
重复频率。 计划配置文件的生效频率。 此值必须为 Week,这意味着每周将具有相同的配置文件集。 例如,若要设置每日计划,请将 计划 设置为每周的每一天。 frequency 属性指定计划每周重复一次。
值 | 说明 |
---|---|
Day | |
Hour | |
Minute | |
Month | |
None | |
Second | |
Week | |
Year |
RecurrentSchedule
配置文件开始时的计划约束。
名称 | 类型 | 说明 |
---|---|---|
days |
string[] |
配置文件生效的天数的集合。 可能的值为星期日到星期六。 |
hours |
integer[] (int32) |
配置文件生效的小时集合。 24 小时制支持的值为 0 到 23(不支持 AM/PM 时间)。 |
minutes |
integer[] (int32) |
配置文件生效的分钟集合。 |
timeZone |
string |
配置文件小时数的时区。 有效时区的一些示例包括:日期线标准时间、UTC-11、夏威夷标准时间、阿拉斯加标准时间、太平洋标准时间(墨西哥)、太平洋标准时间、美国山标准时间、山标准时间(墨西哥)、中美洲标准时间、中部标准时间(墨西哥)、加拿大中部标准时间、SA 太平洋标准时间、东部标准时间、 美国东部标准时间、委内瑞拉标准时间、巴拉圭标准时间、大西洋标准时间、巴西中部标准时间、SA 西部标准时间、太平洋 SA 标准时间、纽芬兰标准时间、南美洲标准时间、阿根廷标准时间、SA 东部标准时间、格陵兰标准时间、蒙得维的亚标准时间、巴伊亚标准时间、UTC-02、Mid-Atlantic 标准时间、亚速尔标准时间、 开普敦标准时间、摩洛哥标准时间、UTC、GMT 标准时间、格林威治标准时间、W. 欧洲标准时间、中欧标准时间、浪漫标准时间、中欧标准时间、中非标准时间、纳米比亚标准时间、约旦标准时间、GTB 标准时间、中东标准时间、埃及标准时间、叙利亚标准时间、欧洲标准时间、欧洲标准时间、 南非标准时间、FLE 标准时间、土耳其标准时间、以色列标准时间、加里宁格勒标准时间、利比亚标准时间、阿拉伯标准时间、阿拉伯标准时间、白俄罗斯标准时间、俄罗斯标准时间、伊朗标准时间、阿拉伯标准时间、阿塞拜疆标准时间、俄罗斯时区 3、毛里求斯标准时间、格鲁吉亚标准时间、高加索标准时间、高加索标准时间、 阿富汗标准时间、西亚标准时间、西亚标准时间、Ekaterinburg 标准时间、巴基斯坦标准时间、印度标准时间、斯里兰卡标准时间、尼泊尔标准时间、中亚标准时间、孟加拉国标准时间、缅甸标准时间、SE 亚洲标准时间、北亚标准时间、中国标准时间、北欧东部标准时间、新加坡标准时间、 澳大利亚标准时间、台北标准时间、乌兰巴托标准时间、东京标准时间、韩国标准时间、雅库茨克标准时间、Cen。 澳大利亚标准时间、AUS 中部标准时间、E. 澳大利亚标准时间、澳大利亚东部标准时间、西太平洋标准时间、塔斯马尼亚标准时间、马加丹标准时间、玛加丹标准时间、弗拉迪沃斯托克标准时间、俄罗斯时区 10、中太平洋标准时间、俄罗斯时区 11、新西兰标准时间、UTC+12、斐济标准时间、坎查卡标准时间、通加标准时间、萨摩亚标准时间、 Line Islands 标准时间 |
ScaleAction
缩放作的参数。
名称 | 类型 | 默认值 | 说明 |
---|---|---|---|
cooldown |
string (duration) |
自执行此操作之前上次缩放操作以来要等待的时间量。 它必须介于 1 周到 1 分钟之间,采用 ISO 8601 格式。 |
|
direction |
刻度方向。 缩放操作是增加还是减少实例数。 |
||
type |
缩放规则触发时应发生的操作的类型。 |
||
value |
string |
1 |
缩放操作中涉及的实例数。 此值必须为 1 或更大。 默认值为 1。 |
ScaleCapacity
此配置文件期间可以使用的实例数。
名称 | 类型 | 说明 |
---|---|---|
default |
string |
如果指标不可用于评估,将设置的实例数。 仅当当前实例计数低于默认值时,才使用默认值。 |
maximum |
string |
资源的最大实例数。 实际的最大实例数受订阅中可用的内核限制。 |
minimum |
string |
资源的最小实例数。 |
ScaleDirection
刻度方向。 缩放操作是增加还是减少实例数。
值 | 说明 |
---|---|
Decrease | |
Increase | |
None |
ScaleRule
为缩放作提供触发器和参数的规则。
名称 | 类型 | 说明 |
---|---|---|
metricTrigger |
导致缩放操作的触发器。 |
|
scaleAction |
缩放操作的参数。 |
ScaleRuleMetricDimension
指定自动缩放规则指标维度。
名称 | 类型 | 说明 |
---|---|---|
DimensionName |
string |
维度的名称。 |
Operator |
维度运算符。 仅支持“Equals”和“NotEquals”。 “Equals”等于任何值。 “NotEquals”不等于所有值 |
|
Values |
string[] |
维度值列表。 例如:[“App1”,“App2”]。 |
ScaleRuleMetricDimensionOperationType
维度运算符。 仅支持“Equals”和“NotEquals”。 “Equals”等于任何值。 “NotEquals”不等于所有值
值 | 说明 |
---|---|
Equals | |
NotEquals |
ScaleType
缩放规则触发时应发生的操作的类型。
值 | 说明 |
---|---|
ChangeCount | |
ExactCount | |
PercentChangeCount | |
ServiceAllowedNextValue |
systemData
与创建和上次修改资源相关的元数据。
名称 | 类型 | 说明 |
---|---|---|
createdAt |
string (date-time) |
资源创建时间戳(UTC)。 |
createdBy |
string |
创建资源的标识。 |
createdByType |
创建资源的标识的类型。 |
|
lastModifiedAt |
string (date-time) |
上次修改的资源时间戳(UTC) |
lastModifiedBy |
string |
上次修改资源的标识。 |
lastModifiedByType |
上次修改资源的标识的类型。 |
TimeAggregationType
时间聚合类型。 收集的数据如何随时间推移进行组合。 默认值为 Average。
值 | 说明 |
---|---|
Average | |
Count | |
Last | |
Maximum | |
Minimum | |
Total |
TimeWindow
配置文件的特定日期时间。
名称 | 类型 | 说明 |
---|---|---|
end |
string (date-time) |
ISO 8601 格式配置文件的结束时间。 |
start |
string (date-time) |
ISO 8601 格式配置文件的开始时间。 |
timeZone |
string |
配置文件的开始时间和结束时间的时区。 有效时区的一些示例包括:日期线标准时间、UTC-11、夏威夷标准时间、阿拉斯加标准时间、太平洋标准时间(墨西哥)、太平洋标准时间、美国山标准时间、山标准时间(墨西哥)、中美洲标准时间、中部标准时间(墨西哥)、加拿大中部标准时间、SA 太平洋标准时间、东部标准时间、 美国东部标准时间、委内瑞拉标准时间、巴拉圭标准时间、大西洋标准时间、巴西中部标准时间、SA 西部标准时间、太平洋 SA 标准时间、纽芬兰标准时间、南美洲标准时间、阿根廷标准时间、SA 东部标准时间、格陵兰标准时间、蒙得维的亚标准时间、巴伊亚标准时间、UTC-02、Mid-Atlantic 标准时间、亚速尔标准时间、 开普敦标准时间、摩洛哥标准时间、UTC、GMT 标准时间、格林威治标准时间、W. 欧洲标准时间、中欧标准时间、浪漫标准时间、中欧标准时间、中非标准时间、纳米比亚标准时间、约旦标准时间、GTB 标准时间、中东标准时间、埃及标准时间、叙利亚标准时间、欧洲标准时间、欧洲标准时间、 南非标准时间、FLE 标准时间、土耳其标准时间、以色列标准时间、加里宁格勒标准时间、利比亚标准时间、阿拉伯标准时间、阿拉伯标准时间、白俄罗斯标准时间、俄罗斯标准时间、伊朗标准时间、阿拉伯标准时间、阿塞拜疆标准时间、俄罗斯时区 3、毛里求斯标准时间、格鲁吉亚标准时间、高加索标准时间、高加索标准时间、 阿富汗标准时间、西亚标准时间、西亚标准时间、Ekaterinburg 标准时间、巴基斯坦标准时间、印度标准时间、斯里兰卡标准时间、尼泊尔标准时间、中亚标准时间、孟加拉国标准时间、缅甸标准时间、SE 亚洲标准时间、北亚标准时间、中国标准时间、北欧东部标准时间、新加坡标准时间、 澳大利亚标准时间、台北标准时间、乌兰巴托标准时间、东京标准时间、韩国标准时间、雅库茨克标准时间、Cen。 澳大利亚标准时间、AUS 中部标准时间、E. 澳大利亚标准时间、澳大利亚东部标准时间、西太平洋标准时间、塔斯马尼亚标准时间、马加丹标准时间、玛加丹标准时间、弗拉迪沃斯托克标准时间、俄罗斯时区 10、中太平洋标准时间、俄罗斯时区 11、新西兰标准时间、UTC+12、斐济标准时间、坎查卡标准时间、通加标准时间、萨摩亚标准时间、 Line Islands 标准时间 |
WebhookNotification
自动缩放事件的 Webhook 通知。
名称 | 类型 | 说明 |
---|---|---|
properties |
object |
设置的属性包。 此值可以为空。 |
serviceUri |
string |
要接收通知的服务地址。 |