All Products
Search
Document Center

Simple Application Server:DescribeCommands

Last Updated:Jun 10, 2026

Mengkueri perintah yang Anda buat atau perintah umum yang disediakan Alibaba Cloud.

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:DescribeCommands

get

*Command

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

*Command

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

None None

Parameter permintaan

Parameter

Type

Required

Description

Example

RegionId

string

Yes

ID wilayah.

cn-hangzhou

CommandId

string

No

ID perintah.

c-sh02yh0932w****

Name

string

No

Nama perintah. Pencocokan kabur tidak didukung.

testName

Provider

string

Yes

Penyedia perintah umum. Perhatikan hal-hal berikut:

  • Jika Anda mengatur parameter ini ke AlibabaCloud, semua perintah umum yang disediakan oleh Alibaba Cloud akan dikueri.

  • Jika Anda mengatur parameter ini ke User, semua perintah kustom yang Anda buat akan dikueri.

AlibabaCloud

Type

string

No

Tipe bahasa perintah. Nilai valid:

  • RunBatScript: perintah batch, berlaku untuk instans Windows

  • RunPowerShellScript: perintah PowerShell, berlaku untuk instans Windows

  • RunShellScript: perintah shell, berlaku untuk instans Linux.

RunShellScript

PageNumber

string

No

Nomor halaman.

Halaman dimulai dari 1.

Nilai default: 1.

1

PageSize

string

No

Jumlah entri per halaman.

Nilai maksimum: 50.

Nilai default: 10.

10

Tag

array<object>

No

Tag yang terikat ke perintah.

object

No

The tags of the command.

Key

string

No

The tag key of the command. A tag key can be 1 to 64 characters in length. Valid values of N: 1 to 20.

TestKey

Value

string

No

The tag value of the command. A tag value can be up to 64 characters in length. Valid values of N: 1 to 20.

TestValue

ResourceGroupId

string

No

ID kelompok sumber daya.

rg-aek2bti7cf7****

Elemen respons

Element

Type

Description

Example

object

Schema of Response

RequestId

string

The request ID.

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

TotalCount

integer

The total number of commands.

10

PageNumber

integer

The page number.

1

PageSize

integer

The number of entries per page.

10

Commands

array<object>

The queried commands.

array<object>

The commands.

CommandId

string

The command ID.

c-gov1k1tqwi9****

Tags

array<object>

The tags that are bound to the command.

object

The tags of the command.

Key

string

The tag key of the command.

TestKey

Value

string

The tag value of the command.

TestValue

CreationTime

string

The time when the command was created.

2023-01-05T06:38:53Z

Name

string

The name of the command.

testName

Provider

string

The provider of the command.

User

Type

string

The type of the command.

RunShellScript

Timeout

integer

The timeout period of the command.

60

Description

string

The description of the command.

testDescription

WorkingDir

string

The execution path of the command.

/home

CommandContent

string

The content of the command.

cat /etc/ssh/sshd_config

EnableParameter

boolean

Indicates whether the custom parameter feature is enabled for the command.

false

ParameterNames

array

The custom parameter names that are parsed from the command content specified when the command was created. The custom parameter names are returned in the list format. If the custom parameter feature is disabled, an empty list is returned.

string

The custom parameter name.

parameter1

ParameterDefinitions

array<object>

Details of the custom parameter.

object

The custom parameter.

Required

boolean

Indicates whether the custom parameter is required. Valid values:

  • true

  • false

Default value: false.

false

Description

string

The description of the custom parameter.

Command Assistant Agent Installation Package Path

DefaultValue

string

The default value of the custom parameter.

https://aliyun-client-assist.oss-accelerate.aliyuncs.com/linux/aliyun_assist_latest.rpm

ParameterName

string

The name of the custom parameter.

DownloadUrl

PossibleValues

array

The valid values of the custom parameter.

string

A valid value of the custom parameter.

Linux

ResourceGroupId

string

The resource group ID.

rg-aek2bti7cf7****

Contoh

Respons sukses

JSONformat

{
  "RequestId": "20758A-585D-4A41-A9B2-28DA8F4F****",
  "TotalCount": 10,
  "PageNumber": 1,
  "PageSize": 10,
  "Commands": [
    {
      "CommandId": "c-gov1k1tqwi9****",
      "Tags": [
        {
          "Key": "TestKey",
          "Value": "TestValue"
        }
      ],
      "CreationTime": "2023-01-05T06:38:53Z",
      "Name": "testName",
      "Provider": "User",
      "Type": "RunShellScript",
      "Timeout": 60,
      "Description": "testDescription",
      "WorkingDir": "/home",
      "CommandContent": "cat /etc/ssh/sshd_config",
      "EnableParameter": false,
      "ParameterNames": [
        "parameter1"
      ],
      "ParameterDefinitions": [
        {
          "Required": false,
          "Description": "Command Assistant Agent Installation Package Path",
          "DefaultValue": "https://aliyun-client-assist.oss-accelerate.aliyuncs.com/linux/aliyun_assist_latest.rpm",
          "ParameterName": "DownloadUrl",
          "PossibleValues": [
            "Linux"
          ]
        }
      ],
      "ResourceGroupId": "rg-aek2bti7cf7****"
    }
  ]
}

Kode kesalahan

Lihat Error Codes untuk daftar lengkap.

Catatan rilis

Lihat Release Notes untuk daftar lengkap.