All Products
Search
Document Center

Cloud Storage Gateway:DescribeTasks

Last Updated:Jun 24, 2025

Queries task information, including task progress and name.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • For mandatory resource types, indicate with a prefix of * .
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
hcs-sgw:DescribeTasksget
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
TargetIdstringYes

The ID of the gateway or express synchronization group.

sync-0001xv757xl9sn548***
PageNumberintegerNo

The page number.

  • Page starts from page 1.
  • Default value: 1.
1
PageSizeintegerNo

The number of entries per page.

  • Maximum value: 50.
  • Default value: 10.
10
TaskIdstringNo

The task ID. If you leave the parameter empty, all tasks are queried.

t-0001xv7je357xl9n***

Response parameters

ParameterTypeDescriptionExample
object
TotalCountinteger

The total number of tasks.

1
Tasksarray<object>

The task information.

SimpleTaskobject
StateCodestring

The status code of the task. Valid values:

  • task.state.Initialized
  • task.state.Running
  • task.state.completed
  • task.state.Failed
task.state.completed
Progressinteger

The task progress in percentage.

100
UpdatedTimelong

The timestamp when the task was last modified. Unit: seconds.

1578367230
MessageKeystring

The error message returned.

xxxxxxxxxx
Namestring

The task name.

task.name.operate_fast_sync.delete
CreatedTimelong

The timestamp when the task was created. Unit: seconds.

1578367229
TaskIdstring

The task ID.

t-0001xv7je357xl9n***
RelatedResourceIdstring

The ID of the associated resource.

NFSnfstest
RequestIdstring

The request ID.

8E9C6D43-4603-4F05-BE76-677A05EDFB7A
Messagestring

The returned message.

successful
PageSizeinteger

The number of entries per page.

10
PageNumberinteger

The page number.

1
Codestring

The status code. The status code 200 indicates that the request was successful.

200
Successboolean

Indicates whether the request was successful.

true

Examples

Sample success responses

JSONformat

{
  "TotalCount": 1,
  "Tasks": {
    "SimpleTask": [
      {
        "StateCode": "task.state.completed",
        "Progress": 100,
        "UpdatedTime": 1578367230,
        "MessageKey": "xxxxxxxxxx",
        "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 codeError codeError messageDescription
400EmptyTargetIdYou must enter a valid ID for the target gateway.You must enter a valid ID for the target gateway.
400BadPageSizeThe 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.
400BadPageNumberThe 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.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
No change history