DescribeScheduledTasks
Queries the details of one or more scheduled tasks. A scheduled task is a preset node that executes a specified scaling rule at a specified time to implement automatic scale-out and scale-in of compute resources. After you create a scheduled task, you can invoke the DescribeScheduledTasks API to query its details, such as the trigger time, the total number of scheduled tasks, and the ID of the scaling group that executes the scheduled task.
Operation description
Operation description
You can query scheduled tasks by scheduled task ID, scheduled task name, or the scaling rule executed by the scheduled task.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ess:DescribeScheduledTasks |
get |
*ScalingGroup
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
The region ID of the scaling group to which the scheduled task belongs. |
cn-qingdao |
| PageNumber |
integer |
No |
The page number of the scheduled task list. Pages start from page 1. Default value: 1. |
1 |
| PageSize |
integer |
No |
The Settings for the number of entries per page during paging in a paged query. Maximum value: 50. Default value: 10. |
50 |
| ScalingGroupId |
string |
No |
The ID of the scaling group that executes the scheduled task. |
asg-bp1bo5tca4m56nap**** |
| ScheduledAction |
array |
No |
The scaling rule that is executed when the scheduled task is triggered. This parameter is valid only when a scaling rule is specified for the scheduled task. |
ari:acs:ess:cn-hangzhou:1406926474****:scalingrule/asr-bp1id5rhu8edp7kd**** |
|
string |
No |
The scaling rules that are executed when the scheduled tasks are triggered. This parameter is valid only when scaling rules are specified for the scheduled tasks. Valid values of N: 0 to 20. The value is the unique identifier of the scaling rule (ScalingRuleAri). |
ari:acs:ess:cn-hangzhou:1406926474****:scalingrule/asr-bp1id5rhu8edp7kd**** |
|
| ScheduledTaskId |
array |
No |
The ID of the scheduled task to be queried. |
edRtShc57WGXdt8TlPbr**** |
|
string |
No |
The IDs of the scheduled tasks to be queried. Valid values of N: 1 to 20. |
edRtShc57WGXdt8TlPbr**** |
|
| ScheduledTaskName |
array |
No |
The name of the scheduled task to be queried. |
scheduled**** |
|
string |
No |
The names of the scheduled tasks to be queried. Valid values of N: 1 to 20. |
scheduled**** |
|
| TaskName |
string |
No |
The name of the task. Fuzzy search by keyword is supported. |
scheduled**** |
| RecurrenceType |
string |
No |
The recurrence type of the scheduled task. Valid values:
|
Weekly |
| RecurrenceValue |
string |
No |
The recurrence value of the scheduled task. This parameter is supported only when RecurrenceType is set to Weekly. You can specify multiple values and separate them with commas (,). For example, the values for Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, and Saturday are 0, 1, 2, 3, 4, 5, and 6. |
1,2,3 |
| TaskEnabled |
boolean |
No |
Specifies whether the scheduled task is started. Valid values:
|
true |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| PageNumber |
integer |
The current page number. |
1 |
| PageSize |
integer |
The number of entries per page. |
50 |
| RequestId |
string |
The request ID. |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3**** |
| ScheduledTasks |
object |
||
| ScheduledTask |
array<object> |
The collection of scheduled task information. |
|
|
array<object> |
The collection of scheduled task information. |
||
| Description |
string |
The description of the scheduled task. |
Test scheduled task. |
| DesiredCapacity |
integer |
The expected number of instances in the scaling group. This parameter is valid when the scaling method of the scheduled task is set to specify the number of instances in the scaling group. |
10 |
| LaunchExpirationTime |
integer |
The retry period after the scheduled task fails to be triggered. Unit: seconds. Valid values: 0 to 21600. |
600 |
| LaunchTime |
string |
The time when the scheduled task is triggered. The time follows the ISO 8601 standard in the YYYY-MM-DDThh:mmZ format. The time is displayed in UTC. |
2014-08-18T10:52Z |
| MaxValue |
integer |
The maximum number of instances in the scaling group. This parameter is valid when the scaling method of the scheduled task is set to specify the number of instances in the scaling group. |
10 |
| MinValue |
integer |
The minimum number of instances in the scaling group. This parameter is valid when the scaling method of the scheduled task is set to specify the number of instances in the scaling group. |
0 |
| RecurrenceEndTime |
string |
The end time of the recurrence. The time follows the ISO 8601 standard in the YYYY-MM-DDThh:mmZ format. The time is displayed in UTC. |
2014-08-20T16:55Z |
| RecurrenceType |
string |
The recurrence type of the scheduled task. |
Daily |
| RecurrenceValue |
string |
The recurrence value of the scheduled task. |
1 |
| ScalingGroupId |
string |
The ID of the scaling group that executes the scheduled task. |
asg-bp1bo5tca4m56nap**** |
| ScheduledAction |
string |
The scaling rule that is executed when the scheduled task is triggered. This parameter is returned only when a scaling rule is specified for the scheduled task. |
ari:acs:ess:cn-hangzhou:1406926474****:scalingrule/asr-bp1id5rhu8edp7kd**** |
| ScheduledTaskId |
string |
The ID of the scheduled task. |
edRtShc57WGXdt8TlPbr**** |
| ScheduledTaskName |
string |
The name of the scheduled task. |
scheduled**** |
| TaskEnabled |
boolean |
Indicates whether the scheduled task is started. Valid values:
Default value: true. |
true |
| WarmPoolCapacityOptions |
object |
The warm pool capacity configurations of the scaling group. |
|
| DesiredGroupPreparedCapacity |
integer |
The expected number of warmed instances. The system maintains the sum of the current number of instances in the scaling group and the number of instances in the warm pool at this value. |
5 |
| MinCapacity |
integer |
The minimum number of instances in the warm pool. |
0 |
| TotalCount |
integer |
The total number of scheduled tasks. |
1 |
Examples
Success response
JSON format
{
"PageNumber": 1,
"PageSize": 50,
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3****",
"ScheduledTasks": {
"ScheduledTask": [
{
"Description": "Test scheduled task.",
"DesiredCapacity": 10,
"LaunchExpirationTime": 600,
"LaunchTime": "2014-08-18T10:52Z",
"MaxValue": 10,
"MinValue": 0,
"RecurrenceEndTime": "2014-08-20T16:55Z",
"RecurrenceType": "Daily",
"RecurrenceValue": "1",
"ScalingGroupId": "asg-bp1bo5tca4m56nap****",
"ScheduledAction": "ari:acs:ess:cn-hangzhou:1406926474****:scalingrule/asr-bp1id5rhu8edp7kd****",
"ScheduledTaskId": "edRtShc57WGXdt8TlPbr****",
"ScheduledTaskName": "scheduled****",
"TaskEnabled": true,
"WarmPoolCapacityOptions": {
"DesiredGroupPreparedCapacity": 5,
"MinCapacity": 0
}
}
]
},
"TotalCount": 1
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.