Creates or modifies scheduled tasks on cloud computers, such as starting, stopping, restarting, and resetting cloud computers on schedule.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ecd:ModifyDesktopTimer |
update |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
The region ID. You can call the DescribeRegions operation to query the most recent region list. |
cn-hangzhou |
| DesktopId |
array |
Yes |
The IDs of the cloud computers. |
|
|
string |
No |
The ID of a cloud computer. |
ecd-asuk39x45qnjp**** |
|
| DesktopTimers |
array<object> |
No |
The details of the scheduled task on cloud computers. |
|
|
object |
No |
|||
| TimerType |
string |
No |
The type of the scheduled task. Valid values:
Valid values:
|
TimerBoot |
| CronExpression |
string |
No |
The cron expression of the schedule. Note
The time must be in UTC. For example, for 24:00 (UTC+8), you must set the value to 0 0 16 ? * 1,2,3,4,5,6,7 |
0 0 16 ? * 1,2,3,4,5,6,7 |
| Interval |
integer |
No |
The interval at which the scheduled task is executed. Unit: minutes. |
10 |
| Enforce |
boolean |
No |
Specifies whether to forcibly execute the scheduled task. Valid values:
Valid values:
|
true |
| ResetType |
string |
No |
The reset type of the cloud computers. Valid values:
Valid values:
|
RESET_TYPE_SYSTEM |
| AllowClientSetting |
boolean |
No |
Specifies whether to allow end users to configure the scheduled task. |
true |
| OperationType |
string |
No |
The operations that scheduled tasks support. This parameter is valid only when TimerType is set to NoConnect. Valid values:
Valid values:
|
Shutdown |
| UseDesktopTimers |
boolean |
No |
Specifies whether to use the |
true |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| DesktopIds |
array |
The IDs of the cloud computers for which you successfully configure the scheduled task. |
|
|
string |
The ID of the cloud computer for which you successfully configure the scheduled task. |
['ecd-c6u0eis7rnqfw****'] |
|
| RequestId |
string |
The request ID. |
4638719F-3CAB-5704-BD54-55617BFF**** |
Examples
Success response
JSON format
{
"DesktopIds": [
"['ecd-c6u0eis7rnqfw****']"
],
"RequestId": "4638719F-3CAB-5704-BD54-55617BFF****"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.