You need to enable JavaScript to run this app.
导航
DescribeScalingActivities - 查询伸缩活动列表
最近更新时间:2025.03.03 14:34:54首次发布时间:2022.05.13 10:42:45
我的收藏
有用
有用
无用
无用

查询伸缩日志。

调试

请求参数

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

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

DescribeScalingActivities

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

Version
String

2020-01-01

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

ScalingGroupId
String

scg-yblhryq64wgh9zmp****

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

EndTime
String

2021-09-06T07:40Z

伸缩日志的结束日期。

PageNumber
Integer

1

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

PageSize
Integer

10

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

ScalingActivityIds.N
Array of String

sga-ybn0mwfy1yl8j1f6****

伸缩日志ID列表。

  • 参数 - N:表示伸缩日志的序号,取值1 ~ 20。
  • 多个伸缩日志之间用&分隔。
StartTime
String

2021-09-06T07:37Z

伸缩日志的开始日期。

StatusCode
String

Success

伸缩日志的执行结果,取值:

  • Init:初始化。
  • Running:运行中。
  • Success :成功。
  • PartialSuccess:部分成功。
  • Error:全部失败。
  • Rejected:拒绝。
  • Exception:异常。

返回参数

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

参数
类型
示例值
描述
PageNumber
Integer

1

当前页数。

PageSize
Integer

10

当前分页的行数。

ScalingActivities
Array of Object

--

符合条件的伸缩日志信息。

TotalCount
Integer

100

符合条件的伸缩日志总数。

请求示例

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


返回示例

{
  "ResponseMetadata": {
    "RequestId": "20240507193036074006150039D52A15",
    "Version": "2020-01-01",
    "Service": "auto_scaling",
    "Region": "cn-beijing"
  },
  "Result": {
    "PageNumber": 1,
    "PageSize": 10,
    "ScalingActivities": [
      {
        "ScalingActivityId": "sga-ybn0mwfy1yl8j1f6****",
        "CreatedAt": "2022-05-11T03:15:26Z",
        "ExpectedRunTime": "2022-05-11T03:15:24Z",
        "ScalingGroupId": "scg-ybmssdnnhn5pkgyd****",
        "ResultMsg": "This is a scaling activity.",
        "MaxInstanceNumber": 100,
        "MinInstanceNumber": 10,
        "CurrentInstanceNumber": 20,
        "ActualAdjustInstanceNumber": 3,
        "Cooldown": 300,
        "StatusCode": "Init",
        "RelatedInstances": [
          {
            "Message": "Error.",
            "InstanceId": "i-ybmike5l70l8j1ha****",
            "OperateType": "Add",
            "Status": "Success"
          }
        ],
        "ActivityType": "SCALE_OUT",
        "StoppedAt": "2022-05-11T03:15:51Z",
        "TaskCategory": "Manual"
      }
    ],
    "TotalCount": 100
  }
}

错误码

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

状态码
错误码
错误信息
说明
400
MissingParameter.ScalingGroupId

The required parameter ScalingGroupId is not supplied.

伸缩组ID不能为空。

400
InvalidScalingActivityStartTime.Malformed

The specified ScalingActivity StartTime is malformed.

指定伸缩活动的开始时间不合法。

400
InvalidScalingActivityEndTime.Malformed

The specified ScalingActivity EndTime is malformed.

指定伸缩活动的结束时间不合法。

400
LimitExceeded.ScalingActivityIds

You've reached the limit on the number of ScalingActivityIds that you can set.

已达到伸缩活动ID的数量上限。

404
InvalidScalingGroupId.NotFound

The specified ScalingGroup [%s] does not exist.

指定的伸缩组不存在。

500
InternalError

An internal error has occurred.

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