ModifyScheduledTask
Modifies the configuration parameters of an existing scheduled task by specifying the scheduled task ID. Configuration parameters include the scaling rule to execute, the number of instances in the scaling group, the task execution frequency, and the retry policy.
Operation description
Operation description
Scheduled tasks support the following two scaling methods:
Set the scaling rule to execute by using the ScheduledAction parameter.
Set the number of instances in the scaling group by using the ScalingGroupId parameter.
You cannot set both ScheduledAction and ScalingGroupId at the same time.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ess:ModifyScheduledTask |
update |
*ScalingGroup
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ScheduledTaskId |
string |
Yes |
The ID of the scheduled task. |
edRtShc57WGXdt8TlPbr**** |
| ScheduledTaskName |
string |
No |
The name of the scheduled task. The name must be 2 to 64 characters in length and must start with a letter, digit, or Chinese character. It can contain periods (.), underscores (_), and hyphens (-). The name must be unique within the same region and Alibaba Cloud account. |
scheduled**** |
| Description |
string |
No |
The description of the scheduled task. The description must be 2 to 200 characters in length. |
Test scheduled task. |
| ScheduledAction |
string |
No |
The unique identifier of the scaling rule. This parameter is available only when the scaling method is set to execute an existing scaling rule. Select a created scaling rule and enter its unique identifier, which can be viewed on the scaling rule details page. Note
You cannot set both ScheduledAction and ScalingGroupId at the same time. |
ari:acs:ess:cn-hangzhou:14069264****:scalingrule/asr-bp12tcnol686y1ik**** |
| RecurrenceEndTime |
string |
No |
The end time of the scheduled task for recurring execution. Specify the time in the ISO 8601 standard in the YYYY-MM-DDThh:mmZ format. The time must be in UTC. You cannot specify a time that is later than 365 days from the date of modification. |
2014-08-20T16:55Z |
| LaunchTime |
string |
No |
The time at which the scheduled task is executed. Specify the time in the ISO 8601 standard in the YYYY-MM-DDThh:mmZ format. The time must be in UTC. You cannot specify a time that is later than 90 days from the date of modification.
|
2014-08-18T10:52Z |
| RecurrenceType |
string |
No |
The recurrence type of the scheduled task. Scheduled tasks can be executed on a daily, weekly, or monthly basis. Valid values:
After modification, both RecurrenceType and RecurrenceValue must be valid. |
Daily |
| RecurrenceValue |
string |
No |
The recurrence value of the scheduled task.
After modification, both RecurrenceType and RecurrenceValue must be valid. |
2 |
| TaskEnabled |
boolean |
No |
Specifies whether to start the scheduled task. Valid values:
Default value: true. |
true |
| LaunchExpirationTime |
integer |
No |
The retry period during which Auto Scaling continues to attempt to execute the scheduled task after the triggered operation fails. Unit: seconds. Valid values: 0 to 1800. Default value: 600. |
600 |
| MinValue |
integer |
No |
The minimum number of instances in the scaling group. This parameter is valid only when the scaling method of the scheduled task is set to specify the number of instances in the scaling group. |
0 |
| MaxValue |
integer |
No |
The maximum number of instances in the scaling group. This parameter is valid only when the scaling method of the scheduled task is set to specify the number of instances in the scaling group. |
10 |
| DesiredCapacity |
integer |
No |
The expected number of instances in the scaling group. This parameter is valid only when the scaling method of the scheduled task is set to specify the number of instances in the scaling group. Note
The scaling group must support setting the expected number of instances. This means that DesiredCapacity must be specified when the scaling group is created. |
10 |
| ScalingGroupId |
string |
No |
The ID of the scaling group in which you want to modify the number of instances or adjust the warm pool capacity when the scheduled task is triggered. After ScalingGroupId is specified, the scaling method of the scheduled task is set to specify the number of instances in the scaling group or adjust the warm pool capacity.
Note
You cannot set both ScheduledAction and ScalingGroupId at the same time. |
asg-bp18p2yfxow2dloq**** |
| RegionId |
string |
No |
The region ID of the scaling group. |
cn-hangzhou |
| WarmPoolCapacityOptions |
object |
No |
The warm pool capacity configuration of the scaling group. This parameter is valid only when a warm pool is configured for the scaling group. Note
When you set this parameter, you must also set ScalingGroupId. |
|
| DesiredGroupPreparedCapacity |
integer |
No |
The expected number of prepared instances to cover. 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. Default value: the maximum number of instances in the scaling group, which is specified by MaxSize. |
1 |
| MinCapacity |
integer |
No |
The minimum number of instances in the warm pool. The system always retains no less than this number of prepared instances in the warm pool to ensure that scale-out can be quickly performed from the warm pool at any time. Default value: 0. |
0 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3**** |
Examples
Success response
JSON format
{
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3****"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | Throttling | Request was denied due to request throttling. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.