All Products
Search
Document Center

Simple Application Server:DescribeInvocations

Last Updated:Sep 08, 2026

Queries the details of a command.

Operation description

  • After you run a command, the command is not guaranteed to succeed or produce the expected results. Check the actual execution results based on the response of this operation.

  • You can query execution information from the last two weeks. A maximum of 100,000 execution records can be 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

swas-open:DescribeInvocations

get

*Instance

acs:swas-open:{#regionId}:{#accountId}:{#InstanceId}

None None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

Yes

The region ID. You can call ListRegions to query the most recent region list.

cn-hangzhou

InstanceId

string

Yes

The instance ID of the simple application server.

3a658ca270df4df39f22e289b338****

PageNumber

integer

No

The page number.

Minimum value: 1.

Default value: 1.

1

PageSize

integer

No

The number of entries per page in a paged query. Settings for paging.

Maximum value: 50.

Default value: 10.

10

InvokeStatus

string

No

The execution status of the command. Valid values:

  • Running: The command is running.

  • Finished: The command execution is complete.

  • Failed: The command execution failed.

Finished

Response elements

Element

Type

Description

Example

object

Schema of Response

RequestId

string

The request ID.

30637AD6-D977-4833-A54C-CC89483E****

Invocations

array<object>

The command execution records.

array<object>

The command execution records.

CreationTime

string

The time when the command was created. The time is displayed in UTC (Z) in the YYYY-MM-DDThh:mm:ssZ format.

2022-07-11T06:37:16Z

InvocationStatus

string

The execution status of the command. Valid values:

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

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

  • Aborted: The command failed to be sent to the instance. The instance must be in the Running state, and the command must be delivered within one minute.

  • Running: The command is being run on the instance.

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

  • Failed: The command execution is complete, and the exit code is not 0.

  • Error: An exception occurred during command execution, and the command could not continue.

  • Timeout: The command execution timed out.

  • Cancelled: The command execution has been canceled, and the command was never started.

  • Stopping: The running command is being stopped.

  • Terminated: The command was terminated during execution.

Success

CommandType

string

The type of the command. Valid values:

  • RunBatScript: a Bat command for Windows instances.

  • RunPowerShellScript: a PowerShell command for Windows instances.

  • RunShellScript: a shell command for Linux instances.

RunShellScript

CommandContent

string

The command content, which is transmitted in Base64 encoding.

bHM=

Parameters

object

The custom parameters included in the command. If no parameters exist, the default value is {}.

{}

InvokeStatus

string

The status of the command. Valid values:

  • Running: The command is running.

  • Finished: The command execution is complete.

  • Failed: The command execution failed.

  • Stopped: The command has been stopped.

Finished

InvokeId

string

The command execution ID.

t-hz02p9545t6****

CommandName

string

The command name.

testname

PageSize

integer

The number of entries per page settings for the paged query. This value indicates the paging size.

10

PageNumber

integer

The page number.

1

TotalCount

integer

The total number of commands.

10

Examples

Success response

JSON format

{
  "RequestId": "30637AD6-D977-4833-A54C-CC89483E****",
  "Invocations": [
    {
      "CreationTime": "2022-07-11T06:37:16Z",
      "InvocationStatus": "Success",
      "CommandType": "RunShellScript",
      "CommandContent": "bHM=",
      "Parameters": {},
      "InvokeStatus": "Finished",
      "InvokeId": "t-hz02p9545t6****",
      "CommandName": "testname"
    }
  ],
  "PageSize": 10,
  "PageNumber": 1,
  "TotalCount": 10
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.