Call DescribeScalingGroupInstanceV2 to view the details of a running scaling group instance.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. You can use OpenAPI Explorer to search for API operations, call API operations, and dynamically generate SDK sample code.

Request parameters

Parameter Type Required Example Description
Action String Yes DescribeScalingGroupInstanceV2

The operation that you want to perform. This parameter is required for API requests that you create by piecing together HTTP or HTTPS URLs. Valid values: DescribeScalingGroupInstanceV2.

RegionId String Yes cn-hangzhou

The region ID of the instance. You can call DescribeRegions To view the latest list of Alibaba Cloud regions.

ResourceGroupId String No rg-acfmv6jutt6****

The ID of the resource group. You can call ListResourceGroups View the resource group ID.

ScalingGroupBizId String No SGB-AA1234567****

The ID of the scaling group. You can call ListScalingGroupV2 View the scaling group ID.

Note Enter at least one of the ScalingGroupBizId and hostgroupbis ID.
HostGroupBizId String No G-1234567890A****

The ID of the host group. You can call ListClusterHostGroup View Machine Group ID.

Note Enter at least one of the ScalingGroupBizId and hostgroupbis ID. In this example, hostgroupbis is entered.

Response parameters

Parameter Type Example Description
ActiveRuleCategory String ByLoad

The scaling policy. Valid values:

  • ByLoad: scaling by load
  • Scheduled: Scheduled scaling
DefaultCooldown Integer 300

The cooldown time. Unit: second.

HostGroupId String G-5011FB3E4928****

The ID of the host group.

MaxSize Integer 10

The maximum number of nodes in the Machine Group.

MinSize Integer 0

Machine Group the minimum number of nodes.

MultiAvailablePolicy String PRIORITY

The optimization policy. Valid values:

  • PRIORITY: ECS instances are scaled based on the VSwitchIds.N parameter.
  • COST_OPTIMIZED: ECS instances are created based on the unit price of vCPUs, from low to high. Preemptible instances are preferentially created when preemptible instance types are specified for the scaling configuration.
Note COST_OPTIMIZED takes effect only when multiple instance types are specified or at least one preemptible instance type is specified.
MultiAvailablePolicyParam String {"onDemandBaseCapacity": 1, "onDemandPercentageAboveBaseCapacity": 10, "spotInstanceRemedy": false, "spotInstancePools": 2}

Optimize parameters. The following settings are required only when MultiAvailablePolicy is set to COST_OPTIMIZED:

  • onDemandBaseCapacity: number of pay-as-you-go nodes
  • onDemandPercentageAboveBaseCapacity: pay-as-you-go node ratio
  • spotInstanceRemedy: whether to enable compensation-as-you-go
  • spotInstancePools: the number of preemptible node specifications types
RequestId String 6C96FD2C-95A0-4C03-8A19-7D84A4BAAA1E

The ID of the request.

ScalingConfig Struct

The scaling configuration.

DataDiskCategory String ssd

The data disk type. Values are as follows:

  • cloud: basic disk
  • cloud_efficiency: ultra disk
  • cloud_ssd: local SSD
  • ephemeral_ssd: local SSD
  • cloud_essd: ESSD
DataDiskCount Integer 4

The number of data disks.

DataDiskSize Integer 40

The size of a data disk. Unit: GiB.

InstanceTypeList List ecs.c5.xlarge

The architecture type of the instance.

PayType String PostPaid

The billing method of the host. Valid values:

  • PostPaid: pay-as-you-go clusters
  • PrePaid: subscription cluster
SpotPriceLimits Array of SpotPriceLimit

Preemptible instance type and price parameters

SpotPriceLimit
InstanceType String ecs.c5.xlarge

The type of the preemptible instance.

PriceLimit Float 0.1

The unit price of the preemptible instance. Unit: CNY /hour.

SpotStrategy String NoSpot

The bidding strategy. Valid values:

  • NoSpot: no preemptible instances
  • SpotWithPriceLimit: use preemptible instances with price limits
  • SpotAsPriceGo: uses preemptible instances based on their prices
SysDiskCategory String ssd

The category of the system disk. Valid values:

  • cloud: basic disk
  • cloud_efficiency: ultra disk
  • cloud_ssd: standard SSD
SysDiskSize Integer 40

The size of the system disk. Unit: GB.

ScalingRuleList Array of ScalingRule

The list of scaling rules.

ScalingRule
AdjustmentType String QuantityChangeInCapacity

The incremental mode. The value is fixed to QuantityChangeInCapacity.

AdjustmentValue Integer -1

The number of nodes to be adjusted each time. A value greater than 0 is expansion, and a value less than 0 is contraction.

CloudWatchTrigger Struct

Trigger rule parameters by load.

ComparisonOperator String >

Comparison operator:

  • >
  • <
  • =
EvaluationCount String 1

The number of computations.

MetricDisplayName String YARN.PendingVCores

The display name of the measure.

MetricName String YarnRootPendingVCores

The name of the measure.

Period Integer 5

The time when the statistics are collected. Unit: minute.

Statistics String Average

The statistical method.

Threshold String 0

The threshold.

Unit String None

Abandoned Field.

Cooldown Integer 600

The cooldown time. Unit: second.

EssScalingRuleId String sgr-34234eed234242

The ID of the associated ESS scaling rule.

LaunchExpirationTime Integer 600

The time period during which the failed scheduled task is retried. Unit: seconds. Valid values: 0 to 21600.

LaunchTime String 2020-07-22T03:09Z

The time at which the scheduled task is triggered. UTC time is used and complies with the ISO 8601 standard. The time is displayed in UTC. You cannot enter a time point later than 90 days from the scheduled task creation.

If the RecurrenceType parameter is specified, the task is executed each day at the time specified by LaunchTime.

If the RecurrenceType parameter is not specified, the task is executed only once at the time specified by LaunchTime.

RecurrenceEndTime String 2020-07-22T03:09Z

The end time of the scheduled task to be repeated. Specify the time in the ISO 8601 standard in the YYYY-MM-DDThh:mmZ format.

RecurrenceType String Daily

The interval that a scheduled task is repeated at. Valid values:

  • Daily: The scheduled task is executed once every specified number of days.
  • Weekly: The scheduled task is executed on each specified day of a week.
  • Monthly: The scheduled task is executed on each specified day of a month.

You must specify RecurrenceType and RecurrenceValue at the same time.

RecurrenceValue String 1

The number of recurrences of the scheduled task.

  • Daily: If you set RecurrenceType to Daily, you can specify only one value. Valid values: 1 to 31.
  • Weekly: If you set RecurrenceType to Weekly, you can specify multiple values and separate them with commas (,). For example, the values of Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, and Saturday are 0, 1, 2, 3, 4, 5, and 6.
  • Monthly: If you set RecurrenceType to Monthly, you can specify two values in the A-B format. Valid values: 1 to 31. B must be greater than or equal to A.

You must specify RecurrenceType and RecurrenceValue at the same time.

RuleCategory String ByLoad

The type of the rule. Valid values:

  • ByLoad: scaling by load
  • Scheduled: Scheduled scaling
RuleName String Rule 1

The name of the rule.

ScalingGroupId Long 122

The instance ID of the scaling group.

SchedulerTrigger Struct

Details of rules for periodic scheduling

LaunchExpirationTime Integer 600

The time period during which the failed scheduled task is retried. Unit: seconds. Valid values: 0 to 21600.

LaunchTime Long 1434321345621

The point in time at which the scheduled task was triggered.

RecurrenceEndTime Long 1434321345621

The end time of the repeated scheduled task.

RecurrenceType String Daily

The interval that a scheduled task is repeated at. Valid values:

  • Daily: The scheduled task is executed once every specified number of days.
  • Weekly: The scheduled task is executed on each specified day of a week.
  • Monthly: The scheduled task is executed on each specified day of a month.

You must specify RecurrenceType and RecurrenceValue at the same time.

RecurrenceValue String 1

The number of recurrences of the scheduled task.

  • Daily: If you set RecurrenceType to Daily, you can specify only one value. Valid values: 1 to 31.
  • Weekly: If you set RecurrenceType to Weekly, you can specify multiple values and separate them with commas (,). For example, the values of Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, and Saturday are 0, 1, 2, 3, 4, 5, and 6.
  • Monthly: If you set RecurrenceType to Monthly, you can specify two values in the A-B format. Valid values: 1 to 31. B must be greater than or equal to A.

You must specify RecurrenceType and RecurrenceValue at the same time.

Status String ACTIVE

The running Status. Valid values:

  • ACTIVE: The scaling group is started.
  • INACTIVE: the scaling group is not started.
TimeoutWithGrace Long 1000

The timeout period for graceful disconnection, in milliseconds. A reserved parameter.

WithGrace Boolean true

Whether to enable graceful disconnection:

  • true
  • false
ScalingGroupId String SGB-12324546568****

The ID of the scaling group.

TimeoutWithGrace Long 1000

The timeout period for graceful disconnection, in milliseconds.

WithGrace Boolean true

Whether to enable graceful disconnection:

  • true: optimization offline is enabled.
  • false: do not enable graceful disconnection

Examples

Sample requests

http(s)://[Endpoint]/?Action=DescribeScalingGroupInstanceV2
&RegionId=cn-hangzhou
&HostGroupBizId=G-1234567890A****
&<common request parameters> 

Sample success responses

XML format

<ScalingConfig>
    <SpotPriceLimits>
        <SpotPriceLimit>
            <PriceLimit>0.1</PriceLimit>
            <InstanceType>ecs.c5.xlarge</InstanceType>
        </SpotPriceLimit>
    </SpotPriceLimits>
    <DataDiskCount>4</DataDiskCount>
    <PayType>PostPaid</PayType>
    <DataDiskSize>40</DataDiskSize>
    <SysDiskSize>40</SysDiskSize>
    <DataDiskCategory>ssd</DataDiskCategory>
    <SpotStrategy>NoSpot</SpotStrategy>
    <SysDiskCategory>ssd</SysDiskCategory>
    <InstanceTypeList>
        <InstanceType>ecs.c5.xlarge</InstanceType>
    </InstanceTypeList>
</ScalingConfig>
<RequestId>6C96FD2C-95A0-4C03-8A19-7D84A4BAAA1E</RequestId>
<ActiveRuleCategory>ByLoad</ActiveRuleCategory>
<TimeoutWithGrace>1000</TimeoutWithGrace>
<ScalingGroupId>SGB-123245465686****</ScalingGroupId>
<MaxSize>10</MaxSize>
<MultiAvailablePolicyParam>{"onDemandBaseCapacity": 1, "onDemandPercentageAboveBaseCapacity": 10, "spotInstanceRemedy": false, "spotInstancePools": 2}</MultiAvailablePolicyParam>
<MinSize>0</MinSize>
<DefaultCooldown>300</DefaultCooldown>
<HostGroupId>G-5011FB3E49288C19</HostGroupId>
<WithGrace>true</WithGrace>
<MultiAvailablePolicy>PRIORITY</MultiAvailablePolicy>
<ScalingRuleList>
    <ScalingRule>
        <Status>ACTIVE</Status>
        <EssScalingRuleId>sgr-34234eed234242</EssScalingRuleId>
        <LaunchTime>2020-07-22T03:09Z</LaunchTime>
        <TimeoutWithGrace>1000</TimeoutWithGrace>
        <ScalingGroupId>122</ScalingGroupId>
        <Cooldown>600</Cooldown>
        <RecurrenceType>Daily</RecurrenceType>
        <LaunchExpirationTime>600</LaunchExpirationTime>
        <AdjustmentType>QuantityChangeInCapacity</AdjustmentType>
        <AdjustmentValue>-1</AdjustmentValue>
        <WithGrace>true</WithGrace>
        <RecurrenceValue>1</RecurrenceValue>
        <RecurrenceEndTime>2020-07-22T03:09Z</RecurrenceEndTime>
        <RuleName>Rule 1</RuleName>
        <RuleCategory>ByLoad</RuleCategory>
    </ScalingRule>
    <ScalingRule>
        <SchedulerTrigger>
            <ComparisonOperator></ComparisonOperator>
            <LaunchTime>1434321345621</LaunchTime>
            <RecurrenceType>Daily</RecurrenceType>
            <MetricDisplayName>YARN.PendingVCores</MetricDisplayName>
            <Period>5</Period>
            <EvaluationCount>1</EvaluationCount>
            <Unit> </Unit>
            <Statistics>Average</Statistics>
            <LaunchExpirationTime>600</LaunchExpirationTime>
            <MetricName>YarnRootPendingVCores</MetricName>
            <RecurrenceValue>1</RecurrenceValue>
            <RecurrenceEndTime>1434321345621</RecurrenceEndTime>
            <Threshold>0</Threshold>
        </SchedulerTrigger>
        <CloudWatchTrigger>
            <ComparisonOperator></ComparisonOperator>
            <LaunchTime>1434321345621</LaunchTime>
            <RecurrenceType>Daily</RecurrenceType>
            <MetricDisplayName>YARN.PendingVCores</MetricDisplayName>
            <Period>5</Period>
            <EvaluationCount>1</EvaluationCount>
            <Unit> </Unit>
            <Statistics>Average</Statistics>
            <LaunchExpirationTime>600</LaunchExpirationTime>
            <MetricName>YarnRootPendingVCores</MetricName>
            <RecurrenceValue>1</RecurrenceValue>
            <RecurrenceEndTime>1434321345621</RecurrenceEndTime>
            <Threshold>0</Threshold>
        </CloudWatchTrigger>
    </ScalingRule>
</ScalingRuleList>

JSON Syntax

{
    "ScalingConfig":
    {
        "SpotPriceLimits":
        {
            "SpotPriceLimit":
            [
                {
                    "PriceLimit":"0.1",
                    "InstanceType":"ecs.c5.xlarge"
                    }
                    ]
                    },
                    "DataDiskCount":"4",
                    "PayType":"PostPaid",
                    "DataDiskSize":"40",
                    "SysDiskSize":"40",
                    "DataDiskCategory":"ssd",
                    "SpotStrategy":"NoSpot",
                    "SysDiskCategory":"ssd",
                    "InstanceTypeList":
                    {
                        "InstanceType":"ecs.c5.xlarge"
                        }
                        },
                        "RequestId":"6C96FD2C-95A0-4C03-8A19-7D84A4BAAA1E",
                        "ActiveRuleCategory":"ByLoad",
                        "TimeoutWithGrace":"1000",
                        "ScalingGroupId":"SGB-123245465686****",
                        "MaxSize":"10",
                        "MultiAvailablePolicyParam":"{\"onDemandBaseCapacity\": 1, \"onDemandPercentageAboveBaseCapacity\": 10, \"spotInstanceRemedy\": false, \"spotInstancePools\": 2}","MinSize":"0","DefaultCooldown":"300","HostGroupId":"G-5011FB3E49288C19",
                        "WithGrace":"true",
                        "MultiAvailablePolicy":"PRIORITY",
                        "ScalingRuleList":
                        {
                            "ScalingRule":
                            [
                                {
                                    "Status":"ACTIVE",
                                    "EssScalingRuleId":"sgr-34234eed234242",
                                    "LaunchTime":"2020-07-22T03:09Z",
                                    "TimeoutWithGrace":"1000",
                                    "ScalingGroupId":"122",
                                    "Cooldown":"600",
                                    "RecurrenceType":"Daily",
                                    "LaunchExpirationTime":"600",
                                    "AdjustmentType":"QuantityChangeInCapacity",
                                    "AdjustmentValue":"-1",
                                    "WithGrace":"true",
                                    "RecurrenceValue":"1",
                                    "RecurrenceEndTime":"2020-07-22T03:09Z",
                                    "RuleName":"Rule 1",
                                    "RuleCategory":"ByLoad"
                                    },
                                    {
                                        "SchedulerTrigger":    {
                                         "ComparisonOperator":">",
                                         "LaunchTime":"1434321345621",
                                         "RecurrenceType":"Daily",
                                         "MetricDisplayName":"YARN.PendingVCores",
                                         "Period":"5",
                                         "EvaluationCount":"1",
                                         "Unit":" ",
                                         "Statistics":"Average",
                                         "LaunchExpirationTime":"600",
                                         "MetricName":"YarnRootPendingVCores",
                                         "RecurrenceValue":"1",
                                         "RecurrenceEndTime":"1434321345621",
                                         "Threshold":"0"
                                         },
                                         "CloudWatchTrigger":
                                         {
                                             "ComparisonOperator":">",
                                             "LaunchTime":"1434321345621",
                                             "RecurrenceType":"Daily",                                            
                                             "MetricDisplayName":"YARN.PendingVCores",
                                             "Period":"5",
                                             "EvaluationCount":"1",
                                             "Unit":" ",
                                             "Statistics":"Average",
                                             "LaunchExpirationTime":"600",
                                             "MetricName":"YarnRootPendingVCores",
                                             "RecurrenceValue":"1",
                                             "RecurrenceEndTime":"1434321345621",
                                             "Threshold":"0"
                                          }
                           }
                       ]
             }
}