DATASOURCE::ESS::ScalingRule

更新时间:2025-03-31 01:41:53

DATASOURCE::ESS::ScalingRule类型用于查询某个伸缩规则及其详细信息。

语法

{
  "Type": "DATASOURCE::ESS::ScalingRule",
  "Properties": {
    "ScalingRuleId": String,
    "RefreshOptions": String
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

属性名称

类型

必须

允许更新

描述

约束

ScalingRuleId

String

伸缩规则的ID。

RefreshOptions

String

当资源栈更新时,数据源资源的刷新策略。

有效值:

  • Never(默认值):更新堆栈时,从不刷新数据源资源。

  • Always:更新堆栈时,始终刷新数据源资源。

返回值

Fn::GetAtt

  • TargetValue:目标值。当伸缩规则为目标追踪规则或预测规则时,该伸缩规则将通过添加或删除实例来将指标维持在目标值附近。

  • StepAdjustments:步进规则的分步步骤。

  • Cooldown:伸缩规则的冷却时间,仅适用于简单规则。可能值:0~86400,单位:秒。

  • ScalingGroupId:伸缩组的ID。

  • PredictiveValueBehavior:预测规则最大值的处理方式。

  • Alarms:伸缩规则关联的云监控报警任务。

  • ScalingRuleId:伸缩规则的ID。

  • MinAdjustmentMagnitude:伸缩规则最小调整实例数,

  • DisableScaleIn:是否禁用缩容,仅适用于目标追踪规则。

  • MaxSize:伸缩组最大实例数。

  • AdjustmentType:伸缩规则的调整方式。

  • ScalingRuleAri:伸缩规则的唯一标识符。

  • MetricName:预定义监控项,适用于目标追踪规则和预测规则。

  • MinSize:伸缩组最小实例数。

  • ScalingRuleName:伸缩规则的名称。

  • AdjustmentValue:伸缩规则的调整值。

  • ScaleOutEvaluationCount:创建目标追踪规则后,会自动创建报警任务。

  • InitialMaxSize:伸缩组实例数的上限,

  • ScalingRuleType:伸缩规则类型。

  • EstimatedInstanceWarmup:新创建的实例做一系列准备措施,即预热所需要的时间

  • PredictiveScalingMode:预测规则的模式。

  • PredictiveValueBuffer:PredictiveValueBehaviorPredictiveValueOverrideMaxWithBuffer时生效,预测值会按照该比例增加,当增加后的值大于初始最大值时,会采用增加后的值。

  • ScaleInEvaluationCount:创建目标追踪规则后,会自动创建报警任务。本参数用于指定对应的缩容报警任务触发报警时,所需连续满足阈值条件的次数。

  • PredictiveTaskBufferTime:预测规则自动创建的预测任务默认均在整点执行,您可以设置预启动时间提前执行预测任务,预先准备资源。

示例

YAML
JSON
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  ScalingRuleId:
    Type: String
    Description:
      en: The ID of the scaling rule that you want to query.
    Required: true
Resources:
  ExtensionDataSource:
    Type: DATASOURCE::ESS::ScalingRule
    Properties:
      ScalingRuleId:
        Ref: ScalingRuleId
Outputs:
  TargetValue:
    Description: The target value of the metric.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - TargetValue
  StepAdjustments:
    Description: The step adjustments of the step scaling rule.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - StepAdjustments
  Cooldown:
    Description: 'The cooldown period of the scaling rule. '
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - Cooldown
  ScalingGroupId:
    Description: The ID of the scaling group.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - ScalingGroupId
  PredictiveValueBehavior:
    Description: 'The action on the predicted maximum value. '
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - PredictiveValueBehavior
  Alarms:
    Description: The event-triggered tasks that are associated with the scaling rule. The value of this parameter is returned only if you set ShowAlarmRules to true. Otherwise, null is returned.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - Alarms
  ScalingRuleId:
    Description: The ID of the scaling rule.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - ScalingRuleId
  MinAdjustmentMagnitude:
    Description: The minimum number of instances that must be scaled.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - MinAdjustmentMagnitude
  DisableScaleIn:
    Description: Indicates whether scale-in is disabled.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - DisableScaleIn
  MaxSize:
    Description: The maximum number of ECS instances that can be contained in the scaling group.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - MaxSize
  AdjustmentType:
    Description: The adjustment method of the scaling rule.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - AdjustmentType
  ScalingRuleAri:
    Description: The unique identifier of the scaling rule.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - ScalingRuleAri
  MetricName:
    Description: The name of the metric of the event-triggered task that is associated with the scaling rule.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - MetricName
  MinSize:
    Description: The minimum number of ECS instances that must be contained in the scaling group.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - MinSize
  ScalingRuleName:
    Description: The name of the scaling rule.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - ScalingRuleName
  AdjustmentValue:
    Description: The number of instances that must be scaled based on the scaling rule.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - AdjustmentValue
  ScaleOutEvaluationCount:
    Description: The number of consecutive times that the event-triggered task created for scale-out purposes must meet the threshold conditions before an alert is triggered.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - ScaleOutEvaluationCount
  InitialMaxSize:
    Description: The maximum number of ECS instances that can be contained in the scaling group.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - InitialMaxSize
  ScalingRuleType:
    Description: The type of the scaling rule.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - ScalingRuleType
  EstimatedInstanceWarmup:
    Description: The warm-up period of instances.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - EstimatedInstanceWarmup
  PredictiveScalingMode:
    Description: The mode of the predictive scaling rule.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - PredictiveScalingMode
  PredictiveValueBuffer:
    Description: 'The ratio based on which the predicted value is increased when PredictiveValueBehavior is set to PredictiveValueOverrideMaxWithBuffer. '
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - PredictiveValueBuffer
  ScaleInEvaluationCount:
    Description: 'The number of consecutive times that the event-triggered task for scale-in purposes must meet the threshold conditions before an alert is triggered. '
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - ScaleInEvaluationCount
  PredictiveTaskBufferTime:
    Description: 'The amount of buffer time before prediction tasks are executed. '
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - PredictiveTaskBufferTime
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "ScalingRuleId": {
      "Type": "String",
      "Description": {
        "en": "The ID of the scaling rule that you want to query."
      },
      "Required": true
    }
  },
  "Resources": {
    "ExtensionDataSource": {
      "Type": "DATASOURCE::ESS::ScalingRule",
      "Properties": {
        "ScalingRuleId": {
          "Ref": "ScalingRuleId"
        }
      }
    }
  },
  "Outputs": {
    "TargetValue": {
      "Description": "The target value of the metric.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "TargetValue"
        ]
      }
    },
    "StepAdjustments": {
      "Description": "The step adjustments of the step scaling rule.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "StepAdjustments"
        ]
      }
    },
    "Cooldown": {
      "Description": "The cooldown period of the scaling rule. ",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "Cooldown"
        ]
      }
    },
    "ScalingGroupId": {
      "Description": "The ID of the scaling group.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "ScalingGroupId"
        ]
      }
    },
    "PredictiveValueBehavior": {
      "Description": "The action on the predicted maximum value. ",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "PredictiveValueBehavior"
        ]
      }
    },
    "Alarms": {
      "Description": "The event-triggered tasks that are associated with the scaling rule. The value of this parameter is returned only if you set ShowAlarmRules to true. Otherwise, null is returned.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "Alarms"
        ]
      }
    },
    "ScalingRuleId": {
      "Description": "The ID of the scaling rule.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "ScalingRuleId"
        ]
      }
    },
    "MinAdjustmentMagnitude": {
      "Description": "The minimum number of instances that must be scaled.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "MinAdjustmentMagnitude"
        ]
      }
    },
    "DisableScaleIn": {
      "Description": "Indicates whether scale-in is disabled.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "DisableScaleIn"
        ]
      }
    },
    "MaxSize": {
      "Description": "The maximum number of ECS instances that can be contained in the scaling group.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "MaxSize"
        ]
      }
    },
    "AdjustmentType": {
      "Description": "The adjustment method of the scaling rule.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "AdjustmentType"
        ]
      }
    },
    "ScalingRuleAri": {
      "Description": "The unique identifier of the scaling rule.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "ScalingRuleAri"
        ]
      }
    },
    "MetricName": {
      "Description": "The name of the metric of the event-triggered task that is associated with the scaling rule.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "MetricName"
        ]
      }
    },
    "MinSize": {
      "Description": "The minimum number of ECS instances that must be contained in the scaling group.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "MinSize"
        ]
      }
    },
    "ScalingRuleName": {
      "Description": "The name of the scaling rule.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "ScalingRuleName"
        ]
      }
    },
    "AdjustmentValue": {
      "Description": "The number of instances that must be scaled based on the scaling rule.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "AdjustmentValue"
        ]
      }
    },
    "ScaleOutEvaluationCount": {
      "Description": "The number of consecutive times that the event-triggered task created for scale-out purposes must meet the threshold conditions before an alert is triggered.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "ScaleOutEvaluationCount"
        ]
      }
    },
    "InitialMaxSize": {
      "Description": "The maximum number of ECS instances that can be contained in the scaling group.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "InitialMaxSize"
        ]
      }
    },
    "ScalingRuleType": {
      "Description": "The type of the scaling rule.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "ScalingRuleType"
        ]
      }
    },
    "EstimatedInstanceWarmup": {
      "Description": "The warm-up period of instances.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "EstimatedInstanceWarmup"
        ]
      }
    },
    "PredictiveScalingMode": {
      "Description": "The mode of the predictive scaling rule.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "PredictiveScalingMode"
        ]
      }
    },
    "PredictiveValueBuffer": {
      "Description": "The ratio based on which the predicted value is increased when PredictiveValueBehavior is set to PredictiveValueOverrideMaxWithBuffer. ",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "PredictiveValueBuffer"
        ]
      }
    },
    "ScaleInEvaluationCount": {
      "Description": "The number of consecutive times that the event-triggered task for scale-in purposes must meet the threshold conditions before an alert is triggered. ",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "ScaleInEvaluationCount"
        ]
      }
    },
    "PredictiveTaskBufferTime": {
      "Description": "The amount of buffer time before prediction tasks are executed. ",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "PredictiveTaskBufferTime"
        ]
      }
    }
  }
}
                        
  • 本页导读 (1)
  • 语法
  • 属性
  • 返回值
  • 示例
AI助理

点击开启售前

在线咨询服务

你好,我是AI助理

可以解答问题、推荐解决方案等