List of Future Execution Time
Function
List of future execution time.
Debugging
You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.
URI
POST /v2/{project_id}/scheduled-tasks/future-executions
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
No |
String |
User token. It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
scheduled_type |
No |
String |
Execution period type. The options are as follows:
|
day_interval |
No |
Integer |
If the period is by day, the task is executed at an interval of x days. |
week_list |
No |
String |
When this parameter is set to WEEK, the value ranges from 1 to 7, corresponding to Sunday to Saturday, respectively. The values are separated by commas (,), for example, 1,2,7. |
month_list |
No |
String |
If the period is by month, the value ranges from 1 to 12. Multiple values are separated by commas (,), for example, 1,3,12. |
date_list |
No |
String |
If the period is by month, the value ranges from 1 to 31 and L (indicating the last day of the current month). The values are separated by commas (,), for example, 1,2,28,L. |
scheduled_date |
No |
String |
If the period is specified, the value is a specified date in yyyy-MM-dd. |
scheduled_time |
No |
String |
Specified execution time. The format is HH:mm:ss. |
expire_time |
No |
String |
Expiration time in yyyy-MM-dd HH:mm:ss. |
gray_count |
No |
Integer |
Number of gray objects. The priority is higher than that of gray_desktop_ids. Only script execution is supported. |
gray_desktop_ids |
No |
Array of strings |
Specifies the desktop ID list for gray execution. The priority of this parameter is lower than that of gray_count. Only script execution is supported. |
gray_fail_threshold |
No |
Integer |
Gray failure threshold. When the number of gray execution failures reaches the value of this parameter, the next batch of tasks are not executed. Only script execution is supported. |
life_cycle_type |
No |
String |
Triggering condition. The value can be POST_CREATE_DESKTOP_SUCCESS (after the desktop is created), POST_REBUILD_DESKTOP_SUCCESS (after the desktop is rebuilt), POST_REATTACH_DESKTOP_SUCCESS (after the desktop assignment task for triggering the rebuilding is successfully executed), or POST_DESKTOP_DISCONNECTED (after the desktop is disconnected). |
time_zone |
No |
String |
Time zone. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
future_executions |
Array of strings |
List of future execution time. |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code, which is returned upon failure. |
error_msg |
String |
Error description. |
error_detail |
String |
Error details. |
encoded_authorization_message |
String |
Encrypted detailed reason for rejection. You can call the API decode-authorization-message of STS to decrypt the reason. |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code, which is returned upon failure. |
error_msg |
String |
Error description. |
error_detail |
String |
Error details. |
encoded_authorization_message |
String |
Encrypted detailed reason for rejection. You can call the API decode-authorization-message of STS to decrypt the reason. |
Example Requests
{ "scheduled_type" : "FIXED_TIME", "day_interval" : 1, "week_list" : "1,2,7", "month_list" : "1,3,12", "date_list" : "1,2,28,L", "scheduled_date" : "2022-12-23", "scheduled_time" : "09:00:00", "expire_time" : "2022-12-31 09:00:00", "gray_count" : 1000, "gray_desktop_ids" : [ "string" ], "gray_fail_threshold" : 1000, "life_cycle_type" : "string", "time_zone" : "Asia/Shanghai" }
Example Responses
Status code: 200
Normal.
{ "future_executions" : [ "string" ] }
Status Codes
Status Code |
Description |
---|---|
200 |
Normal. |
400 |
The request cannot be understood by the server due to malformed syntax. |
500 |
An internal service error occurred. For details about the error code, see the error code description. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot