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 invocation ID.

t-cd03crwys0lrls0

NodeId

string

No

The instance ID.

e01-cn-zvp2tgykr08

IncludeOutput

boolean

No

Specifies whether to return the output of the command execution in the result. Valid values:

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

  • false: Does not return the output. This is the default value.

true

ContentEncoding

string

No

Specifies the encoding method for the CommandContent and Output fields in the returned data. Valid values:

  • PlainText: Returns the original command content and output.

  • Base64: Returns the Base64-encoded command content and output. This is the default value.

PlainText

Response elements

Element

Type

Description

Example

object

RequestId

string

The request ID.

4FD06DF0-9167-5C6F-A145-F30CA4A15D54

Invocations

object

The invocation records.

Invocation

array<object>

The file delivery records.

array<object>

CreationTime

string

The time when the task was created. The time follows the ISO 8601 standard, and Z in the example indicates UTC.

2020-01-19T09:15:46Z

Frequency

string

The execution time of scheduled commands.

0 */20 * * * *

InvocationStatus

string

The overall execution status of the command. The overall execution status depends on the combined execution status of all instances involved in the invocation. Valid values:

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

  • Scheduled: The scheduled command has been sent and is waiting to be executed. If the execution status of at least one instance is Scheduled, the overall execution status is Scheduled.

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

  • Success: The execution status of all instances is Stopped or Success, and the execution status of at least one instance is Success.
    • For tasks that run immediately: The command execution is complete, and the exit code is 0.

    • For scheduled tasks: The most recent execution was successful with an exit code of 0, and all specified execution times have elapsed.

  • Failed: The execution status of all instances is Stopped or Failed. The overall execution status is Failed if the execution status of one or more instances is any of the following:
    • Invalid: Command verification failed.

    • Aborted: Command sending failed.

    • Failed: Command execution is complete, but the exit code is not 0.

    • Timeout: Command execution timed out.

    • Error: An exception occurred during command execution.

  • Stopping: The task is being stopped. If the execution status of at least one instance is Stopping, the overall execution status is Stopping.

  • Stopped: The task has been stopped. If the execution status of all instances is Stopped, the overall execution status is Stopped. The overall execution status is Stopped if the execution status of one or more instances is any of the following:
    • Cancelled: The task was canceled.

    • Terminated: The task was terminated.

  • PartialFailed: The command execution succeeded on some instances and failed on others. If the execution status of all instances is Success, Failed, or Stopped, the overall execution status is PartialFailed.

Note

The InvokeStatus response parameter has a similar meaning to this parameter, but we recommend that you check this return value.

Success

RepeatMode

string

The execution mode of the command. Valid values:

  • Once: Executes the command immediately.

  • 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 combined execution status of one or more instances in the invocation. Valid values:

  • Running:
    • Scheduled execution: The execution status remains Running until the scheduled command is manually stopped.

    • One-time execution: The overall execution status is Running as long as there is an ongoing command process.

  • Finished:
    • Scheduled execution: The command process cannot be Finished.

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

  • Failed:
    • Scheduled execution: The command process cannot be Failed.

    • One-time execution: The execution failed on all instances.

  • Stopped: The command is stopped.

  • Stopping: The command is being stopped.

  • PartialFailed: The execution partially failed. 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 invocation ID.

t-ind3k9ytvvduoe8

Username

string

The username of the user who executes the command.

root

WorkingDir

string

The working directory of the command on the instance.

/home

Timeout

integer

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

60

InvokeNodes

object

The command execution records.

InvokeNode

array<object>

The command execution records of the node.

object

CreationTime

string

The start time of the command execution. The time follows the ISO 8601 standard, and Z in the example indicates UTC.

2023-02-06T07:12:50Z

UpdateTime

string

The update time. The time follows the ISO 8601 standard, and Z in the example indicates UTC.

2023-02-06T07:12:50Z

FinishTime

string

The completion time. The time follows the ISO 8601 standard, and 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 verifying or sending the command.

  • Invalid: The specified command type or parameter is invalid.

  • Aborted: Failed to send the command to the instance. The instance must be in the Running state, and the command must be sent within 1 minute.

  • Running: The command is running on the instance.

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

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

  • Failed:
    • One-time execution: The command execution is complete, but the exit code is not 0.

    • Scheduled execution: The previous execution completed with a non-zero exit code, and the specified schedule will be terminated.

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

  • Timeout: The command execution timed out.

  • Cancelled: The command execution was canceled before it started.

  • Stopping: The task is being stopped.

  • Terminated: The command was terminated while running.

  • Scheduled:
    • One-time execution: Not applicable. This status does not appear.

    • Scheduled execution: Waiting to be executed.

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 total number of executions.

0

NodeId

string

The node ID.

e01-cn-lbj36wkp70b

Output

string

The output of the command.

  • 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 when the text length in the Output field exceeds 24 KB.

0

StopTime

string

The time when the StopInvocation operation was called to stop the command execution. The time follows the ISO 8601 standard, and 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 exit code of the shell process.

  • For Windows instances, the exit code of the batch or PowerShell process.

0

StartTime

string

The start time. The time follows the ISO 8601 standard, and Z in the example indicates UTC.

2019-12-20T06:15:55Z

ErrorInfo

string

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

  • Empty: The command is 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 in the Running state during command execution.

  • 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 cron expression is invalid.

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

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

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

  • the aliyun service in the node need upgrade: 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 is complete, but the exit code is not 0.

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

the specified node does not exists

Timed

string

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

  • true: Queries commands for which the RepeatMode parameter is set to Period, NextRebootOnly, or EveryReboot when calling RunCommand or InvokeCommand.

  • false: Queries commands in the following two states. This is the default value.
    • Commands for which the RepeatMode parameter is set to Once when calling RunCommand or InvokeCommand.

    • Commands that have been canceled, stopped, or completed.

false

ErrorCode

string

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

  • Empty: The file is 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 in the Running state when the file delivery task was created.

  • AccountNotExists: The specified account does not exist.

  • ClientNotRunning: Cloud Assistant Agent is not running.

  • ClientNotResponse: Cloud Assistant Agent is not responding.

  • ClientIsUpgrading: Cloud Assistant Agent is being upgraded.

  • ClientNeedUpgrade: Cloud Assistant Agent needs to be upgraded.

  • DeliveryTimeout: The file delivery timed out.

  • FileCreateFail: 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 specified user group does not exist when sending the file.

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.