All Products
Search
Document Center

:CreateSnapshot

Last Updated:Apr 01, 2026

Buat snapshot dari disk cloud.

Deskripsi operasi

Fitur instant access menggantikan fitur snapshot lokal lama. Parameter dijelaskan sebagai berikut:

  • Jika Anda menggunakan snapshot lokal sebelum 14 Desember 2020, Anda dapat terus menggunakan parameter Category.

  • Jika Anda tidak menggunakan snapshot lokal sebelum 14 Desember 2020, tidak diperlukan konfigurasi tambahan. Secara default, snapshot baru yang dibuat untuk disk cloud ESSD (ESSD, ESSD AutoPL, ESSD Entry, dan disk ESSD Zone-Redundant) memiliki fitur instant access yang diaktifkan, baik untuk snapshot manual maupun otomatis. Parameter terkait instant access—InstantAccess, InstantAccessRetentionDays, dan DisableInstantAccess—tidak lagi berlaku. Operasi API DescribeSnapshots dan DescribeSnapshotGroups mengembalikan parameter respons Available yang baru untuk menunjukkan ketersediaan snapshot.

Prasyarat

  • Anda harus mengaktifkan fitur snapshot. Untuk informasi selengkapnya, lihat Enable Snapshot.

  • Disk cloud harus berada dalam status in-use atau available. Perhatikan hal berikut:

    • Jika disk cloud berstatus in-use, instans yang terhubung harus berada dalam status running atau stopped.

    • Jika disk cloud berstatus available, disk tersebut harus pernah disambungkan ke instans ECS sebelumnya.

    • Jika Anda menggunakan disk cloud untuk volume scalable dinamis atau array RAID, gunakan grup konsistensi snapshot dan aktifkan snapshot konsisten aplikasi untuk melakukan backup data. Grup konsistensi snapshot memastikan konsistensi urutan penulisan dan konsistensi crash untuk data yang ditulis di beberapa disk cloud. Untuk informasi selengkapnya, lihat Create a snapshot consistency group dan Create an application-consistent snapshot.

Perhatikan hal berikut saat membuat snapshot:

  • Buat snapshot di luar jam sibuk bisnis. Selama pembuatan snapshot, performa I/O disk cloud turun sementara kurang dari 10%, yang dapat memperlambat operasi baca dan tulis secara singkat.

  • Anda tidak dapat menggunakan snapshot yang sedang dibuat untuk membuat custom image (CreateImage).

  • Snapshot tidak mencakup data inkremental dari operasi disk yang terjadi selama pembuatannya.

  • Jika disk cloud disambungkan ke instans ECS, jangan mengubah status instans tersebut—misalnya dengan menghentikan atau merestart—selama pembuatan snapshot. Jika dilakukan, pembuatan snapshot akan gagal.

  • Anda tidak dapat mengubah ukuran disk cloud selama snapshot sedang dibuat. Tunggu hingga proses pembuatan snapshot selesai sebelum mengubah ukuran disk.

  • Anda dapat membuat snapshot dari disk cloud yang berada dalam status Expired (Expired). Jika disk cloud kedaluwarsa dan dilepas saat snapshot sedang dibuat, snapshot tersebut yang berada dalam status Creating (Creating) juga akan dihapus.

  • Setelah snapshot dibuat, Anda akan dikenai biaya berdasarkan ukurannya. Biaya dihitung secara terpisah untuk setiap wilayah. Untuk informasi selengkapnya, lihat Snapshot Billing.

  • Anda tidak dapat membuat snapshot untuk disk cloud dalam skenario berikut:

    • Disk cloud telah mencapai batas snapshot manual. Untuk informasi selengkapnya, lihat Snapshot Usage Limits.

    • Batas konkurensi pembuatan snapshot telah tercapai. Untuk informasi selengkapnya, lihat Snapshot Usage Limits.

    • Jika respons kueri informasi instans ECS berisi {"OperationLocks": {"LockReason" : "security"}}, semua operasi pada instans tersebut dilarang.

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

ecs:CreateSnapshot

create

*Disk

acs:ecs:{#regionId}:{#accountId}:disk/{#diskId}

*Snapshot

acs:ecs:{#regionId}:{#accountId}:snapshot/*

None None

Parameter permintaan

Parameter

Type

Required

Description

Example

DiskId

string

Yes

ID disk cloud.

d-bp1s5fnvk4gn2tws0****

SnapshotName

string

No

Nama snapshot. Nama harus terdiri dari 2 hingga 128 karakter. Nama harus dimulai dengan huruf atau karakter Tionghoa. Nama dapat berisi karakter Unicode dalam kategori huruf, angka (0–9), titik dua (:), garis bawah (_), titik (.), dan tanda hubung (-).

Catatan

Nama tidak boleh dimulai dengan http:// atau https://. Untuk menghindari bentrok dengan nama snapshot otomatis, nama tidak boleh dimulai dengan auto.

testSnapshotName

Description

string

No

Deskripsi snapshot. Deskripsi harus terdiri dari 2 hingga 256 karakter dan tidak boleh dimulai dengan http:// atau https://.

testDescription

RetentionDays

integer

No

Jumlah hari penyimpanan snapshot. Nilai valid: 1 hingga 65.536. Snapshot akan dihapus secara otomatis setelah periode ini berakhir.

Jika parameter ini tidak ditentukan, snapshot akan disimpan tanpa batas waktu.

30

Category

string

No

Jenis snapshot. Nilai valid:

  • Standard: snapshot standar.

  • Flash: Flash Snapshot.

Catatan

Parameter ini sudah tidak digunakan lagi. Snapshot standar untuk ESSD kini mencakup fitur Instant Access secara default tanpa biaya tambahan.

Standard

ClientToken

string

No

Token yang dihasilkan klien untuk memastikan idempotensi permintaan. Token harus unik untuk setiap permintaan. Nilai ClientToken harus berupa string ASCII dengan panjang maksimal 64 karakter. Untuk informasi selengkapnya, lihat How to ensure idempotence.

123e4567-e89b-12d3-a456-426655440000

ResourceGroupId

string

No

ID Resource Group tempat snapshot akan ditempatkan.

rg-bp67acfmxazb4p****

InstantAccess

boolean

No

Menentukan apakah akan mengaktifkan fitur Instant Access. Nilai valid:

  • true: Mengaktifkan fitur Instant Access. Fitur ini hanya tersedia untuk snapshot ESSD.

  • false: Menonaktifkan fitur Instant Access. Dalam hal ini, snapshot standar akan dibuat.

Nilai default: false.

Catatan

Parameter ini sudah tidak digunakan lagi. Snapshot standar untuk ESSD kini mencakup fitur Instant Access secara default tanpa biaya tambahan.

false

InstantAccessRetentionDays

integer

No

Jumlah hari snapshot tetap dapat diakses secara instan. Parameter ini hanya berlaku jika InstantAccess=true. Nilai valid: 1 hingga 65.535.

Default mengikuti nilai RetentionDays.

Catatan

Parameter ini sudah tidak digunakan lagi. Snapshot standar untuk ESSD kini mencakup fitur Instant Access secara default tanpa biaya tambahan.

1

Tag

array<object>

No

Tag yang akan ditambahkan ke snapshot. Anda dapat menambahkan hingga 20 tag.

object

No

Tag yang terdiri dari pasangan kunci-nilai.

key

string

No

Kunci tag.

Catatan

Untuk kompatibilitas yang lebih baik, kami menyarankan Anda menggunakan parameter Tag.N.Key.

null

Key

string

No

Kunci tag.

Catatan

Untuk kompatibilitas yang lebih baik, kami menyarankan Anda menggunakan parameter Tag.N.Key.

TestKey

Value

string

No

Nilai tag. Nilai dapat berupa string kosong, panjang maksimal 128 karakter, dan tidak boleh mengandung http:// atau https://.

TestValue

value

string

No

Nilai tag. Nilai dapat berupa string kosong, panjang maksimal 128 karakter, dan tidak boleh mengandung http:// atau https://.

null

StorageLocationArn

string

No

Catatan

Parameter ini tidak tersedia untuk penggunaan umum.

null

Elemen respons

Element

Type

Description

Example

object

SnapshotId

string

ID snapshot.

s-bp17441ohwka0yuh****

RequestId

string

ID permintaan.

473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E

Contoh

Respons sukses

JSONformat

{
  "SnapshotId": "s-bp17441ohwka0yuh****",
  "RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E"
}

Kode kesalahan

HTTP status code

Error code

Error message

Description

400 InvalidParameter.KMSKeyId.NotFound The specified KMSKeyId does not exist.
400 InvalidSnapshotName.Malformed The specified SnapshotName is wrongly formed.
400 IncorrectInstanceStatus The current status of the resource does not support this operation.
400 DiskCategory.OperationNotSupported The type of the specified disk does not support creating a snapshot.
400 Duplicate.TagKey The Tag.N.Key contain duplicate key.
400 InvalidTagKey.Malformed The specified Tag.n.Key is not valid.
400 InvalidTagValue.Malformed The specified Tag.n.Value is not valid.
400 InvalidRetentionDays.Malformed The specified RetentionDays is not valid.
400 CreateSnapshot.Failed The process of creating snapshot is failed.
500 InternalError The request processing has failed due to some unknown error.
403 Throttling Request was denied due to user flow control.
403 IncorrectDiskStatus.CreatingSnapshot A previous snapshot creation is in process.
403 InstanceLockedForSecurity The disk attached instance is locked due to security.
403 IncorrectDiskStatus.NeverAttached The specified disk has never been attached to any instance.
403 QuotaExceed.Snapshot The snapshot quota exceeds.
403 IncorrectDiskStatus.NeverUsed The specified disk has never been used after creating.
403 CreateSnapshot.Failed The process of creating snapshot is failed.
403 DiskInArrears The specified operation is denied as your disk has expired.
403 DiskId.ValueNotSupported The specified parameter diskid is not supported.
403 IncorrectDiskStatus The current disk status does not support this operation.
403 InvalidAccountStatus.NotEnoughBalance Your account does not have enough balance.
403 InvalidAccountStatus.SnapshotServiceUnavailable Snapshot service has not been opened yet.
403 IncorrectInstanceStatus The current status of the resource does not support this operation.
403 IncorrectVolumeStatus The current volume status does not support this operation.
403 IdempotentParameterMismatch The specified clientToken is used.
403 IncorrectDiskStatus.Invalid The specified disk status invalid, restart instance and try again.
403 IncorrectDiskType.NotSupport The specified device type is not supported.
403 IncorrectDiskStatus.Transferring The specified device is transferring, you can retry after the process is finished.
403 InvalidParameter.KMSKeyId.CMKUnauthorized ECS tags must be added to the CMK.
403 InvalidParameter.KMSKeyId.CMKNotEnabled The CMK needs to be enabled.
403 InvalidParameter.KMSKeyId.KMSUnauthorized ECS service have no right to access your KMS.
403 IdempotentProcessing The previous idempotent request(s) is still processing.
403 InvalidSnapshotCategory.Malformed The specified Category is not valid.
403 InvalidAction.Unauthorized The specified action is not valid.
403 InvalidRegion.NotSupportSnapshotInstantAccessRegion The snapshot InstantAccess is not supported for this region.
403 InvalidCategoryAndInstantAccess.Malformed The snapshot Category and InstantAccess can't be used together.
403 DISK_HAS_CREATING_SNAPSHOT The operation cannot be performed while a snapshot is being created for the disk.
403 HibernationConfigured.InstanceOperationForbidden The operation is not permitted due to limit of the hibernation configured instance.
403 QuotaExceed.SnapshotQuota The quota is insufficient, please contact your channel partner to increase the quota.
403 InvalidInstantAccessRetentionDays.Malformed The specified InstantAccessRetentionDays is not valid.
403 CloudBoxNotSupportSnapshotWithInstantAccess The specified disk in CloudBox does not support to create a snapshot with InstantAccess.
403 InvalidOperation.UnfinishedEncryptedSnapshotCopy This disk has unfinished encrypted copy snapshots in the target region.
403 QuotaExceed.ConcurrentSnapshotQuota The number of snapshots being created for the disk %s has exceeded the concurrent quota (%s). Please wait for the previous snapshots to complete before trying again.
403 InvalidClientToken.Malformed The specified clientToken is improperly formatted. It must contain only ASCII characters and must not exceed 64 characters in length.
403 InvalidParameter.UnauthorizedStorageLocationArn The operation has failed due to lack of permission for the specified "StorageLocationArn". Please use a resource with appropriate permission for the operation.
403 InvalidStorageLocationArn.Malformed The specified parameter StorageLocationArn is wrongly formed.
403 InvalidStatus.ResourceGroup You cannot perform an operation on a resource group that is being created or deleted.
404 InvalidDiskId.NotFound The specified DiskId does not exist.
404 InvalidDescription.Malformed The specified description is wrongly formed.
404 InvalidInstanceId.NotFound The specified InstanceId does not exist.
404 InvalidVolumeId.NotFound The specified volume does not exist.
404 InvalidResourceGroup.NotFound The ResourceGroup provided does not exist in our records.

Lihat Error Codes untuk daftar lengkap.

Catatan rilis

Lihat Release Notes untuk daftar lengkap.