All Products
Search
Document Center

Simple Application Server:DescribeInvocationResult

Last Updated:Jun 10, 2026

Mengkueri hasil eksekusi sebuah perintah.

Deskripsi operasi

  • After you execute a command, the command may not succeed or return the expected results. You can call this operation to query the execution result of a command.

  • You can query the execution results that were generated within the last two weeks. A maximum of 100,000 entries of execution results can be retained.

Coba sekarang

Coba API ini di OpenAPI Explorer tanpa perlu penandatanganan manual. Panggilan yang berhasil akan secara otomatis menghasilkan contoh kode SDK sesuai dengan parameter Anda. Unduh kode tersebut dengan kredensial bawaan yang aman untuk penggunaan lokal.

Test

RAM authorization

Tabel berikut menjelaskan otorisasi yang diperlukan untuk memanggil API ini. Anda dapat menentukannya dalam kebijakan Resource Access Management (RAM). Kolom pada tabel dijelaskan sebagai berikut:

  • Action: Aksi yang dapat digunakan dalam elemen Action pada pernyataan kebijakan izin RAM untuk memberikan izin guna melakukan operasi tersebut.

  • API: API yang dapat Anda panggil untuk melakukan aksi tersebut.

  • Access level: Tingkat akses yang telah ditentukan untuk setiap API. Nilai yang valid: create, list, get, update, dan delete.

  • Resource type: Jenis resource yang mendukung otorisasi untuk melakukan aksi tersebut. Ini menunjukkan apakah aksi tersebut mendukung izin tingkat resource. Resource yang ditentukan harus kompatibel dengan aksi tersebut. Jika tidak, kebijakan tersebut tidak akan berlaku.

    • Untuk API dengan izin tingkat resource, jenis resource yang diperlukan ditandai dengan tanda bintang (*). Tentukan Nama Sumber Daya Alibaba Cloud (ARN) yang sesuai dalam elemen Resource pada kebijakan.

    • Untuk API tanpa izin tingkat resource, ditampilkan sebagai All Resources. Gunakan tanda bintang (*) dalam elemen Resource pada kebijakan.

  • Condition key: Kunci kondisi yang didefinisikan oleh layanan. Kunci ini memungkinkan kontrol granular, berlaku baik hanya untuk aksi maupun untuk aksi yang terkait dengan resource tertentu. Selain kunci kondisi spesifik layanan, Alibaba Cloud menyediakan serangkaian common condition keys yang berlaku di semua layanan yang didukung RAM.

  • Dependent action: Aksi dependen yang diperlukan untuk menjalankan aksi tersebut. Untuk menyelesaikan aksi tersebut, pengguna RAM atau role RAM harus memiliki izin untuk melakukan semua aksi dependen.

Action

Access level

Resource type

Condition key

Dependent action

swas-open:DescribeInvocationResult

get

*Instance

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

None None

Parameter permintaan

Parameter

Type

Required

Description

Example

InstanceId

string

Yes

ID server aplikasi sederhana.

ace0706b2ac4454d984295a94213****

InvokeId

string

Yes

ID eksekusi. Anda dapat memanggil operasi DescribeInvocations untuk mengkueri ID eksekusi.

t-bj02prjhw1n****

RegionId

string

Yes

ID wilayah server aplikasi sederhana. Anda dapat memanggil operasi DescribeRegions untuk mengkueri daftar wilayah terbaru.

cn-hangzhou

Elemen respons

Element

Type

Description

Example

object

Schema of Response

RequestId

string

The request ID.

20758A-585D-4A41-A9B2-28DA8F4F****

InvocationResult

object

The execution results.

StartTime

string

The time when the execution started.

2022-07-11T06:37:16Z

FinishedTime

string

The time when the execution ended.

2022-07-11T06:37:17Z

InvocationStatus

string

The status of the execution progress. Valid values:

  • Pending: The command is being verified or sent.

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

  • Aborted: The command fails to be sent to the server. To send a command to a server, make sure that the server is in the Running state and the command can be sent within 1 minute.

  • Running: The command is being executed on the server.

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

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

  • Error: The execution cannot proceed due to an exception.

  • Timeout: The execution times out.

  • Cancelled: The execution is canceled, and the command is not executed.

  • Stopping: The command in the Running state is being stopped.

  • Terminated: The command is terminated while it is being executed.

Success

ExitCode

integer

The exit code of the command.

  • For Linux instances, the exit code is the exit code of the shell command.

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

0

ErrorInfo

string

The error message returned when the command is not successfully sent or executed. Valid values:

  • If this parameter is empty, the command is executed normally.

  • the specified instance does not exists: The specified server does not exist or is released.

  • the instance has released when create task: The server was released while the command was being executed on the server.

  • the instance is not running when create task: The server is not in the Running state while the command is being executed.

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

  • 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: The Cloud Assistance client is not running.

  • the aliyun service in the instance does not response: The Cloud Assistant client does not respond to your request.

  • 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 sending times out.

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

  • the command execution got an exception: An exception occurs while the command is being executed.

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

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

the specified instance does not exists

ErrorCode

string

The error code that is returned if the command failed to be sent or executed.

  • If this parameter is empty, the command is executed normally.

  • InstanceNotExists: The specified server does not exist or is released.

  • InstanceReleased: The server was released while the command was being executed on the server.

  • InstanceNotRunning: The server is not in the Running state while the command is being executed.

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

  • AccountNotExists: The specified account does not exist.

  • DirectoryNotExists: The specified directory does not exist.

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

  • 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: Command sending times out.

  • ExecutionTimeout: The execution times out.

  • ExecutionException: An exception occurs while the command is being executed.

  • ExecutionInterrupted: The execution is interrupted.

  • ExitCodeNonzero: The execution is complete, but the exit code is not 0.

InstanceNotExists

InvokeId

string

The execution ID.

t-bj02prjje65****

InvokeRecordStatus

string

The status of the execution. Valid values:

  • Running

  • Finished

  • Failed

  • Stopped

Finished

InvokeUser

string

The username who executes the command on the simple application server.

root

Output

string

The command output.

YWRtaW4K

InstanceId

string

The ID of the simple application server.

ace0706b2ac4454d984295a94213****

Contoh

Respons sukses

JSONformat

{
  "RequestId": "20758A-585D-4A41-A9B2-28DA8F4F****",
  "InvocationResult": {
    "StartTime": "2022-07-11T06:37:16Z",
    "FinishedTime": "2022-07-11T06:37:17Z",
    "InvocationStatus": "Success",
    "ExitCode": 0,
    "ErrorInfo": "the specified instance does not exists",
    "ErrorCode": "InstanceNotExists",
    "InvokeId": "t-bj02prjje65****",
    "InvokeRecordStatus": "Finished",
    "InvokeUser": "root",
    "Output": "YWRtaW4K",
    "InstanceId": "ace0706b2ac4454d984295a94213****"
  }
}

Kode kesalahan

Lihat Error Codes untuk daftar lengkap.

Catatan rilis

Lihat Release Notes untuk daftar lengkap.