All Products
Search
Document Center

WUYING Workspace:DescribeInvocations

Last Updated:Apr 03, 2024

Operation description

  • After you run a command, it may not succeed. You can call this operation to query the execution result.
  • You can query the information about execution in the last two weeks. A maximum of 100,000 lines of execution information can be retained.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The ID of the region.

cn-hangzhou
InvokeIdstringNo

The ID of the execution.

t-hz0jdfwd9f****
CommandTypestringNo

The type of the command. Valid values:

  • RunBatScript
  • RunPowerShellScript
RunPowerShellScript
InvokeStatusstringNo

The overall execution status of a command. The overall execution status is determined by the execution status of the command on one or more cloud desktops. Valid values:

  • Running: The execution is in progress on one or more cloud desktops.
  • Finished: The execution is finished on all cloud desktops, or the execution is manually stopped on some cloud desktops and the execution is finished on others.
  • Failed: The execution failed on all cloud desktops.
  • PartialFailed: The execution failed on some cloud desktops.
  • Stopped: The execution is stopped.

Default value: Running.

Finished
DesktopIdstringNo

The ID of the cloud desktop. If you specify a cloud desktop, all the execution records of Cloud Assistant commands on the cloud desktop are queried.

ecd-7w78ozhjcwa3u****
IncludeOutputbooleanNo

Specifies whether to return command outputs in the response. Valid values:

  • true: returns command outputs.
  • false: does not return command outputs.

Default value: false.

false
ContentEncodingstringNo

The encoding method of the command content and output. Valid values:

  • PlainText
  • Base64

Default value: Base64.

PlainText
MaxResultsintegerNo

The number of entries per page.

  • Valid values: 1 to 50.
  • Default value: 10.
10
NextTokenstringNo

The query token. Set the value to the NextToken value that is returned from the last call to the previous DescribeInvocations operation.

AAAAAV3MpHK1AP0pfERHZN5pu6nmB7qrRFJ8vmttjxPL****
EndUserIdstringNo

The ID of the end user.

test1
DesktopIdsarrayNo

The IDs of the cloud desktops.

stringNo

The ID of the cloud desktop.

ecd-84mztzatmipf2****

Response parameters

ParameterTypeDescriptionExample
object
NextTokenstring

The query token that is returned from this call.

AAAAAV3MpHK1AP0pfERHZN5pu6nmB7qrRFJ8vmttjxPL****
RequestIdstring

The ID of the request.

473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E
Invocationsobject []

Details about execution records of the command.

InvokeIdstring

The ID of the execution.

t-hz0jdfwd9f****
CommandContentstring

The Base64-encoded command content.

cnBtIC1xYSB8IGdyZXAgdnNm****
CommandTypestring

The type of the command.

RunPowerShellScript
InvocationStatusstring

The overall execution status of the command. The overall execution status is determined by the execution status on all involved cloud desktops. The valid values include:

  • Pending: The system is verifying or sending the command. If the execution status on at least one cloud desktop is Pending, the overall execution status is Pending.

  • Running: The execution is in progress on cloud desktops. If the execution status on at least one cloud desktop is Running, the overall execution status is Running.

  • Success: If the execution status on all cloud desktops is Success or Stopped, or the execution status on at least one cloud desktop is Success, the overall execution status is Success.

  • Failed: If the execution status on all cloud desktops is Stopped or Failed, the overall execution status is Failed. If one or more execution status of a cloud desktop is one of the following values, Failed is returned:

    • Invalid: The command is invalid.
    • Aborted: The command fails to be sent.
    • Failed: The command is executed, but the exit code is not 0.
    • Timeout: The command times out.
    • Error: An error occurs in the command.
  • Stopping: The execution is being stopped. If the execution status on at least one cloud desktop is Stopping, the overall execution state is Stopping.

  • Stopped: The execution is stopped. If the execution status on all cloud desktops is Stopped, the overall execution state is Stopped. If the execution status on a cloud desktop is one of the following values, Stopped is returned:

    • Cancelled: The execution is canceled.
    • Terminated: The execution is terminated.
  • PartialFailed: The execution succeeded on some cloud desktops and failed on others. If the execution status on different cloud desktops is Success, Failed, or Stopped, the overall execution state is PartialFailed.

Pending
CreationTimestring

The time when the execution task is created.

2020-12-19T09:15:46Z
EndUserIdstring

The ID of the end user.

User1
InvokeDesktopsobject []

The cloud desktops on which the command is executed.

InvocationStatusstring

The execution status on the cloud desktop.

Success
Outputstring

The command output.

  • If the IncludeOutput parameter is set to false, Output is not returned.
  • If the ContentEncoding parameter is set to Base64, the value of Output is the output information that is encoded in Base64.
OutPutTestmsg
CreationTimestring

The time when the command execution was performed.

2020-12-20T06:15:54Z
UpdateTimestring

The time when the execution status was updated.

2020-12-25T06:15:56Z
Repeatsinteger

The number of times that the command is executed on the cloud desktop.

0
DesktopIdstring

The ID of the cloud desktop.

ecd-7w78ozhjcwa3u****
Droppedinteger

The size of the text that is truncated and discarded when the Output value exceeds 24 KB in size.

0
StartTimestring

The start time of the execution on the cloud desktop.

2020-12-20T06:15:55Z
StopTimestring

The time when you called the StopInvocation operation to manually stop the command.

2020-12-25T09:15:47Z
FinishTimestring

The time when the command execution ended.

2020-12-20T06:15:56Z
ExitCodelong

The exit code of the execution.

0
ErrorCodestring

The code that indicates the reason why a command failed to be sent or executed. The valid values include:

  • If this parameter is empty, the execution is normal.
  • InstanceNotExists: The specified cloud desktop does not exist or is released.
  • InstanceReleased: The cloud desktop is released during the execution.
  • InstanceNotRunning: The cloud desktop is not running during the execution.
  • CommandNotApplicable: The command cannot be used on the cloud desktop.
  • ClientNotRunning: The Cloud Assistant client is not running.
  • ClientNotResponse: The Cloud Assistant client does not respond.
  • ClientIsUpgrading: The Cloud Assistant client is being upgraded.
  • ClientNeedUpgrade: The Cloud Assistant client needs to be upgraded.
  • DeliveryTimeout: The time to send the command in the request times out.
  • ExecutionTimeout: The execution times out.
  • ExecutionException: An exception occurs during the execution.
  • ExecutionInterrupted: The execution is interrupted.
  • ExitCodeNonzero: The execution finishes, but the exit code is not 0.
InstanceNotExists
ErrorInfostring

Details about the reason why the command failed to be sent or executed. The valid values include:

  • If this parameter is empty, the execution is normal.
  • the specified instance does not exists: The cloud desktop does not exist or is released.
  • the instance has released when create task: The cloud desktop is released during execution.
  • the instance is not running when create task: The cloud desktop is not running when the execution is being performed.
  • the command is not applicable: The command cannot be used on the specified cloud desktop.
  • the aliyun service is not running on the instance: The Cloud Assistance 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: The command that is sent in the request times out.
  • the command execution has been timeout: The execution times out.
  • the command execution got an exception: An exception occurs when the command is running.
  • the command execution has been interrupted: The execution is interrupted.
  • the command execution exit code is not zero: The execution finishes, but the exit code is not 0.
The specified instance does not exist.
DesktopNamestring

The name of the cloud desktop.

demo1234

Examples

Sample success responses

JSONformat

{
  "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"
        }
      ]
    }
  ]
}

Error codes

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

Change history

Change timeSummary of changesOperation
2023-05-18The response structure of the API has changedsee changesets
Change itemChange content
Output ParametersThe response structure of the API has changed.
2022-10-18The request parameters of the API has changedsee changesets
Change itemChange content
Input ParametersThe request parameters of the API has changed.
    Added Input Parameters: DesktopIds
2022-09-29The request parameters of the API has changedsee changesets
Change itemChange content
Input ParametersThe request parameters of the API has changed.
    Added Input Parameters: EndUserId