Querying the Script Execution Task List of a Desktop Pool
Function
Desktop pool script execution task list.
Debugging
You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.
Authorization Information
Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.
- If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
- If you are using identity policy-based authorization, the following identity policy-based permissions are required.
Action
Access Level
Resource Type (*: required)
Condition Key
Alias
Dependencies
workspace:desktopPools:listScriptTasks
List
desktopPool *
-
-
-
URI
GET /v2/{project_id}/desktop-pools/script-execution-tasks/detail
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Project ID. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
desktop_pool_id |
No |
String |
Desktop pool ID. |
|
script_id |
No |
String |
Script ID. |
|
script_name |
No |
String |
Script name. |
|
status |
No |
String |
Execution status. The value can be SUCCESS (execution succeeded), FAILED (execution failed), RUNNING (being executed), or WAITING (waiting for execution). |
|
task_type |
No |
String |
Type of the task to be queried. SCRIPT and COMMAND are supported. |
|
offset |
No |
Integer |
Where the pagination query starts. The value starts from 0. |
|
limit |
No |
Integer |
Maximum number of desktops that can be returned in a pagination query. The value ranges from 0 to 100. The default value is 10. |
|
execute_time_start |
No |
String |
Start time of the query by execution time. If this parameter is specified, all task records after this time are returned. A time example is 2021-10-01T12:00:00Z. |
|
execute_time_end |
No |
String |
End time of the query by execution time. If this parameter is specified, all task records before this time are returned. A time example is 2021-10-01T12:00:00Z. |
|
task_id |
No |
Array of strings |
Task ID. |
Request Parameters
None
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
script_execution_tasks |
Array of ScriptExecutionTask objects |
Script execution task list. |
|
total_count |
Integer |
Total number. |
|
Parameter |
Type |
Description |
|---|---|---|
|
id |
String |
Task ID. |
|
desktop_pool_id |
String |
Desktop pool ID. |
|
desktop_pool_name |
String |
Desktop pool name. |
|
scripts |
Array of Script objects |
Script information list. |
|
command_content |
String |
Indicates the command to be executed. |
|
command_type |
String |
Indicates the command line type. |
|
start_time |
String |
Task start time in the "yyyy-MM-ddTHH:mm:ssZ" format. |
|
end_time |
String |
Task end time in the "yyyy-MM-ddTHH:mm:ssZ" format. |
|
status |
String |
Task status. The value can be: |
|
success_num |
Integer |
Number of successes. |
|
failed_num |
Integer |
Number of failures. |
|
skip_num |
Integer |
Number of skips. |
Status code: 400
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code, which is returned upon failure. |
|
error_msg |
String |
Error message. |
|
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: 401
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code, which is returned upon failure. |
|
error_msg |
String |
Error message. |
|
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: 403
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code, which is returned upon failure. |
|
error_msg |
String |
Error message. |
|
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: 404
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code, which is returned upon failure. |
|
error_msg |
String |
Error message. |
|
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 message. |
|
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
GET /v2/0bec5db98280d2d02fd6c00c2de791ce/desktops-pools/script-execution-tasks/detail
Example Responses
Status code: 200
Normal.
{
"script_execution_tasks" : [ {
"id" : "string",
"desktop_pool_id" : "string",
"desktop_pool_name" : "string",
"scripts" : [ {
"id" : "string",
"name" : "string"
} ],
"command_content" : "string",
"command_type" : "string",
"start_time" : "string",
"end_time" : "string",
"status" : "string",
"success_num" : 0,
"failed_num" : 0,
"skip_num" : 0
} ],
"total_count" : 0
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
Normal. |
|
400 |
The request cannot be understood by the server due to malformed syntax. |
|
401 |
Authentication failed. |
|
403 |
No operation permissions. |
|
404 |
No resources found. |
|
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