All Products
Search
Document Center

Cloud Phone:DescribeTasks

Last Updated:Aug 28, 2025

Queries the list of tasks for Elastic Cloud Phone (ECP) instances. Many operations on ECP instances, such as creation, startup, and shutdown, are asynchronous. The system generates a task ID for each operation. You can use the task ID to query the progress and result of an operation. You can also call this API operation to query a list of all tasks and their execution status.

Operation description

  • You can call the DescribeTasks operation to query the status of an operation on a single ECP instance or on multiple ECP instances in a batch.

  • This operation supports querying tasks for operations such as starting, stopping, restarting, resetting, backing up or restoring instances, installing applications, and running remote commands.

  • The Level field indicates the task level. If Level is 1, the task is a batch task. If Level is 2, the task is an instance-level task.

Example:

For example, assume you restart two ECP instances with the IDs acp-25nt4kk9whhok**** and acp-j2taq887orj8l****. The request ID returned for this operation is B8ED2BA9-0C6A-5643-818F-B5D60A64****. To query the result of this batch operation, call DescribeTasks and set InvokeId to B8ED2BA9-0C6A-5643-818F-B5D60A64****. To retrieve the restart result for the instance with the ID acp-25nt4kk9whhok****, call DescribeTasks with ParentTaskId set to the batch task ID and InstanceId set to acp-25nt4kk9whhok****.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request parameters

Parameter

Type

Required

Description

Example

InvokeId

string

No

The ID of the command execution. You can use the request ID that was returned from the previous operation.

B8ED2BA9-0C6A-5643-818F-B5D60A64****

ResourceIds

array

No

The list of resource IDs.

string

No

The resource ID. If you query the status of a task to start, stop, restart, or reset a cloud phone, use the instance ID for this parameter.

acp-25nt4kk9whhok****

TaskIds

array

No

The list of task IDs.

string

No

The task ID.

t-bp67acfmxazb4p****

ParentTaskId

string

No

The parent task ID.

t-iaej5dkbnmivx****

TaskType

string

No

The task type.

StartInstance

TaskTypes

array

No

The list of task types.

string

No

The task type.

StartInstance

TaskStatus

string

No

The task status.

Processing

TaskStatuses

array

No

The list of task statuses.

string

No

The task status.

Finished

Level

integer

No

The task level. Set the value to 1 for a batch task or 2 for an instance-level task.

1

InstanceId

string

No

The instance ID.

acp-2zecay9ponatdc4m****

InstanceName

string

No

The instance name.

defaultInstanceName

Param

string

No

The extension field.

param

MaxResults

integer

No

The maximum number of entries per page. Valid values: 1 to 100. Default value: 10.

10

NextToken

string

No

The token that is used to retrieve the next page of results. Leave this parameter empty to retrieve the first page of results.

FFbc8N4E1iOlcSxC+8boa0HHH2LKWbggYUinyrZWvtS1oTrMYCg1HuMLGuftj0****

Response elements

Element

Type

Description

Example

object

The response parameters.

NextToken

string

The position where the query starts. If this parameter is left empty, the query starts from the beginning.

AAAAAV3MpHK1AP0pfERHZN5pu6kU+SQXzm0H9mu/FiSc****

Data

array<object>

A list of result objects.

object

A result object.

TaskId

string

The task ID.

t-bp67acfmxazb4p****

InvokeId

string

The command execution ID.

B8ED2BA9-0C6A-5643-818F-B5D60A64****

RegionId

string

The region ID.

cn-hangzhou

ResourceId

string

The resource ID.

acp-25nt4kk9whhok****

TaskType

string

The task type.

StartInstance

TaskStatus

string

The task status.

Processing

StartTime

string

The time when the task started.

2022-10-11T08:53:32Z

FinishTime

string

The time when the task ended.

2022-10-11T08:53:32Z

Param

string

The task parameters.

param

Result

string

The task execution result.

{'Success': True}

ErrorCode

string

The error code.

SendFileFailed

ErrorMsg

string

The error message.

connect error.

Level

integer

The task level.

1

FailedChildCount

integer

The total number of failed subtasks.

2

SuccessChildCount

integer

The total number of successful subtasks.

98

RunningChildCount

integer

The total number of running subtasks.

0

TotalChildCount

integer

The total number of subtasks for the current batch task.

100

InstanceId

string

The instance ID.

acp-uto81vfd8t8z****

InstanceName

string

The instance name.

defaultInstanceName

InstanceStatus

string

The instance status.

RUNNING

Operator

string

The operator.

test

ParentTaskId

string

The parent task ID.

t-41oan3tza16vs****

TotalCount

integer

The total number of entries.

10

RequestId

string

The request ID.

B8ED2BA9-0C6A-5643-818F-B5D60A64****

Examples

Success response

JSON format

{
  "NextToken": "AAAAAV3MpHK1AP0pfERHZN5pu6kU+SQXzm0H9mu/FiSc****",
  "Data": [
    {
      "TaskId": "t-bp67acfmxazb4p****",
      "InvokeId": "B8ED2BA9-0C6A-5643-818F-B5D60A64****",
      "RegionId": "cn-hangzhou",
      "ResourceId": "acp-25nt4kk9whhok****",
      "TaskType": "StartInstance",
      "TaskStatus": "Processing",
      "StartTime": "2022-10-11T08:53:32Z",
      "FinishTime": "2022-10-11T08:53:32Z",
      "Param": "param",
      "Result": "{'Success': True}",
      "ErrorCode": "SendFileFailed",
      "ErrorMsg": "connect error.",
      "Level": 1,
      "FailedChildCount": 2,
      "SuccessChildCount": 98,
      "RunningChildCount": 0,
      "TotalChildCount": 100,
      "InstanceId": "acp-uto81vfd8t8z****",
      "InstanceName": "defaultInstanceName",
      "InstanceStatus": "RUNNING",
      "Operator": "test",
      "ParentTaskId": "t-41oan3tza16vs****"
    }
  ],
  "TotalCount": 10,
  "RequestId": "B8ED2BA9-0C6A-5643-818F-B5D60A64****"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.