DescribeInvocations

Updated at:

Queries the execution list and status of O&M Assistant commands.

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

eflo:DescribeInvocations

get

*Node

acs:eflo:{#regionId}:{#accountId}:node/*

None None

Request parameters

Parameter

Type

Required

Description

Example

InvokeId

string

Yes

The command execution ID.

t-cd03crwys0lrls0

NodeId

string

No

The instance ID.

e01-cn-zvp2tgykr08

IncludeOutput

boolean

No

Specifies whether to return the command output in the results.

  • true: Returns the output. In this case, specify at least the InvokeId or InstanceId parameter.

  • false (default): Does not return the output.

true

ContentEncoding

string

No

The encoding method for the CommandContent and Output fields in the response. Valid values:

  • PlainText: Returns the original command content and output.

  • Base64 (default): Returns the Base64-encoded command content and output.

PlainText

Response elements

Element

Type

Description

Example

object

RequestId

string

The request ID.

4FD06DF0-9167-5C6F-A145-F30CA4A15D54

Invocations

object

The script execution records.

Invocation

array<object>

The file delivery record.

array<object>

CreationTime

string

The time when the task was created. The time is displayed in ISO 8601 format. Z in the example indicates UTC.

2020-01-19T09:15:46Z

Frequency

string

The execution time of the scheduled command.

0 */20 * * * *

InvocationStatus

string

The overall execution status of the command. The overall execution status depends on the common execution status across all instances in this invocation. Valid values:

  • Pending: The system is validating or sending the command. When the command execution status on at least one instance is Pending, the overall execution status is Pending.

  • Scheduled: The scheduled command has been sent and is waiting to run. When the command execution status on at least one instance is Scheduled, the overall execution status is Scheduled.

  • Running: The command is running on the instance. When the command execution status on at least one instance is Running, the overall execution status is Running.

  • Success: The command execution status on each instance is Stopped or Success, and the command execution status on at least one instance is Success. The overall execution status is Success.
    • One-time task: The command execution is complete and the exit code is 0.

    • Scheduled task: The last execution was successful with an exit code of 0, and all specified schedules have been completed.

  • Failed: The command execution status on each instance is Stopped or Failed. The overall execution status is Failed. The return value is Failed when the command execution status on an instance is one or more of the following:
    • 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. When the command execution status on at least one instance is Stopping, the overall execution status is Stopping.

  • Stopped: The task has been stopped. When the command execution status on all instances is Stopped, the overall execution status is Stopped. The return value is Stopped when the command execution status on an instance is one of the following:
    • The task was canceled (Cancelled).

    • The task was terminated (Terminated).

  • PartialFailed: Some instances executed successfully while others failed. When the command execution status on each instance is Success, Failed, or Stopped, the overall execution status is PartialFailed.

Note

The InvokeStatus parameter in the response has a similar meaning, but we recommend that you check this parameter instead.

Success

RepeatMode

string

The execution mode of the command. Valid values:

  • Once: Immediately executes the command.

  • Period: Executes the command on a schedule.

  • NextRebootOnly: Automatically executes the command the next time the instance starts.

  • EveryReboot: Automatically executes the command every time the instance starts.

Once

InvokeStatus

string

The overall execution status of the command. The overall execution status depends on the common execution status of one or more instances in the invocation. Valid values:

  • Running:
    • Scheduled execution: The execution status remains Running until you manually stop the scheduled command.

    • One-time execution: The overall execution status is Running if the command process is running on any instance.

  • Finished:
    • Scheduled execution: The command process cannot have a status of Finished.

    • One-time execution: All instances have completed execution, or the command process was manually stopped on some instances while the remaining instances completed execution.

  • Failed:
    • Scheduled execution: The command process cannot have a status of Failed.

    • One-time execution: All instances failed to execute the command.

  • Stopped: The command was stopped.

  • Stopping: The command is being stopped.

  • PartialFailed: Partial failure. This value does not take effect if the InstanceId parameter is also specified.

Running

Parameters

string

The custom parameters in the command.

{}

CommandContent

string

The command content.

  • If ContentEncoding is set to PlainText, the original script content is returned.

  • If ContentEncoding is set to Base64, the Base64-encoded script content is returned.

cnBtIC1xYSB8IGdyZXAgdnNm****

CommandName

string

The command name.

CommandTestName

CommandDescription

string

The command description.

testDescription

InvokeId

string

The command execution ID.

t-ind3k9ytvvduoe8

Username

string

The username used to execute the command.

root

WorkingDir

string

The working directory of the command on the instance.

/home

Timeout

integer

The timeout period for the command execution. Unit: seconds.

60

InvokeNodes

object

The command execution records.

InvokeNode

array<object>

The command execution record on a node.

object

CreationTime

string

The start time of the command execution. The time is displayed in ISO 8601 format. Z in the example indicates UTC.

2023-02-06T07:12:50Z

UpdateTime

string

The update time. The time is displayed in ISO 8601 format. Z in the example indicates UTC.

2023-02-06T07:12:50Z

FinishTime

string

The completion time. The time is displayed in ISO 8601 format. Z in the example indicates UTC.

2023-02-06T07:12:50Z

InvocationStatus

string

The command execution status on a single instance. Valid values:

  • Pending: The system is validating or sending the command.

  • Invalid: The specified command type or parameters are invalid.

  • Aborted: Failed to send the command to the instance. The instance must be running, and the command must be deliverable within one minute.

  • Running: The command is running on the instance.

  • Success:
    • One-time command: The command execution is complete and the exit code is 0.

    • Scheduled command: The last execution was successful with an exit code of 0, and the specified schedule has ended.

  • Failed:
    • One-time command: The command execution is complete and the exit code is non-zero.

    • Scheduled command: The last execution was successful with a non-zero exit code, and the specified schedule will be aborted.

  • Error: An exception occurred during command execution and the command cannot continue.

  • Timeout: The command execution timed out.

  • Cancelled: The command execution action was canceled and the command was never started.

  • Stopping: The task is being stopped.

  • Terminated: The command was terminated during execution.

  • Scheduled:
    • One-time command: Not applicable. This status does not occur.

    • Scheduled command: Waiting to run.

Pending

Repeats

integer

The number of times the command was executed on the instance.

  • If the execution mode is one-time execution, the value is 0 or 1.

  • If the execution mode is scheduled execution, the value is the number of times the command has been executed.

0

NodeId

string

The node ID.

e01-cn-lbj36wkp70b

Output

string

The command output.

  • If ContentEncoding is set to PlainText, the original output is returned.

  • If ContentEncoding is set to Base64, the Base64-encoded output is returned.

OutPutTestmsg

Dropped

integer

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

0

StopTime

string

The time when StopInvocation was called to stop the command execution. The time is displayed in ISO 8601 format. Z in the example indicates UTC.

2019-12-20T06:15:55Z

ExitCode

integer

The exit code of the command process. Valid values:

  • For Linux instances, the value is the exit code of the Shell process.

  • For Windows instances, the value is the exit code of the Bat or PowerShell process.

0

StartTime

string

The start time. The time is displayed in ISO 8601 format. Z in the example indicates UTC.

2019-12-20T06:15:55Z

ErrorInfo

string

The details of the command delivery failure or execution failure. Valid values:

  • Empty: The command executed normally.

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

  • the node has node when create task: The instance was released during command execution.

  • the node is not running when create task: The instance was not running when the command was executed.

  • the command is not applicable: The command is not applicable to the specified instance.

  • the specified account does not exists: The specified account does not exist.

  • the specified directory does not exists: The specified directory does not exist.

  • the cron job expression is invalid: The specified execution schedule expression is invalid.

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

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

  • the aliyun service in the node is upgrading now: The Cloud Assistant Agent is being upgraded.

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

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

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

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

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

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

  • the specified node has been released: The instance was released during file delivery.

the specified node does not exists

Timed

string

Indicates whether the queried command will be automatically executed in the future. Valid values:

  • true: The command was executed by calling RunCommand or InvokeCommand with the RepeatMode parameter set to Period, NextRebootOnly, or EveryReboot.

  • false (default): The queried command is in one of the following states:
    • The command was executed by calling RunCommand or InvokeCommand with the RepeatMode parameter set to Once.

    • The command has been canceled, stopped, or has completed execution.

false

ErrorCode

string

The error code for the file delivery failure. Valid values:

  • Empty: The file was delivered normally.

  • NodeNotExists: The specified instance does not exist or has been released.

  • NodeReleased: The instance was released during file delivery.

  • NodeNotRunning: The instance was not running when the file delivery task was created.

  • AccountNotExists: The specified account does not exist.

  • ClientNotRunning: The Cloud Assistant Agent is not running.

  • ClientNotResponse: The Cloud Assistant Agent is not responding.

  • ClientIsUpgrading: The Cloud Assistant Agent is being upgraded.

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

  • DeliveryTimeout: The file delivery timed out.

  • FileCreateFail: The file creation failed.

  • FileAlreadyExists: A file with the same name already exists in the same path.

  • FileContentInvalid: The file content is invalid.

  • FileNameInvalid: The file name is invalid.

  • FilePathInvalid: The file path is invalid.

  • FileAuthorityInvalid: The file permissions are invalid.

  • UserGroupNotExists: The user group specified during file delivery does not exist.

NodeNotExists

NodeInvokeStatus

string

The command execution status on a single instance.

Finished

Examples

Success response

JSON format

{
  "RequestId": "4FD06DF0-9167-5C6F-A145-F30CA4A15D54",
  "Invocations": {
    "Invocation": [
      {
        "CreationTime": "2020-01-19T09:15:46Z",
        "Frequency": "0 */20 * * * *",
        "InvocationStatus": "Success",
        "RepeatMode": "Once",
        "InvokeStatus": "Running",
        "Parameters": "{}",
        "CommandContent": "cnBtIC1xYSB8IGdyZXAgdnNm****",
        "CommandName": "CommandTestName",
        "CommandDescription": "testDescription",
        "InvokeId": "t-ind3k9ytvvduoe8",
        "Username": "root",
        "WorkingDir": "/home",
        "Timeout": 60,
        "InvokeNodes": {
          "InvokeNode": [
            {
              "CreationTime": "2023-02-06T07:12:50Z",
              "UpdateTime": "2023-02-06T07:12:50Z",
              "FinishTime": "2023-02-06T07:12:50Z",
              "InvocationStatus": "Pending",
              "Repeats": 0,
              "NodeId": "e01-cn-lbj36wkp70b",
              "Output": "OutPutTestmsg",
              "Dropped": 0,
              "StopTime": "2019-12-20T06:15:55Z\t\n",
              "ExitCode": 0,
              "StartTime": "2019-12-20T06:15:55Z",
              "ErrorInfo": "the specified node does not exists",
              "Timed": "false",
              "ErrorCode": " NodeNotExists",
              "NodeInvokeStatus": "Finished"
            }
          ]
        }
      }
    ]
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.