Menyalin gambar kustom dari satu wilayah ke wilayah lain. Penyalinan gambar memungkinkan penerapan lintas wilayah dan replikasi Instance ECS.
Deskripsi operasi
Deskripsi operasi
Anda dapat menggunakan gambar yang disalin untuk membuat Instance ECS dengan memanggil operasi RunInstances, atau mengganti cloud disk sistem instans dengan memanggil operasi ReplaceSystemDisk di wilayah tujuan.
Saat memanggil operasi ini, perhatikan hal-hal berikut:
Gambar kustom harus berada dalam status Available.
Jika gambar adalah gambar kustom di bawah akun Anda, Anda dapat menyalinnya lintas wilayah. Jika gambar dibagikan oleh akun lain, Anda hanya dapat menyalinnya dalam wilayah yang sama.
Selama proses penyalinan gambar, Anda tidak dapat langsung menghapus gambar yang sedang disalin dengan memanggil operasi DeleteImage. Namun, Anda dapat menghapus gambar dengan membatalkan tugas penyalinan dengan memanggil operasi CancelCopyImage.
Maksimal lima tugas penyalinan gambar dapat berjalan secara bersamaan di wilayah yang sama. Tugas lain harus menunggu dalam antrian hingga salah satu tugas yang berjalan selesai.
Anda dapat menggunakan parameter ResourceGroupId untuk menentukan kelompok sumber daya tempat gambar yang disalin berada. Jika Anda tidak menentukan parameter ResourceGroupId, gambar yang disalin akan berada di kelompok sumber daya default.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ecs:CopyImage |
update |
*Image
*Image
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| DestinationImageName |
string |
No |
Nama gambar yang disalin. Panjang nama harus 2 hingga 128 karakter. Harus diawali dengan huruf atau karakter Tionghoa, dan tidak boleh diawali dengan aliyun atau acs:. Tidak boleh mengandung http:// atau https://. Dapat berisi angka, titik (.), titik dua (:), garis bawah (_), dan tanda hubung (-). |
YourImageName |
| DestinationDescription |
string |
No |
Deskripsi gambar yang disalin. Panjang deskripsi harus 2 hingga 256 karakter, dan tidak boleh diawali dengan http:// atau https://. |
This is a description example. |
| ImageId |
string |
Yes |
ID gambar kustom sumber. |
m-bp1h46wfpjsjastc**** |
| RegionId |
string |
Yes |
ID wilayah gambar kustom sumber. Anda dapat memanggil operasi DescribeRegions untuk mengkueri daftar wilayah terbaru. |
cn-hangzhou |
| DestinationRegionId |
string |
No |
ID wilayah tujuan. |
cn-shanghai |
| Encrypted |
boolean |
No |
Apakah akan mengenkripsi gambar yang disalin. Nilai valid:
Nilai default: none. |
false |
| KMSKeyId |
string |
No |
ID kunci yang digunakan untuk mengenkripsi gambar. |
e522b26d-abf6-4e0d-b5da-04b7******3c |
| EncryptAlgorithm |
string |
No |
Catatan
Parameter ini tidak tersedia. |
hide |
| ResourceGroupId |
string |
No |
ID kelompok sumber daya gambar setelah replikasi. Jika Anda tidak menentukan parameter ini, gambar setelah replikasi akan berada di kelompok sumber daya default. Catatan
Jika Anda memanggil operasi ini sebagai Pengguna RAM dan membiarkan ResourceGroupId kosong, perhatikan bahwa jika Pengguna RAM tidak memiliki izin pada kelompok sumber daya default, operasi akan mengembalikan error |
rg-bp67acfmxazb4p**** |
| Tag |
array<object> |
No |
Daftar tag. |
|
|
object |
No |
Daftar tag. |
||
| Key |
string |
No |
Kunci tag N dari gambar yang disalin. Nilai valid N: 1 hingga 20. Jika Anda menentukan parameter ini, nilainya tidak boleh berupa string kosong. Panjang kunci tag dapat mencapai 128 karakter. Tidak boleh diawali dengan aliyun atau acs:, dan tidak boleh mengandung http:// atau https://. |
TestKey |
| Value |
string |
No |
Nilai tag N dari gambar yang disalin. Nilai valid N: 1 hingga 20. Jika Anda menentukan parameter ini, nilainya dapat berupa string kosong. Panjang nilai tag dapat mencapai 128 karakter. Tidak boleh diawali dengan acs:, dan tidak boleh mengandung http:// atau https://. |
TestValue |
| DryRun |
boolean |
No |
Apakah akan hanya menjalankan dry run untuk permintaan ini. Nilai valid:
Nilai default: false. |
false |
| 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. Parameter ClientToken hanya dapat berisi karakter ASCII dan panjangnya tidak boleh melebihi 64 karakter. Untuk informasi lebih lanjut, lihat Cara memastikan idempotensi. |
123e4567-e89b-12d3-a456-426655440000 |
| Skenario | Status gambar sumber | Parameter Encrypted | Parameter KMSKeyId | Apakah enkripsi EBS tingkat akun dikonfigurasi di wilayah tujuan | Hasil gambar tujuan | Deskripsi hasil |
| 1 | Gambar tidak terenkripsi | False atau tidak ditentukan | Tidak ditentukan | Tidak dikonfigurasi | Gambar tidak terenkripsi | Gambar tidak dienkripsi dan tetap tidak berubah. |
| 2 | Gambar tidak terenkripsi | True | Tidak ditentukan | Apa pun | Gambar terenkripsi penuh | Pengguna secara eksplisit meminta enkripsi. Jika enkripsi EBS tingkat akun dikonfigurasi, kunci default yang dikonfigurasi adalah enkripsi kunci rahasia. Jika tidak, kunci layanan akan digunakan. |
| 3 | Gambar tidak terenkripsi | True | Ditentukan | Apa pun | Gambar terenkripsi penuh | Pengguna secara eksplisit meminta enkripsi. KMSKeyId yang ditentukan oleh pengguna adalah enkripsi kunci rahasia. |
| 4 | Gambar tidak terenkripsi | Tidak ditentukan | Tidak ditentukan | Dikonfigurasi | Gambar terenkripsi penuh | Kunci yang dikonfigurasi untuk enkripsi EBS tingkat akun adalah enkripsi kunci rahasia. |
| 5 | Gambar terenkripsi | Tidak ditentukan | Tidak ditentukan | Tidak dikonfigurasi | Gambar terenkripsi | Format asli dipertahankan. Snapshot tidak terenkripsi tetap tidak terenkripsi, dan snapshot terenkripsi dienkripsi menggunakan kunci layanan. |
| 6 | Gambar terenkripsi | Tidak ditentukan atau True | Tidak ditentukan | Dikonfigurasi | Gambar terenkripsi penuh | Kunci yang dikonfigurasi untuk enkripsi EBS tingkat akun adalah enkripsi kunci rahasia. |
| 7 | Gambar terenkripsi | True | Tidak ditentukan | Tidak dikonfigurasi | Gambar terenkripsi penuh | Kunci layanan adalah enkripsi kunci rahasia. |
| 8 | Gambar terenkripsi | True | Tidak ditentukan | Dikonfigurasi | Gambar terenkripsi penuh | Kunci yang dikonfigurasi untuk enkripsi EBS tingkat akun adalah enkripsi kunci rahasia. |
| 9 | Gambar terenkripsi | True | Ditentukan | Apa pun | Gambar terenkripsi penuh | Pengguna secara eksplisit meminta enkripsi. KMSKeyId yang ditentukan oleh pengguna adalah enkripsi kunci rahasia. |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
|||
| ImageId |
string |
ID gambar yang disalin. |
m-bp1h46wfpjsjastd**** |
| RequestId |
string |
ID permintaan. |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E |
Contoh
Respons sukses
JSONformat
{
"ImageId": "m-bp1h46wfpjsjastd****",
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E"
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidDescription.Malformed | The specified destination description is wrongly formed. | Format deskripsi Sumber daya yang ditentukan tidak valid. Deskripsi harus memiliki panjang 2 hingga 256 karakter dan tidak boleh diawali dengan http:// atau https://. |
| 400 | SourceRegion.NotFound | The source region not found. | |
| 400 | DestinationRegion.NotFound | The destination region not found. | Wilayah tujuan yang ditentukan tidak ada. |
| 400 | IncorrectImageStatus | The image not available. | Penyalinan image gagal. |
| 400 | InvalidSnapshotId.NotFound | The specified SnapshotId does not exist. | Snapshot yang ditentukan tidak ada. Pastikan snapshot benar. |
| 400 | InvalidImageName.Duplicated | The specified image name is already in use in the target region. Please try a different one. | Nama image sudah ada. |
| 400 | InvalidParameter.EncryptedIllegal | The Encrypted parameter must be set to true when KMSKeyId is specified. Please adjust the parameters and try again. | |
| 400 | InvalidEncrypted.NotMatchEncryptAlgorithm | The Encrypted parameter must be set to true when EncryptAlgorithm is specified. Please adjust the parameters and try again. | |
| 400 | InvalidEncryptAlgorithm | The specified EncryptAlgorithm is not valid. Ensure the value is a supported encryption algorithm such as AES-256. | |
| 400 | InvalidEncrypted.NotMatchKmsKeyId | The Encrypted parameter must be set to true when KMSKeyId is specified. Please adjust the parameters and try again. | |
| 400 | OperationDenied.CommunityImage | Community image does not support copy. | Gambar komunitas tidak mendukung penyalinan. |
| 400 | InvalidImageName.Malformed | The specified destination image name is wrongly formed. | Nama image tidak valid. Untuk informasi selengkapnya tentang konvensi penamaan, lihat deskripsi metrik parameter DestinationImageName. |
| 400 | InvalidParameter.KmsNotEnabled | The specified operation need enable KMS. | Operasi saat ini memerlukan Key Management Service (KMS) untuk diaktifkan. |
| 400 | OperationDenied.ImageCopyConflict | The same image cannot be copied concurrently. Please wait until the last copy is completed before performing the next operation. | Penyalinan gambar yang sama secara bersamaan tidak diizinkan. Tunggu hingga penyalinan sebelumnya selesai sebelum memulai penyalinan baru. |
| 400 | Account.Arrearage | Your account has an outstanding payment. | Saldo akun Anda tidak mencukupi. Isi ulang akun Anda sebelum melanjutkan. |
| 400 | Duplicate.TagKey | The Tag.N.Key contain duplicate key. | Terdapat kunci duplikat pada tag. Pastikan semua kunci unik. |
| 401 | InvalidAliUid.IsNull | The aliUid must not be null. | |
| 500 | InternalError | The request processing has failed due to some unknown error, exception or failure. | Terjadi kesalahan internal. Coba lagi. |
| 403 | Forbbiden | User not authorized to operate on the specified resource. | Pengguna tidak diizinkan untuk melakukan operasi pada sumber daya yang ditentukan. |
| 403 | InvalidOperation.CopyingDataFromThisRegionUnsupported | Data transfer from the current region to other regions is not supported. | Replikasi data dari wilayah saat ini ke wilayah lain tidak didukung. |
| 403 | InvalidOperation.CopyingDataToThisRegionUnsupported | Only Some Regions %s can copy data to this region. | Hanya wilayah tertentu yang dapat mereplikasi data ke wilayah saat ini. |
| 403 | QuotaExceed.Image | The number of images exceeds the limit (%s). | Kuota gambar kustom telah habis. |
| 403 | QuotaExceed.Snapshot | The snapshot quota exceeds. | |
| 403 | OperationDenied.ImageCopying | The image is currently being copied. Please try again later. | Image sedang disalin. Coba lagi nanti. |
| 403 | RegionNotSupportCopy | The region not support copy. | |
| 403 | InvalidSnapshot.TooOld | This operation is denied because the specified snapshot is created before 2013-07-15. | Snapshot sumber dari disk yang ditentukan dibuat pada atau sebelum 15 Juli 2013, dan tidak dapat diinisialisasi ulang. |
| 403 | OperationDenied | The specified snapshot is not allowed to create image. | Snapshot yang ditentukan tidak mengizinkan pembuatan volume data. |
| 403 | IncorrectDestinationRegion | The destination region is not equal the target region. | |
| 403 | OperationDeined.EncryptedSnapshot | The image contains encrypted snapshots, which do not support copying. | Image berisi snapshot terenkripsi. |
| 403 | OperationDenied.SameRegionOnly | The image shared from others can not be copied to another region directly. | Image yang dibagikan oleh pengguna lain tidak dapat disalin ke wilayah lain. |
| 403 | OperationDenied.NotPublished | The operation is denied because corresponding marketplace image is not published in destination region. | Operasi yang ditentukan tidak dapat dilakukan. Image sumber dari image tersebut berasal dari Alibaba Cloud Marketplace dan belum dipublikasikan di wilayah tujuan. |
| 403 | OperationDenied.NotAuthorized | The operation is denied because corresponding marketplace image is not authorized to current user. | |
| 403 | OperationDenied.EncryptSnapshotAcrossRegion | The image do not contain encrypted snapshots, which do not support copying to encrypted ones. | |
| 403 | InvalidParameter.KMSKeyId.KMSUnauthorized | 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 | InvalidRegion.NotSupport | The specified region does not support customer master keys. Please choose another region or use a default KMS key and try again. | |
| 403 | UserNotInTheWhiteList | The user is not in byok white list. | Pengguna tidak berada dalam daftar putih Shared Block Storage. Kirim tiket untuk mengajukan permohonan masuk daftar putih. |
| 403 | InvalidRegionId.NotSupportEncryptAlgorithm | The parameter EncryptAlgorithm is not supported. Please remove EncryptAlgorithm and try again. | |
| 403 | OperationDenied.KmsServiceUnauthorized | 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 | OperationDenied.NonCompliantDestinationRegion | The copy operation to the destination region is not in compliance with regulations. | Wilayah tujuan tidak memenuhi persyaratan kepatuhan keamanan. |
| 403 | InvalidEncrypted.NotMatchDiskDefaultEncryption | The specified parameter Encrypted not match for your account default encryption settings. | Parameter enkripsi tidak cocok dengan konfigurasi enkripsi disk secara default pada akun saat ini. |
| 403 | SizeExceed.Image | The image exceeds the maximum size. You can use the CopySnapshot API to copy your snapshots of the image and then create a new image from them. | Ukuran image yang ditentukan melebihi batas. Buat tiket untuk meminta peningkatan batas. |
| 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 | InvalidOperation.VhdImageUnsupported | The specified vhd image is not supported for this operation. Please switch to a raw image and retry. | Image format VHD tidak mendukung operasi ini. Beralih ke image format RAW dan coba lagi. |
| 403 | InvalidOperation.CloudBoxImageCopyUnsupported | Copying CloudBox images is not supported. | Image CloudBox tidak mendukung penyalinan. |
| 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. | |
| 404 | InvalidImageId.NotFound | The specified ImageId does not exist. | Image yang ditentukan tidak ada di bawah akun ini. Periksa apakah ID image benar. |
| 404 | 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. | |
| 404 | InvalidResourceGroup.NotFound | The ResourceGroup provided does not exist in our records. | Kelompok sumber daya tidak ditemukan dalam catatan. |
| 409 | InvalidOperation.Conflict | Request was denied due to conflict with a previous request, please try again later. | Operasi ini tidak diizinkan karena adanya konflik tugas. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.