All Products
Search
Document Center

Elastic Compute Service:CopySnapshot

Last Updated:Oct 10, 2026

Menyalin snapshot standar atau snapshot terenkripsi dari satu wilayah ke wilayah lain.

Deskripsi operasi

Saat memanggil operasi ini, perhatikan hal-hal berikut:

  • Anda tidak dapat menggunakan snapshot yang disalin untuk mengembalikan cloud disk tempat snapshot sumber dibuat.

  • Anda tidak dapat menyalin snapshot lokal.

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

create

*Snapshot.

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

None None

Parameter permintaan

Parameter

Type

Required

Description

Example

ResourceGroupId

string

No

Parameter ini tidak tersedia.

rg-bp67acfmxazb4p****

Tag

array<object>

No

Tag snapshot baru.

object

No

Tag snapshot baru.

Key

string

No

Kunci tag snapshot baru. Jika Anda menentukan parameter ini, nilainya tidak boleh berupa string kosong. Panjang kunci tag dapat mencapai 128 karakter. Kunci tag tidak boleh diawali dengan aliyun atau acs:, dan tidak boleh mengandung http:// atau https://.

TestKey

Value

string

No

Nilai tag snapshot baru. Jika Anda menentukan parameter ini, nilainya dapat berupa string kosong. Panjang nilai tag dapat mencapai 128 karakter. Nilai tag tidak boleh diawali dengan aliyun atau acs:, dan tidak boleh mengandung http:// atau https://.

TestValue

RegionId

string

Yes

Wilayah tempat snapshot sumber berada. Anda dapat memanggil operasi DescribeRegions untuk mengkueri daftar wilayah terbaru.

cn-chengdu

DestinationRegionId

string

Yes

ID wilayah tujuan untuk snapshot baru.

us-east-1

SnapshotId

string

Yes

ID snapshot sumber.

s-bp67acfmxazb4p****

DestinationSnapshotName

string

Yes

Nama snapshot baru. Panjang nama harus 2 hingga 128 karakter. Nama harus diawali dengan huruf atau karakter Tionghoa, dan tidak boleh diawali dengan http:// atau https://. Parameter ini mendukung karakter dalam kategori Letter Unicode, termasuk huruf Inggris, karakter Tionghoa, dan digit. Parameter ini dapat mengandung titik dua (:), garis bawah (_), periode (.), dan tanda hubung (-).

Nilai default: kosong.

CopySnapshotDemo

DestinationSnapshotDescription

string

Yes

Deskripsi snapshot baru. Panjang deskripsi harus 2 hingga 256 karakter dan tidak boleh diawali dengan http:// atau https://.

Nilai default: kosong.

CopySnapshotDemo

RetentionDays

integer

No

Periode retensi snapshot baru. Unit: hari. Snapshot akan mengalami pelepasan otomatis ketika periode retensi berakhir. Nilai valid: 1 hingga 65536.

Nilai default: kosong, yang menunjukkan bahwa snapshot tidak akan mengalami pelepasan otomatis.

60

Encrypted

boolean

No

Apakah akan mengenkripsi snapshot baru. Nilai valid:

  • true: Ya.

  • false: Tidak.

Nilai default: false.

false

KMSKeyId

string

No

Customer master key (CMK) di Key Management Service (KMS) di wilayah tujuan.

0e478b7a-4262-4802-b8cb-00d3fb40****

Arn

array<object>

No

Catatan

Parameter ini berada dalam pratinjau undangan dan tidak didukung.

object

No

AssumeRoleFor

integer

No

Catatan

Parameter ini tidak tersedia.

0

RoleType

string

No

Catatan

Parameter ini tidak tersedia.

null

Rolearn

string

No

Catatan

Parameter ini tidak tersedia.

null

DestinationStorageLocationArn

string

No

Catatan

Parameter ini tidak tersedia.

null

ClientToken

string

No

Token klien yang digunakan untuk memastikan idempotensi permintaan. Anda dapat menggunakan klien untuk menghasilkan token, tetapi Anda harus memastikan bahwa token tersebut unik di antara permintaan yang berbeda. Token hanya dapat mengandung karakter ASCII dan panjangnya tidak boleh melebihi 64 karakter. Untuk informasi selengkapnya, lihat Cara memastikan idempotensi.

123e4567-e89b-12d3-a456-426655440000

Elemen respons

Element

Type

Description

Example

object

RequestId

string

ID permintaan.

C8B26B44-0189-443E-9816-D951F596****

SnapshotId

string

ID snapshot baru.

s-bp17441ohwka0yui****

Contoh

Respons sukses

JSONformat

{
  "RequestId": "C8B26B44-0189-443E-9816-D951F596****",
  "SnapshotId": "s-bp17441ohwka0yui****"
}

Kode kesalahan

HTTP status code

Error code

Error message

Description

400 Duplicate.TagKey The Tag.N.Key contain duplicate key. Terdapat kunci duplikat pada tag. Pastikan semua kunci unik.
400 InvalidTagKey.Malformed The specified Tag.n.Key is not valid. Parameter kunci tag yang ditentukan tidak valid.
400 InvalidTagValue.Malformed The specified Tag.n.Value is not valid. Parameter nilai tag yang ditentukan tidak valid.
400 InvalidRegionId.MalFormed The specified RegionId is not valid.
400 InvalidParameter.Arns The specified Arns is not valid. Parameter Arns tidak valid. Periksa parameter dan coba lagi.
500 InternalError The request processing has failed due to an internal error and you may retry later or contact support with the request ID.
403 InvalidSnapshotId.EncryptedNotSupport The specified snapshot with encrypted does not support copy.
403 InvalidSnapshotId.NotFound The specified snapshot is not exists. Snapshot yang ditentukan tidak ada. Pastikan snapshot benar.
403 InvalidSnapshotCategory.NotSupportCopy The specified snapshot's category does not support copy.
403 InvalidUser.NotInWhiteList The user is not in the white list of copying snapshot. Anda tidak diizinkan untuk melakukan operasi ini.
403 InvalidAccountStatus.NotEnoughBalance Your account does not have enough balance.
403 InvalidAccountStatus.SnapshotServiceUnavailable Snapshot service has not been opened yet. Layanan snapshot tidak diaktifkan. Operasi tidak dapat dilakukan.
403 InvalidSnapshotId.NotReady The specified snapshot has not completed yet.
403 InvalidOperation.Unauthorized The specified operation is unauthorized.
403 InvalidOperation.UnfinishedCrossRegionCopy This disk has unfinished cross-region copy snapshots in the target region. Disk memiliki tugas penyalinan snapshot lintas wilayah yang belum selesai.
403 InvalidOperation.NotSupportCopyInSameRegion Copying snapshot in the same region is not supported. Wilayah sumber dan Wilayah tujuan untuk menyalin snapshot tidak boleh sama.
403 InvalidSnapshotName.Malformed The specified SnapshotName is malformed.
403 InvalidDescription.Malformed The specified description is malformed.
403 InvalidRetentionDays.Malformed The specified RetentionDays is not valid.
403 InvalidRegionId.NotSupportedEncryptedSnapshotCopy The specified region not support copy encrypted snapshot.
403 InvalidRegion.NotSupport The specified region does not support byok. Wilayah yang ditentukan tidak didukung.
403 InvalidRegionId.NotSupportEncryptAlgorithm The current region does not support creating encrypted disks with EncryptAlgorithm.
403 InvalidRegionId.NotExists Region not exists.
403 InvalidEncryptAlgorithm The specified EncryptAlgorithm is not valid. Ensure the value is a supported encryption algorithm such as AES-256.
403 InvalidEncrypted.NotMatchKmsKeyId The Encrypted parameter must be set to true when KMSKeyId is specified. Please adjust the parameters and try again.
403 InvalidEncrypted.NotMatchEncryptAlgorithm The Encrypted parameter must be set to true when EncryptAlgorithm is specified. Please adjust the parameters and try again.
403 InvalidEncrypted.NotSupportDecrypt Encrypted snapshot not support copy to decrypt snapshot.
403 InvalidSnapshotCategory.NotSupportCrossRegionCopy The specified snapshot does not support cross-region copy.
403 InvalidSnapshotCategory.NotSupportEncryptedCopy The specified snapshot does not support encrypted copy.
403 InvalidParameter.KmsNotEnabled The specified operation need enable KMS.
403 InvalidParameter.DataEncryptedKeyCreateFailed The ECS service is not authorized to access your KMS key. Please grant the ECS service permission to use the key and try again.
403 InvalidParameter.KMSKeyId.NotFound The specified KMSKeyId does not exist. Please verify that the key ID is correct and that the key resides in the current region.
403 InvalidParameter.KMSKeyId.KMSUnauthorized ECS service does not have permission to access your KMS key. Please verify that the specified KMS key has authorized the ECS service.
403 InvalidKMSKeyId.NotSymmetric The specified KMSKeyId must be a symmetric key. Please use a symmetric KMS key such as an AES-256 key.
403 QuotaExceed.SnapshotQuota The quota is insufficient. Please contact your channel partner to increase the quota.
403 InvalidOperation.UnfinishedEncryptedSnapshotCopy This disk has unfinished encrypted copy snapshots in the target region. Disk memiliki tugas penyalinan snapshot terenkripsi yang sedang berlangsung.
403 InvalidParameterDestinationStorageLocationArn.Unauthorized The operation has failed due to lack of permission for the specified "DestinationStorageLocationArn". Please use a resource with appropriate permission for the operation.
403 InvalidParameterDestinationStorageLocationArn.RegionNotMatch The region information in the specified parameter "DestinationStorageLocationArn" is inconsistent with "DestinationRegionId". Please use the correct information for the operation.
403 InvalidSnapshot.StorageLocationNotSupported The storage location of the current snapshot does not support this operation.
403 InvalidSnapshot.EncryptedNotSupported The current operation does not support the use of encrypted snapshots. Snapshot terenkripsi tidak mendukung operasi ini.
403 InvalidParameterDestinationStorageLocationArn.Malformed The specified DestinationStorageLocationArn is malformed.
403 OperationDenied.NonCompliantDestinationRegion The copy operation to the destination region is not in compliance with regulations. Wilayah tujuan tidak memenuhi persyaratan kepatuhan keamanan.
403 OperationDenied.SnapshotCategoryNotSupportCopy The specified category of snapshot not support copy. Tipe snapshot yang ditentukan tidak mendukung penyalinan.
403 InvalidParameter.KMSKeyId.CMKNotEnabled The specified KMS key must be in an enabled state. Please enable the key in the KMS console and try again.
403 InvalidParameter.KMSKeyId.CMKUnauthorized The specified KMS key is not authorized for the ECS service. Please grant the ECS service permission to use the key in the KMS console and try again.
403 OperationDenied.NotInArnsWhitelist The current account is not authorized for this operation. Please check the ARNS whitelist configuration.
403 OperationDenied.KMSKeyUnauthorized The operation is denied due to missing KMS key authorization. Please check the KMS key permissions and ensure the key is properly authorized for this operation.
403 InvalidOperation.CopyingDataToThisRegionUnsupported Data transfer to the current region from other regions is not supported. Hanya wilayah tertentu yang dapat mereplikasi data ke wilayah saat ini.
409 InvalidOperation.Conflict Request was denied due to conflict with a previous request. Please try again later.

Lihat Error Codes untuk daftar lengkap.

Catatan rilis

Lihat Release Notes untuk daftar lengkap.