You need to enable JavaScript to run this app.
导航
DescribeScalingInstances - 查询伸缩组内ECS实例列表
最近更新时间:2025.03.03 14:34:53首次发布时间:2022.05.13 10:42:45

查询弹性伸缩组中的实例信息。

调试

请求参数

下表仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数

参数
类型
是否必填
示例值
描述
Action
String

DescribeScalingInstances

要执行的操作,取值:DescribeScalingInstances。

Version
String

2020-01-01

API的版本,取值:2020-01-01。

ScalingGroupId
String

scg-ybmssdnnhn5pkgyd****

伸缩组ID。您可以调用DescribeScalingGroups查询伸缩组ID。

CreationType
String

AutoCreated

实例的创建方式,取值:

  • AutoCreated:由伸缩组根据实例配置自动创建的实例。
  • Attached:由您手动添加到伸缩组中的实例。
InstanceIds.N
Array of String

i-ybmike5l70l8j1ha****

实例ID列表。您可以调用DescribeInstances接口查询实例ID。

  • 参数 - N:表示伸缩组的序号,取值1 ~ 20。

多个实例ID之间用&分隔。

PageNumber
Integer

1

列表的页码,默认值为1。

PageSize
Integer

10

分页查询时每页的行数,取值范围1~100。默认值:10。

ScalingConfigurationId
String

scc-ybmt16auaugh9zfy****

伸缩配置ID。您可以调用DescribeScalingConfigurations接口查询伸缩配置ID。

Status
String

InService

实例状态,取值:

  • Init 初始化。
  • Pending 加入中。
  • Pending:Wait 加入挂起中。
  • InService 服务中。
  • Error 错误。
  • Removing 移出中。
  • Removing:Wait 移出挂起中。
  • Stopped 停用中。
  • Protected 保护中。
  • Standby:备用中。

返回参数

下表仅列出本接口特有的返回参数。更多信息请参见返回结构

参数
类型
示例值
描述
PageNumber
Integer

1

当前页数。

PageSize
Integer

10

当前分页的行数。

ScalingInstances
Array of Object

--

符合条件的实例信息。

TotalCount
Integer

20

符合条件的实例总数。

请求示例

GET /?Action=DescribeScalingInstances&Version=2020-01-01 HTTP/1.1
Host: open.volcengineapi.com
X-Date: 20240507T112629Z
Authorization: HMAC-SHA256 Credential=Adfks******wekfwe/20240507/cn-beijing/auto_scaling/request, SignedHeaders=host;x-date, Signature=47a7d934ff7b37c03938******cd7b8278a40a1057690c401e92246a0e41085f


返回示例

{
  "ResponseMetadata": {
    "RequestId": "20240507192632154165224230E09C6E",
    "Version": "2020-01-01",
    "Service": "auto_scaling",
    "Region": "cn-beijing"
  },
  "Result": {
    "PageNumber": 1,
    "PageSize": 10,
    "ScalingInstances": [
      {
        "CreatedTime": "2022-04-02T16:00:00Z",
        "InstanceId": "i-ybmike5l70l8j1ha****",
        "ScalingConfigurationId": "scc-ybmt16auaugh9zfy****",
        "ScalingGroupId": "scg-ybmssdnnhn5pkgyd****",
        "ScalingPolicyId": "sp-ybmvamf8uql8j1fl****",
        "CreationType": "AutoCreated",
        "Entrusted": true,
        "ZoneId": "cn-beijing-a",
        "Status": "InService",
        "LaunchTemplateId": "lt-yc5kwj1di33uw1qj****",
        "LaunchTemplateVersion": "Default"
      }
    ],
    "TotalCount": 20
  }
}

错误码

下表为您列举了该接口与业务逻辑相关的错误码。公共错误码请参见公共错误码文档。

状态码
错误码
错误信息
说明
400
InvalidInstanceIds.Malformed

The specified amount of InstanceIds is malformed.

指定的实例ID数量超出限制。

400
InvalidInstanceStatus

The specified Status is unsupported.

指定的实例状态不支持。

400
InvalidInstanceCreationType

The specified CreationType is unsupported.

指定的实例创建方式不支持。

500
InternalError

An internal error has occurred.

内部错误,请重试。如果多次尝试失败,请提交工单。