Queries information about tasks, such as task progress and task names.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
hcs-sgw:DescribeTasks |
get |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| TargetId |
string |
Yes |
The ID of the gateway or express synchronization group. |
sync-0001xv757xl9sn548*** |
| PageNumber |
integer |
No |
The page number.
|
1 |
| PageSize |
integer |
No |
The number of entries per page.
|
10 |
| TaskId |
string |
No |
The task ID. If you leave this parameter empty, all tasks are queried. |
t-0001xv7je357xl9n*** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| TotalCount |
integer |
The total number of tasks. |
1 |
| Tasks |
object |
||
| SimpleTask |
array<object> |
The task information. |
|
|
object |
|||
| StateCode |
string |
The status code of the task. Valid values:
|
task.state.completed |
| Progress |
integer |
The task progress, in percentage. |
100 |
| UpdatedTime |
integer |
The timestamp when the task was last updated. Unit: seconds. |
1578367230 |
| MessageKey |
string |
The error message returned. |
xxx |
| Name |
string |
The task name. |
task.name.operate_fast_sync.delete |
| CreatedTime |
integer |
The timestamp when the task was created. Unit: seconds. |
1578367229 |
| TaskId |
string |
The task ID. |
t-0001xv7je357xl9n*** |
| RelatedResourceId |
string |
The ID of the associated resource. |
NFSnfstest |
| RequestId |
string |
The request ID. |
8E9C6D43-4603-4F05-BE76-677A05EDFB7A |
| Message |
string |
The response message. |
successful |
| PageSize |
integer |
The number of entries per page. |
10 |
| PageNumber |
integer |
The page number. |
1 |
| Code |
string |
The HTTP status code. A value of 200 indicates that the request was successful. |
200 |
| Success |
boolean |
Indicates whether the request is successful. |
true |
Examples
Success response
JSON format
{
"TotalCount": 1,
"Tasks": {
"SimpleTask": [
{
"StateCode": "task.state.completed",
"Progress": 100,
"UpdatedTime": 1578367230,
"MessageKey": "xxx",
"Name": "task.name.operate_fast_sync.delete",
"CreatedTime": 1578367229,
"TaskId": "t-0001xv7je357xl9n***",
"RelatedResourceId": "NFSnfstest"
}
]
},
"RequestId": "8E9C6D43-4603-4F05-BE76-677A05EDFB7A",
"Message": "successful",
"PageSize": 10,
"PageNumber": 1,
"Code": "200",
"Success": true
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | EmptyTargetId | You must enter a valid ID for the target gateway. | You must enter a valid ID for the target gateway. |
| 400 | BadPageSize | The specified number of pages is invalid. The number ranges from 1 to 50. | The specified number of pages is invalid. The number ranges from 1 to 50. |
| 400 | BadPageNumber | The specified page number is invalid. The page number must be greater than 0. | The specified page number is invalid. The page number must be greater than 0. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.