All Products
Search
Document Center

Simple Application Server:DescribeInvocations

Last Updated:Jun 10, 2026

Mengkueri detail tentang eksekusi 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 actual execution results.

  • You can query the execution results that were generated within the last two weeks. Up to 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:DescribeInvocations

get

*Instance

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

None None

Parameter permintaan

Parameter

Type

Required

Description

Example

RegionId

string

Yes

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

cn-hangzhou

InstanceId

string

Yes

ID server aplikasi sederhana.

3a658ca270df4df39f22e289b338****

PageNumber

integer

No

Nomor halaman.

Halaman dimulai dari halaman 1.

Nilai default: 1.

1

PageSize

integer

No

Jumlah entri per halaman.

Nilai maksimum: 50.

Nilai default: 10.

10

InvokeStatus

string

No

Status eksekusi perintah. Nilai valid:

  • Running: Perintah sedang dieksekusi.

  • Finished: Eksekusi selesai.

  • Failed: Eksekusi gagal.

Finished

Elemen respons

Element

Type

Description

Example

object

Schema of Response

RequestId

string

The request ID.

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

Invocations

array<object>

The command name.

array<object>

CreationTime

string

The time when the command was created.

2022-07-11T06:37:16Z

InvocationStatus

string

The status of the command. Valid values:

  • Pending: The command is being verified or sent.

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

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

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

  • Success: The command finishes running, and the exit code is 0.

  • Failed: The command finishes running, but the exit code is not 0.

  • Error: The running of the command cannot proceed due to an exception.

  • Timeout: The running of the command times out.

  • Cancelled: The running is canceled, and the command is not run.

  • Stopping: The command that is running is being stopped.

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

Success

CommandType

string

The type of the command. Valid values:

  • RunBatScript: batch command (applicable to Windows instances).

  • RunPowerShellScript: PowerShell command (applicable to Windows instances).

  • RunShellScript: shell command (applicable to Linux instances).

RunShellScript

CommandContent

string

The content of the command, which is Base64-encoded.

bHM=

Parameters

object

The custom parameters in the command. If no custom parameter exists in the command, the default value is {}.

{}

InvokeStatus

string

The status of the command. Valid values:

  • Running: The command is running.

  • Finished: The command finishes running.

  • Failed: The running of the command failed.

  • Stopped: The running is stopped.

Finished

InvokeId

string

The ID of the command task.

t-hz02p9545t6****

CommandName

string

The name of the command.

testname

PageSize

integer

The number of entries per page.

10

PageNumber

integer

The page number.

1

TotalCount

integer

The total number of entries returned.

10

Contoh

Respons sukses

JSONformat

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

Kode kesalahan

Lihat Error Codes untuk daftar lengkap.

Catatan rilis

Lihat Release Notes untuk daftar lengkap.