All Products
Search
Document Center

Simple Application Server:ListDisks

Last Updated:Jun 10, 2026

Mengkueri informasi tentang disk di suatu wilayah.

Deskripsi operasi

The InstanceId, DiskIds, and ResourceGroupId parameters are optional. However, you can specify them as filter conditions and combine them with the logical AND operator to filter disks that you want to query.

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

get

*Disk

acs:swas-open:{#regionId}:{#accountId}:disk/{#DiskId}

*Disk

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

None None

Parameter permintaan

Parameter

Type

Required

Description

Example

RegionId

string

Yes

ID wilayah disk.

cn-hangzhou

InstanceId

string

No

ID server aplikasi sederhana.

2ad1ae67295445f598017499dc****

DiskIds

string

No

ID disk. Nilainya dapat berupa array JSON yang terdiri dari hingga 100 ID disk. Pisahkan beberapa ID disk dengan koma (,).

["d-bp14wq0149cpp2x****", "d-bp14wq0149cpp2y****"]

PageSize

integer

No

Jumlah entri per halaman.

Nilai maksimum: 100.

Nilai default: 10.

10

PageNumber

integer

No

Nomor halaman.

Nilai default: 1.

1

DiskType

string

No

Tipe disk. Nilai valid:

  • system: disk sistem

  • data: disk data

Secara default, disk sistem dan disk data sama-sama dikueri.

system

Tag

array<object>

No

Tag yang ditambahkan ke disk.

object

No

The tags of the disk.

Key

string

No

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

TestKey

Value

string

No

The tag value. The 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

TotalCount

integer

The total number of entries returned.

1

RequestId

string

The request ID.

20758A-585D-4A41-A9B2-28DA8F4F534F

PageSize

integer

The number of entries per page.

10

PageNumber

integer

The page number.

1

Disks

array<object>

The queried disks.

array<object>

The information about the disks.

CreationTime

string

The time when the disk was created. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

2021-03-08T05:31:06Z

Status

string

The status of the disk. Valid values:

  • ReIniting: The disk is being initialized.

  • Creating: The disk is being created.

  • In_use: The disk is in use.

  • Available: The disk can be attached.

  • Attaching: The disk is being attached.

  • Detaching: The disk is being detached.

In_use

Device

string

The device name of the disk after the disk is attached to the simple application server.

/dev/xvda

Size

integer

The size of the disk. Unit: GB.

50

DiskName

string

The name of the disk.

SystemDisk

DiskChargeType

string

The billing method of the disk.

PrePaid

DiskType

string

The disk type. Valid values:

  • system: system disk

  • data: data disk

System

Category

string

The category of the disk. Valid values:

  • ESSD: enhanced SSD (ESSD) of PL0

  • SSD: standard SSD

  • CLOUD_EFFICIENCY: ultra disk

ESSD

DiskId

string

The disk ID.

d-bp14wq0149cpp2x****

InstanceId

string

The ID of the simple application server to which the disk is attached.

2ad1ae67295445f598017499dc****

RegionId

string

The region ID.

cn-hangzhou

Remark

string

The remarks of the disk.

remark

Tags

array<object>

The tags that are added to the disks.

object

The tags of the disk.

Key

string

The tag key.

TestKey

Value

string

The tag value.

TestValue

InstanceName

string

The name of the simple application server.

myInstance

ResourceGroupId

string

The ID of the resource group to which the disk belongs.

rg-aek2bti7cf7****

Contoh

Respons sukses

JSONformat

{
  "TotalCount": 1,
  "RequestId": "20758A-585D-4A41-A9B2-28DA8F4F534F",
  "PageSize": 10,
  "PageNumber": 1,
  "Disks": [
    {
      "CreationTime": "2021-03-08T05:31:06Z",
      "Status": "In_use",
      "Device": "/dev/xvda",
      "Size": 50,
      "DiskName": "SystemDisk",
      "DiskChargeType": "PrePaid",
      "DiskType": "System",
      "Category": "ESSD",
      "DiskId": "d-bp14wq0149cpp2x****",
      "InstanceId": "2ad1ae67295445f598017499dc****",
      "RegionId": "cn-hangzhou",
      "Remark": "remark",
      "Tags": [
        {
          "Key": "TestKey",
          "Value": "TestValue"
        }
      ],
      "InstanceName": "myInstance",
      "ResourceGroupId": "rg-aek2bti7cf7****"
    }
  ]
}

Kode kesalahan

HTTP status code

Error code

Error message

Description

500 InternalError An error occurred while processing your request.

Lihat Error Codes untuk daftar lengkap.

Catatan rilis

Lihat Release Notes untuk daftar lengkap.