Mengimpor file image lokal ke Elastic Compute Service (ECS) sebagai gambar kustom yang muncul di wilayah yang ditentukan. Anda kemudian dapat menggunakan image yang diimpor untuk membuat Instans ECS (RunInstances) atau mengganti disk sistem dari sebuah instans (ReplaceSystemDisk).
Deskripsi operasi
Deskripsi operasi.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ecs:ImportImage |
update |
*Image.
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
ID wilayah dari gambar kustom sumber. Anda dapat memanggil DescribeRegions untuk mengkueri daftar wilayah terbaru. |
cn-hangzhou. |
| ImageName |
string |
No |
Nama image. Panjang nama harus 2 hingga 128 karakter. Harus dimulai dengan huruf atau karakter Tionghoa dan tidak boleh dimulai dengan |
ImageTestName. |
| Description |
string |
No |
Deskripsi image. Panjang deskripsi harus 2 hingga 256 karakter dan tidak boleh dimulai dengan |
TestDescription. |
| Architecture |
string |
No |
Arsitektur sistem. Nilai valid: |
x86_64 |
| OSType |
string |
No |
Tipe sistem operasi. Nilai valid: |
linux. |
| Platform |
string |
No |
Distribusi sistem operasi. Nilai valid: |
Aliyun. |
| BootMode |
string |
No |
Mode boot image. Nilai valid: |
BIOS. |
| RoleName |
string |
No |
Nama peran RAM yang digunakan untuk mengimpor image. |
AliyunECSImageImportDefaultRole. |
| LicenseType |
string |
No |
Tipe lisensi. Parameter ini menentukan mode otorisasi saat instans dibuat dengan memanggil RunInstances menggunakan image ini. Nilai ini hanya berlaku untuk image Windows Server. Nilai valid: |
BYOL. |
| ResourceGroupId |
string |
No |
ID kelompok sumber daya perusahaan tempat image yang diimpor berada. |
rg-bp67acfmxazb4p**** |
| DiskDeviceMapping |
array<object> |
No |
Daftar informasi gambar kustom yang akan dibuat. |
|
|
object |
No |
Daftar informasi gambar kustom yang akan dibuat. |
||
| DiskImSize |
integer |
No |
Ukuran gambar kustom. Unit: GiB. |
80 |
| Device |
string |
No |
Nama perangkat DiskDeviceMapping.N.Device dalam gambar kustom. |
null. |
| OSSBucket |
string |
No |
Bucket OSS tempat file image disimpan. |
ecsimageos. |
| Format |
string |
No |
Format image. Nilai valid: |
QCOW2 |
| OSSObject |
string |
No |
Nama (kunci) file image yang disimpan di bucket OSS setelah image diunggah ke OSS. |
CentOS_5.4_32.raw. |
| DiskImageSize |
integer |
No |
Ukuran ruang gambar kustom setelah image diimpor. |
80 |
| Tag |
array<object> |
No |
Daftar tag image. |
|
|
object |
No |
Daftar tag image. |
||
| Key |
string |
No |
Kunci tag image. Nilai valid N: 1 hingga 20. Kunci tag tidak boleh berupa string kosong. Panjang kunci tag maksimal 128 karakter dan tidak boleh dimulai dengan |
TestKey. |
| Value |
string |
No |
Nilai tag image. Nilai valid N: 1 hingga 20. Nilai tag dapat berupa string kosong. Panjang nilai tag maksimal 128 karakter dan tidak boleh dimulai dengan |
TestValue. |
| DetectionStrategy |
string |
No |
Strategi deteksi image. Jika parameter ini tidak ditentukan, deteksi tidak akan dipicu. Hanya mode deteksi Jenis Penyimpanan Standar yang didukung. |
Jenis Penyimpanan Standar |
| StorageLocationArn |
string |
No |
Alibaba Cloud Resource Name (ARN) dari CloudBox, yang secara unik mengidentifikasi lokasi penyimpanan cloud. |
arn:acs:cloudbox:cn-hangzhou:123456:cloudbox/cb-xx***123 |
| DryRun |
boolean |
No |
Apakah akan menjalankan dry run saja. Nilai valid: |
false. |
| Features |
object |
No |
Properti terkait fitur image. |
|
| NvmeSupport |
string |
No |
Apakah image mendukung NVMe. |
supported. |
| ImdsSupport |
string |
No |
Mode akses metadata image. Nilai valid: |
v2 |
| ClientToken |
string |
No |
Token klien yang digunakan untuk memastikan idempotensi permintaan. Anda dapat menggunakan klien untuk menghasilkan token, tetapi pastikan token tersebut unik di antara berbagai permintaan. Nilai 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 |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
ID permintaan. |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3**** |
| ImageId |
string |
ID image. |
m-bp67acfmxazb4p**** |
| TaskId |
string |
ID tugas Impor gambar. |
t-bp67acfmxazb4p**** |
| RegionId |
string |
ID wilayah. |
cn-hangzhou. |
Contoh
Respons sukses
JSONformat
{
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3****",
"ImageId": "m-bp67acfmxazb4p****",
"TaskId": "t-bp67acfmxazb4p****",
"RegionId": "cn-hangzhou."
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | UnsupportedSuffix.OSSObject | The specified OSS object suffix is not supported. | Sufiks objek OSS yang ditentukan tidak didukung. |
| 400 | MissingParameter | An input parameter "RegionId" that is mandatory for processing the request is not supplied. | |
| 400 | InvalidImageName.Malformed | The specified Image name is wrongly formed. | Panjang nama image harus 2 hingga 128 karakter. Nama harus dimulai dengan huruf atau karakter Tionghoa dan dapat berisi angka, titik dua (:), garis bawah (_), atau tanda hubung (-). |
| 400 | InvalidOSSObject.Malformed | The specified OSS object is wrongly formed. | Objek OSS yang ditentukan tidak valid. |
| 400 | InvalidOSSBucket.Malformed | The specified OSS bucket is wrongly formed. | |
| 400 | InvalidOSSObject.Size | The specified OSS object size is zero. | OSSObject yang ditentukan kosong. |
| 400 | InvalidDescription.Malformed | The specified Image description is wrongly formed. | Parameter description yang ditentukan tidak valid. |
| 400 | InvalidArchitecture.Malformed | The specified Architecture is wrongly formed. | Parameter Architecture yang ditentukan tidak valid. Periksa apakah format parameter ini sudah benar. |
| 400 | InvalidPlatform.Malformed | The specified Platform is wrongly formed. | Platform yang ditentukan tidak valid. |
| 400 | InvalidOSType.Malformed | The specified OSType is wrongly formed. | Format tidak valid. |
| 400 | InvalidImageName.Duplicated | The destination image is exist. | |
| 400 | InvalidImageSize | %s | Ukuran image tidak memenuhi persyaratan. |
| 400 | InvalidDataDiskSize | The specified DiskDeviceMapping.N.DiskImSize should be in the specified range. | DiskDeviceMapping.N.DiskImSize yang ditentukan berada di luar rentang valid. |
| 400 | InvalidImageFormat.Malformed | The specified Image Format is wrongly formed. | Format image yang ditentukan tidak valid. |
| 400 | InvalidRegionId.NotFound | The specified RegionId does not exist. | |
| 400 | InvalidRegion.NotSupport | The specified region does not support image import or export. | Wilayah tidak mendukung Bring Your Own Key (BYOK). |
| 400 | InvalidOSSBucket.NotFound | The specified OSS bucket does not exist in this region. | Bucket yang ditentukan tidak ada. |
| 400 | InvalidOSSObject.NotFound | The specified OSS object does not exist in this region. | |
| 400 | InvalidOSSObject.NeedRestore | The specified OSS object is a archive object, need restore first. | |
| 400 | InvalidOSSBucket.NotMatched | The specified OSS bucket is incorrect, %s. | Bucket OSS yang ditentukan tidak valid. Untuk informasi lebih lanjut, lihat pesan error aktual yang dikembalikan. |
| 400 | InvalidLicenseType.NotSupported | The specified LicenseType is not supported. | |
| 400 | InvalidLicenseType.BYOLOnly | Only BYOL LicenseType is supported for the current platform provided. | |
| 400 | InvalidOSSBucket.FlowLimit | %s | |
| 400 | InvalidImageFormat.RegionNotSupported | The specified image format is not supported in current region. | |
| 400 | InvalidBootMode.Malformed | The specified parameter "BootMode" is malformed. | |
| 400 | InvalidParameter.DetectionStrategy | The specified parameter DetectionStrategy is invalid. | |
| 400 | InvalidBootMode.NotSupport | The specified parameter BootMode is not supported for current image architecture. | Arsitektur image saat ini tidak mendukung pengaturan mode boot ini. |
| 400 | DRYRUN.SUCCESS | This request is a dryrun request with successful result. | Permintaan ini adalah permintaan DryRun (simulasi). Kode kesalahan ini menunjukkan bahwa permintaan telah lulus validasi. |
| 400 | InvalidClientToken.Malformed | The specified parameter clientToken is not valid. | Parameter ClientToken yang ditentukan tidak memenuhi persyaratan format. Parameter hanya boleh berisi karakter ASCII dan panjangnya tidak boleh melebihi 64 karakter. |
| 400 | InvalidParameter.FeaturesImdsSupport | The specified parameter Features.ImdsSupport is not supported. | Parameter Features.ImdsSupport yang ditentukan tidak didukung. |
| 400 | Account.Arrearage | Your account has an outstanding payment. | Akun Anda memiliki pembayaran yang belum diselesaikan. |
| 403 | ImageIsImporting | The specified Image is importing. | |
| 403 | QuotaExceed.Image | The Image Quota exceeds. | |
| 403 | ImportImageFailed | Importing image is failed, Please contact the administrator. | Gagal mengimpor image. Hubungi administrator sistem untuk pemecahan masalah. |
| 403 | UserNotInTheWhiteList | The user is not in the white list of importing image. | |
| 403 | NoSetRoletoECSServiceAcount | ECS service account Have no right to access your OSS.please attach a role of access your oss to ECS service account. | |
| 403 | InvalidParameter.Malformed | The specified parameter "DiskDeviceMapping.n.Device " is not valid. | |
| 403 | MissingParameter.DiskDeviceMapping | The specified parameter DiskDeviceMapping is not supplied. | Parameter DiskDeviceMapping tidak boleh kosong. |
| 403 | InvalidOSS.NotAuthorized | The specified OSS bucket or object is not allowed to access. | Anda tidak memiliki izin untuk mengakses bucket OSS dan objek yang ditentukan. |
| 403 | InvalidBlockSize.NotSupport | %s | Ukuran partisi file image tidak didukung. |
| 403 | InvalidImageFormat.Malformed | %s | |
| 403 | ImageCheckUnsupported.WindowsImage | Image check is unsupported for windows image. | |
| 403 | InvalidVHDImage.IncorrectSize | The specified size of the VHD image does not meet the 'header.MaxTableEntries * header.BlockSize' specification. | Ukuran image VHD yang ditentukan tidak sesuai dengan spesifikasi 'header.MaxTableEntries * header.BlockSize'. |
| 403 | InvalidOSSBucket.EncryptUnsupported | Accessing objects from encrypted OSS bucket is not supported. | Membaca objek dari bucket OSS terenkripsi tidak didukung. |
| 403 | InvalidArchitecture.PlatformUnsupported | The OS platform you selected does not support the specified architecture. | Platform sistem operasi yang Anda pilih tidak mendukung tipe arsitektur yang ditentukan. |
| 403 | InvalidAccountStatus.OSSDisabled | OSS is disabled due to invalid account status. | OSS dinonaktifkan karena status akun tidak valid. |
| 403 | InvalidStorageLocation.NotFound | The specified cloud box storage location %s could not be found. | Lokasi penyimpanan CloudBox yang ditentukan tidak dapat ditemukan. |
| 403 | InvalidOperation.CloudBoxImageImportRoleRequired | The role for cloud box image import is not set to the ECS service. | Peran untuk mengimpor image CloudBox belum ditetapkan ke layanan ECS. |
| 403 | InvalidOperation.CloudBoxImageImportUnsupported | Importing cloud box images is not supported. | Mengimpor image CloudBox tidak didukung. |
| 403 | TagKey.Duplication | The TagKey has duplication with others, case-insensitive. | Parameter Tag.N.Key yang ditentukan berisi nilai duplikat. Nilai parameter ini tidak peka huruf besar/kecil. Periksa apakah nilai parameter duplikat ditentukan. |
| 404 | InvalidResourceGroup.NotFound | The ResourceGroup provided does not exist in our records. | Kelompok sumber daya terkait tidak ditemukan. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.