All Products
Search
Document Center

Elastic Desktop Service:DescribeInvocations

Last Updated:Aug 10, 2026

Queries the execution list and status of Cloud Assistant scripts.

Operation description

  • After you run a command, it does not necessarily succeed or produce the expected results. Check the actual execution results based on the response values returned by this operation.

  • You can query execution information from the last two weeks. A maximum of 100,000 execution records are retained.

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

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

ecd:DescribeInvocations

get

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

Yes

The region ID. You can call DescribeRegions to query the regions supported by Elastic Desktop Service.

cn-hangzhou

InvokeId

string

No

The execution ID of the script process. Obtained from the response of RunCommand.

t-hz0jdfwd9f****

CommandType

string

No

The command type of the O&M script.

Valid values:

  • RunPowerShellScript :

    runs a PowerShell script.

  • RunBatScript :

    runs a Bat script.

RunPowerShellScript

InvokeStatus

string

No

The overall execution status of the script. The overall execution status depends on the combined execution status of one or more cloud desktops in the execution.

Valid values:

  • Finished :

    All cloud desktops have completed execution, or the script process on some cloud desktops was manually stopped while the remaining cloud desktops completed execution.

  • Stopped :

    Script execution has been stopped.

  • Failed :

    All cloud desktops failed to execute the script.

  • Running :

    The overall execution status is Running if at least one script process is in progress. [Default value]

  • PartialFailed :

    The overall execution status is PartialFailed if some cloud desktops have failed script processes.

Finished

DesktopId

string

No

The cloud desktop ID. If you specify a cloud desktop, all script execution records of the cloud desktop are queried.

ecd-7w78ozhjcwa3u****

IncludeOutput

boolean

No

Specifies whether to return the output information of the script execution in the results.

Valid values:

  • true :

    returned.

  • false :

    not returned [Default value]

false

ContentEncoding

string

No

The encoding method of the returned data.

Valid values:

  • Base64 :

    returns the script content and output information in Base64 encoding [Default value]

  • PlainText :

    returns the original script content and output information.

PlainText

MaxResults

integer

No

The number of entries per page for a paged query.

  • Maximum value: 50.

  • Default value: 10.

10

NextToken

string

No

The pagination token. Set this parameter to the NextToken value returned in the previous API call.

AAAAAV3MpHK1AP0pfERHZN5pu6nmB7qrRFJ8vmttjxPL****

EndUserId

string

No

The user ID.

alice

DesktopIds

array

No

The list of cloud desktop IDs.

Note

The DesktopId parameter will be deprecated. Use this parameter to pass the list of cloud desktop IDs.

string

No

The cloud desktop ID.

ecd-84mztzatmipf2****

IncludeInvokeDesktops

boolean

No

Specifies whether to return the execution results of all cloud desktops when the remote command is executed on multiple cloud desktops.

Valid values:

  • true :

    returned.

  • false :

    not returned.

Response elements

Element

Type

Description

Example

object

The response object.

NextToken

string

The pagination token returned in this call.

AAAAAV3MpHK1AP0pfERHZN5pu6nmB7qrRFJ8vmttjxPL****

RequestId

string

The request ID.

473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E

Invocations

array<object>

The array of script execution records.

array<object>

The script execution record object.

InvokeId

string

The execution ID.

t-hz0jdfwd9f****

CommandContent

string

The script content, transmitted in Base64 encoding.

cnBtIC1xYSB8IGdyZXAgdnNm****

CommandType

string

The script type.

RunPowerShellScript

InvocationStatus

string

The overall execution status of the script. The overall execution status depends on the combined execution status of all cloud desktops in this call. Valid values:

  • Pending: The system is validating or sending the command. The overall execution status is Pending if at least one cloud desktop has a script execution status of Pending.

  • Running: The command is running on the cloud desktop. The overall execution status is Running if at least one cloud desktop has a script execution status of Running.

  • Success: The overall execution status is Success if the script execution status on each cloud desktop is Stopped or Success, and at least one cloud desktop has a script execution status of Success.

  • Failed: The overall execution status is Failed if the script execution status on each cloud desktop is Stopped or Failed. The return value is Failed when one or more of the following statuses occur on a cloud desktop:
    • Command validation failed (Invalid)

    • Command delivery failed (Aborted)

    • Command execution completed with a non-zero exit code (Failed)

    • Command execution timed out (Timeout)

    • Command execution encountered an exception (Error)

  • Stopping: The task is being stopped. The overall execution status is Stopping if at least one instance has a script execution status of Stopping.

  • Stopped: The task has been stopped. The overall execution status is Stopped if the script execution status on all instances is Stopped. The return value is Stopped when the script execution status on an instance is one of the following:
    • Task cancelled (Cancelled)

    • Task terminated (Terminated)

  • PartialFailed: The overall execution status is PartialFailed if some instances succeeded and some instances failed. The overall execution status is PartialFailed if the script execution status on each instance is Success, Failed, or Stopped.

Pending

CreationTime

string

The creation time of the task.

2020-12-19T09:15:46Z

EndUserId

string

The end user ID.

User1

InvokeDesktops

array<object>

The list of target cloud desktops for execution.

object

The target cloud desktop for execution.

InvocationStatus

string

The script execution status on a single cloud desktop.

Success

Output

string

The output of the script process.

  • If the request parameter IncludeOutput is set to false, Output is not returned.

  • If the request parameter ContentEncoding is set to Base64, Output is the Base64-encoded output.

OutPutTestmsg

CreationTime

string

The creation time of the script process.

2020-12-20T06:15:54Z

UpdateTime

string

The update time of the task status.

2020-12-25T06:15:56Z

Repeats

integer

The number of times the command was run on the cloud desktop.

0

DesktopId

string

The cloud desktop ID.

ecd-7w78ozhjcwa3u****

Dropped

integer

The length of the truncated and discarded text after the text length in the Output field exceeds 24 KB.

0

StartTime

string

The time when the script process started running on the cloud desktop.

2020-12-20T06:15:55Z

StopTime

string

The time when execution was stopped, if StopInvocation was called.

2020-12-25T09:15:47Z

FinishTime

string

The end time of the script process.

2020-12-20T06:15:56Z

ExitCode

integer

The exit code of the script process.

0

ErrorCode

string

The error code for the command delivery failure or execution failure. Valid values:

  • Empty: The command ran normally.

  • InstanceNotExists: The specified cloud desktop does not exist or has been released.

  • InstanceReleased: The cloud desktop was released during task execution.

  • InstanceNotRunning: The cloud desktop was not running when the task was created.

  • CommandNotApplicable: The command is not applicable to the specified cloud desktop.

  • ClientNotRunning: The Cloud Assistant client is not running.

  • ClientNotResponse: The Cloud Assistant client is not responding.

  • ClientIsUpgrading: The Cloud Assistant client is being upgraded.

  • ClientNeedUpgrade: The Cloud Assistant client needs to be upgraded.

  • DeliveryTimeout: Command delivery timed out.

  • ExecutionTimeout: Command execution timed out.

  • ExecutionException: An exception occurred during command execution.

  • ExecutionInterrupted: Command execution was interrupted.

  • ExitCodeNonzero: Command execution completed with a non-zero exit code.

InstanceNotExists

ErrorInfo

string

The detailed information about the command delivery failure or execution failure. Valid values:

  • Empty: The command ran normally.

  • the specified instance does not exists: The specified cloud desktop does not exist or has been released.

  • the instance has released when create task: The cloud desktop was released during task execution.

  • the instance is not running when create task: The cloud desktop was not running when the task was created.

  • the command is not applicable: The command is not applicable to the specified cloud desktop.

  • the aliyun service is not running on the instance: The Cloud Assistant client is not running.

  • the aliyun service in the instance does not response: The Cloud Assistant client is not responding.

  • the aliyun service in the instance is upgrading now: The Cloud Assistant client is being upgraded.

  • the aliyun service in the instance need upgrade: The Cloud Assistant client needs to be upgraded.

  • the command delivery has been timeout: Command delivery timed out.

  • the command execution has been timeout: Command execution timed out.

  • the command execution got an exception: An exception occurred during command execution.

  • the command execution has been interrupted: Command execution was interrupted.

  • the command execution exit code is not zero: Command execution completed with a non-zero exit code.

The specified instance does not exist.

DesktopName

string

The cloud desktop name.

demo1234

JvsAgentId

string

jvs-7xjos2l****

InvokeDesktopCount

integer

The total number of cloud desktops on which the script was executed.

1

InvokeDesktopSucceedCount

integer

The total number of cloud desktops on which the script was executed successfully.

1

DesktopScenario

string

The cloud desktop scenario. Valid values:

  • Classic: the classic cloud desktop scenario.

  • JvsClaw: the JVS Claw cloud desktop scenario.

Classic

Examples

Success response

JSON format

{
  "NextToken": "AAAAAV3MpHK1AP0pfERHZN5pu6nmB7qrRFJ8vmttjxPL****",
  "RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E",
  "Invocations": [
    {
      "InvokeId": "t-hz0jdfwd9f****",
      "CommandContent": "cnBtIC1xYSB8IGdyZXAgdnNm****",
      "CommandType": "RunPowerShellScript",
      "InvocationStatus": "Pending",
      "CreationTime": "2020-12-19T09:15:46Z",
      "EndUserId": "User1",
      "InvokeDesktops": [
        {
          "InvocationStatus": "Success",
          "Output": "OutPutTestmsg",
          "CreationTime": "2020-12-20T06:15:54Z",
          "UpdateTime": "2020-12-25T06:15:56Z",
          "Repeats": 0,
          "DesktopId": "ecd-7w78ozhjcwa3u****",
          "Dropped": 0,
          "StartTime": "2020-12-20T06:15:55Z",
          "StopTime": "2020-12-25T09:15:47Z",
          "FinishTime": "2020-12-20T06:15:56Z",
          "ExitCode": 0,
          "ErrorCode": "InstanceNotExists",
          "ErrorInfo": "The specified instance does not exist.",
          "DesktopName": "demo1234",
          "JvsAgentId": "jvs-7xjos2l****"
        }
      ],
      "InvokeDesktopCount": 1,
      "InvokeDesktopSucceedCount": 1,
      "DesktopScenario": "Classic"
    }
  ]
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.