All Products
Search
Document Center

Resource Orchestration Service:DATASOURCE::ESS::ScalingGroups

Last Updated:Oct 29, 2024

DATASOURCE::ESS::ScalingGroups is used to query scaling groups.

Syntax

{
  "Type": "DATASOURCE::ESS::ScalingGroups",
  "Properties": {
    "ScalingGroupNames": List,
    "GroupType": String,
    "ScalingGroupIds": List
  }
}

Properties

PropertyTypeRequiredEditableDescriptionConstraint
ScalingGroupNamesListNoYesThe names of the scaling groups. The names of inactive scaling groups are not displayed in the query results, and no error is reported.
Note You can query up to 20 scaling group names in a request.
GroupTypeStringNoYesThe type of the instances that are managed by the scaling group. Default value: ECS. Valid values:
  • ECS: Elastic Compute Service (ECS) instances
  • ECI: elastic container instances
ScalingGroupIdsListNoYesThe IDs of the scaling groups. The IDs of inactive scaling groups are not displayed in the query results, and no error is reported.
Note You can query up to 20 scaling group IDs in a request.

Return values (Fn::GetAtt)

  • ScalingGroups: details of the scaling groups.
  • ScalingGroupIds: the IDs of the scaling groups.
PropertyTypeDescriptionConstraint
ScalingGroupIdsListThe IDs of the scaling groups. None.
ScalingGroupsListDetails of the scaling groups. None.
DesiredCapacityNumberThe expected number of ECS instances for the scaling group. Auto Scaling automatically maintains the expected number of ECS instances in the scaling group.
LifecycleStateStringThe status of the scaling group. Valid values:
  • Active: The scaling configuration is active in the scaling group.

    Active scaling groups can receive requests to execute scaling rules and trigger scaling activities.

  • Inactive: The scaling group is inactive.
TotalInstanceCountNumberThe total number of ECS instances in the scaling group. None.
WeightedBooleanIndicates whether the weight of an instance type is specified. Valid values:
  • true
  • false
RemovalPoliciesListThe policies based on which ECS instances are removed from the scaling group. Valid values:
  • OldestInstance: ECS instances that are created at the earliest point in time are removed.
  • NewestInstance: ECS instances that are created at the most recent point in time are removed.
  • OldestScalingConfiguration: ECS instances that are created based on the earliest scaling configuration are removed.
PendingWaitCapacityNumberThe number of ECS instances that are in the Pending Add state in the scaling group. None.
TotalCapacityNumberThe total weighted capacity of all ECS instances in the scaling group if the Weighted property is specified If the WeightedCapacity property is not specified, the value of this property indicates the total number of ECS instances in the scaling group. None.
RemovingWaitCapacityNumberThe number of ECS instances that are in the Pending Remove state in the scaling group. None.
IsElasticStrengthInAlarmBooleanIndicates whether alerts are triggered. None.
ProtectedCapacityNumberThe number of ECS instances that are in the Protected state in the scaling group. None.
StandbyCapacityNumberThe number of instances that are in the Standby state in the scaling group. None.
ScalingPolicyStringThe reclaim mode of the scaling group. Valid values:
  • recycle: Instances that are no longer used are stopped and reclaimed.
  • release: Instances that are no longer used are released.
Note For more information about how to remove instances, see RemoveInstances.
SuspendedProcessesListThe process that is suspended. Valid values:
  • ScaleIn: scale-in
  • ScaleOut: scale-out
  • HealthCheck: health check
  • AlarmNotification: event-triggered task
  • ScheduledAction: scheduled task
RemovingCapacityNumberThe number of ECS instances that are being removed from the scaling group. None.
VSwitchIdsListThe IDs of the vSwitches that are associated with the scaling group. If the VSwitchIds property is specified, the VSwitchId property is ignored.
ScalingGroupIdStringThe ID of the scaling group. None.
PendingCapacityNumberThe number of ECS instances that are being added to the scaling group and still being configured.
VSwitchIdStringThe ID of the vSwitch that is associated with the scaling group. None.
LoadBalancerIdsListThe IDs of the Server Load Balancer (SLB) instances that are associated with the scaling group. None.
GroupDeletionProtectionBooleanIndicates whether deletion protection is enabled for the scaling group. Valid values:
  • true: Deletion protection is enabled for the scaling group. In this case, the scaling group cannot be deleted.
  • false: Deletion protection is disabled for the scaling group.
MaxSizeNumberThe maximum number of ECS instances that is allowed in the scaling group. None.
ScalingGroupNameStringThe name of the scaling group. None.
MinSizeNumberThe minimum number of ECS instances that is required for the scaling group. None.
ActiveCapacityNumberThe number of ECS instances that are added to the scaling group. The number of ECS instances that can provide services as expected.
DefaultCooldownNumberThe default cooldown time of the scaling group. During the cooldown time, Auto Scaling executes only the scaling activities that are triggered by event-triggered tasks monitored by CloudMonitor in the scaling group.
VpcIdStringThe ID of the virtual private cloud (VPC) to which the scaling group belongs. None.
GroupTypeStringThe type of instances that are managed by the scaling group. Default value: ECS. Valid values:
  • ECS: ECS instances
  • ECI: elastic container instances
SystemSuspendedBooleanIndicates whether Auto Scaling stops executing scaling activities in the scaling group. Valid values:
  • true: Auto Scaling stops executing scaling activities in the scaling group. This indicates that consecutive scaling activities failed for more than seven days in the scaling group.

    You must modify the scaling group or scaling configuration to resume the execution of scaling activities.

  • false: Auto Scaling executes scaling activities in the scaling group.
CreationTimeStringThe time when the scaling group was created. None.
MultiAZPolicyStringThe scaling policy for ECS instances in the multi-zone scaling group. Valid values:
  • PRIORITY: ECS instances are scaled based on the value of the VSwitchIds property.

    If Auto Scaling fails to create ECS instances in the zone where the vSwitch that has the highest priority resides, Auto Scaling creates ECS instances in the zone where the vSwitch that has the next highest priority resides.

  • COST_OPTIMIZED: ECS instances are created based on the unit price of their vCPUs. Auto Scaling preferentially creates ECS instances that have vCPUs provided at the lowest price.

    If preemptible instance types are specified in the scaling configuration, Auto Scaling preferentially creates preemptible instances. If preemptible instances cannot be created due to insufficient inventory, you can use the CompensateWithOnDemand property to specify whether to automatically create pay-as-you-go instances.

    Note

    The COST_OPTIMIZED setting takes effect only when you specify multiple instance types or when you specify at least one preemptible instance type.

  • BALANCE: Auto Scaling evenly distributes ECS instances across zones that are specified for the scaling group.

    If ECS instances are unevenly distributed across zones due to insufficient inventory, you can call the RebalanceInstances operation to evenly distribute the instances across the zones.

StoppedCapacityNumberThe number of instances that are stopped in Economical Mode in the scaling group. None.
DBInstanceIdsListThe IDs of ApsaraDB RDS instances that are associated with the scaling group. Example: [ "rm-bp15556qzebg1****", "rm-shj1829939342****"].
HealthCheckTypeStringThe health check mode of the scaling group. Valid values:
  • NONE: No health checks are performed on ECS instances in the scaling group.
  • ECS: Health checks are performed on ECS instances in the scaling group.

Examples

  • JSON format

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
        "GroupType": {
          "Type": "String",
          "Description": "The type of instances that are managed by the scaling group. Valid values:\nECS: the Elastic Compute Service (ECS) instances\nECI: the elastic container instances\nDefault value: ECS.",
          "Default": "ECS"
        }
      },
      "Resources": {
        "ExtensionDataSource": {
          "Type": "DATASOURCE::ESS::ScalingGroups",
          "Properties": {
            "GroupType": {
              "Ref": "GroupType"
            }
          }
        }
      },
      "Outputs": {
        "ScalingGroups": {
          "Description": "The list of scaling groups.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "ScalingGroups"
            ]
          }
        },
        "ScalingGroupIds": {
          "Description": "The list of scaling group IDs.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "ScalingGroupIds"
            ]
          }
        }
      }
    }
  • YAML format

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters:
      GroupType:
        Type: String
        Description: |-
          The type of instances that are managed by the scaling group. Valid values:
          ECS: the Elastic Compute Service (ECS) instances
          ECI: the elastic container instances
          Default value: ECS.
        Default: ECS
    Resources:
      ExtensionDataSource:
        Type: DATASOURCE::ESS::ScalingGroups
        Properties:
          GroupType:
            Ref: GroupType
    Outputs:
      ScalingGroups:
        Description: The list of scaling groups.
        Value:
          Fn::GetAtt:
            - ExtensionDataSource
            - ScalingGroups
      ScalingGroupIds:
        Description: The list of scaling group IDs.
        Value:
          Fn::GetAtt:
            - ExtensionDataSource
            - ScalingGroupIds