Retrieves the elastic scheduling events for a specified instance and time range.
Operation description
Request
This API retrieves compute group scaling events for a specific instance ID.
The
startTimeandendTimeparameters specify the time range for the query, which defaults to the last three days.The
pageSizeandpageNumberparameters control pagination. The maximum value forpageSizeis 100.If the
elasticTypeparameter is omitted, the API returns scaling events of all types.
Try it now
Test
RAM authorization
Request syntax
POST /api/v1/instances/{instanceId}/listWarehouseScheduleEvent HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| instanceId |
string |
Yes |
The instance ID. |
hgpost-cn-xxxx |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| body |
object |
No |
The request body. |
|
| startTime |
integer |
No |
The start timestamp, in seconds. Defaults to three days ago. |
1777257001 |
| endTime |
integer |
No |
The end timestamp, in seconds. Defaults to the current time. |
1777516201 |
| pageSize |
integer |
No |
The number of entries per page. Default: 30. Maximum: 100. |
30 |
| pageNumber |
integer |
No |
The page number. Defaults to 1. |
1 |
| elasticType |
string |
No |
The elastic type. If this parameter is omitted, events of all types are returned. Valid values: Valid values:
|
timed |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The output parameters. |
||
| RequestId |
string |
The ID of the request. |
E16D32D4-DF86-1180-8220-0D39770A5AF9 |
| EventList |
array<object> |
The event list. |
|
|
object |
|||
| WarehouseName |
string |
The warehouse name. |
init_warehouse |
| EventName |
string |
The event name. Valid values:
|
AlterWarehouse |
| EventTime |
string |
The event time (UTC). |
2024-07-22T09:43:02.638Z |
| Result |
string |
The result of the event. Valid values:
|
success |
| ReservedCpu |
integer |
The number of reserved CPU cores (non-elastic). |
64 |
| OriginalElasticCpu |
integer |
This field is deprecated. |
0 |
| ElasticCpu |
integer |
The number of elastic CPU cores. |
48 |
| ElasticType |
string |
The elastic type. Valid values:
|
ScaleUp |
| InitClusterCount |
integer |
The number of reserved clusters (non-elastic). |
2 |
| ClusterCount |
integer |
The cluster count. |
2 |
| ClusterCpu |
integer |
The cluster specification, measured in CPU cores. |
32 |
| FailedReason |
string |
The failure reason. This parameter is returned only if the value of |
insufficient resource |
| PageSize |
integer |
The number of entries to return on each page. Default value: 30. Maximum value: 100. |
30 |
| PageNumber |
integer |
The page number. Default value: 1. |
1 |
| TotalCount |
integer |
The total number of events. |
120 |
Examples
Success response
JSON format
{
"RequestId": "E16D32D4-DF86-1180-8220-0D39770A5AF9",
"EventList": [
{
"WarehouseName": "init_warehouse",
"EventName": "AlterWarehouse",
"EventTime": "2024-07-22T09:43:02.638Z",
"Result": "success",
"ReservedCpu": 64,
"OriginalElasticCpu": 0,
"ElasticCpu": 48,
"ElasticType": "ScaleUp",
"InitClusterCount": 2,
"ClusterCount": 2,
"ClusterCpu": 32,
"FailedReason": "insufficient resource"
}
],
"PageSize": 30,
"PageNumber": 1,
"TotalCount": 120
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.