文档首页> 数据湖探索 DLI> API参考> 弹性资源池相关API> 弹性资源池扩缩容历史记录
更新时间:2023-07-27 GMT+08:00

弹性资源池扩缩容历史记录

功能介绍

该API用于查询当前弹性资源池扩缩容历史记录。

URI

GET /v3/{project_id}/elastic-resource-pools/{elastic_resource_pool_name}/scale-records

表1 路径参数

参数

是否必选

参数类型

描述

project_id

String

项目编号,用于资源隔离。获取方式请参考获取项目ID

elastic_resource_pool_name

String

弹性资源池名称。

长度限制:1~128个字符。

表2 Query参数

参数

是否必选

参数类型

描述

start_time

Long

start_time用于查询扩缩容历史的开始时间,该时间点需大于当前时间点减30天,必须小于end_time 。时间格式为unix时间戳,单位:毫秒。

  • 若start_time为空,则查询end_time前七天到end_time的数据(end_time最大不能大于当前时间30天)。
  • 查询当前时间点前15天到当前时间点的数据(start_time和end_time同时为空)。

end_time

Long

end_time用于查询扩缩容历史的结束时间,该时间点不能小于开始时间,不能大于当前时间。时间格式为unix时间戳,单位:毫秒。

  • 若end_time为空,则查询start_time到当前时间点的数据。
  • 查询当前时间点前15天到当前时间的数据(start_time和end_time同时为空)。

status

String

弹性资源池扩缩容的状态。

枚举值:

  • success
  • fail

offset

Integer

偏移量。

最小值:0

limit

Integer

当前分页条数。

最小值:0

最大值:100

请求参数

响应参数

表3 响应Body参数

参数

参数类型

描述

count

Integer

返回数组长度。

items

Array of arrays

数组中返回的数据。详细说明请参考表4

表4 items参数

参数

参数类型

描述

max_cu

Integer

最大CU。

min_cu

Integer

最小CU。

current_cu

Integer

扩缩容后CU。

origin_cu

Integer

扩缩容前CU。

target_cu

Integer

扩缩容预期CU

record_time

Long

操作完成时间。

status

String

扩缩容成功或者失败的状态。

fail_reason

String

失败原因。

请求示例

GET https://{endpoint}/v3/{project_id}/elastic-resource-pools/{elastic_resource_pool_name}/scale-records?start_time=1650784624000&end_time=1652625304002&status=&limit=20&offset=1  

响应示例

扩缩容历史记录查询接口查询成功

{ 
  "count" : 1, 
  "items" : [ { 
    "max_cu" : 64, 
    "min_cu" : 16, 
    "current_cu" : 16, 
    "target_cu" : 16, 
    "origin_cu" : 16, 
    "record_time" : 1650784624000, 
    "status" : "fail", 
    "fail_reason" : "Internal error, please contact technical support." 
  } ] 
}

状态码

状态码

描述

200

OK

错误码

请参见错误码