All Products
Search
Document Center

Key Management Service:ListKeyVersions

Last Updated:Jun 10, 2026

Mengkueri semua versi CMK tertentu.

Deskripsi operasi

For more information about the access policy required by a RAM user or RAM role to call this API, see Resource Access Management.

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

Tidak ada otorisasi untuk operasi ini. Jika Anda mengalami masalah saat menjalankan operasi ini, hubungi dukungan teknis.

Parameter permintaan

Parameter

Type

Required

Description

Example

KeyId

string

Yes

ID unik global CMK. Anda juga dapat menetapkan parameter ini ke alias yang terikat ke CMK. Untuk informasi selengkapnya, lihat Gunakan alias.

0b30658a-ed1a-4922-b8f7-a673ca9c****

PageNumber

integer

No

Nomor halaman yang akan dikembalikan.

Halaman dimulai dari halaman 1.

Nilai default: 1.

1

PageSize

integer

No

Jumlah entri yang akan dikembalikan di setiap halaman.

Nilai valid: 0 hingga 101.

Nilai default: 10.

10

Elemen respons

Element

Type

Description

Example

object

PageSize

integer

The number of entries returned per page.

10

RequestId

string

The request ID.

f71204c4-53cd-4eea-b405-653ba2db7e86

PageNumber

integer

The page number of the returned page.

1

TotalCount

integer

The total number of returned key versions.

3

KeyVersions

object

KeyVersion

array<object>

An array that consists of key versions.

object

KeyId

string

The globally unique ID of the CMK.

Catatan

If you set the KeyId parameter to the alias of the CMK, the ID of the CMK to which the alias is bound is returned.

0b30658a-ed1a-4922-b8f7-a673ca9c****

KeyVersionId

string

The globally unique ID of the CMK version.

1e3304fd-68ac-4d5b-8886-ae5f01a1****

CreationDate

string

The date and time when the CMK version was created. The time is displayed in UTC.

2016-03-25T10:42:40Z

Contoh

Respons sukses

JSONformat

{
  "PageSize": 10,
  "RequestId": "f71204c4-53cd-4eea-b405-653ba2db7e86",
  "PageNumber": 1,
  "TotalCount": 3,
  "KeyVersions": {
    "KeyVersion": [
      {
        "KeyId": "0b30658a-ed1a-4922-b8f7-a673ca9c****",
        "KeyVersionId": "1e3304fd-68ac-4d5b-8886-ae5f01a1****",
        "CreationDate": "2016-03-25T10:42:40Z"
      }
    ]
  }
}

Kode kesalahan

HTTP status code

Error code

Error message

Description

400 InvalidParameter The specified parameter is not valid. An invalid value is specified for the parameter.
404 InvalidAccessKeyId.NotFound The Access Key ID provided does not exist in our records.
404 Forbidden.KeyNotFound The specified Key is not found. The error message returned because the specified CMK does not exist.

Lihat Error Codes untuk daftar lengkap.

Catatan rilis

Lihat Release Notes untuk daftar lengkap.