Mengubah atribut gambar kustom, seperti keluarga gambar, nama, mode boot, status, dan dukungan NVMe. Anda dapat menentukan parameter seperti ImageId dan ImageFamily.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ecs:ModifyImageAttribute |
update |
*Image
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
ID wilayah gambar kustom. Anda dapat memanggil operasi DescribeRegions untuk mengkueri daftar wilayah terbaru. |
cn-hangzhou |
| ImageId |
string |
Yes |
ID gambar kustom. |
m-bp18ygjuqnwhechc**** |
| ImageName |
string |
No |
Nama gambar kustom. Panjang nama harus 2 hingga 128 karakter. Harus diawali dengan huruf atau karakter Tionghoa. Tidak dapat diawali dengan aliyun atau acs: dan tidak dapat mengandung http:// atau https://. Dapat berisi angka, titik (.), titik dua (:), garis bawah (_), atau tanda hubung (-). Nilai default: kosong. Secara default, nama asli dipertahankan. |
testImageName |
| Status |
string |
No |
Status gambar. Nilai valid:
Catatan
Jika Anda ingin mengembalikan gambar kustom dalam keluarga gambar ke versi sebelumnya, Anda dapat mengatur gambar kustom available terbaru ke status deprecated. Namun, jika gambar tersebut adalah satu-satunya gambar kustom available dalam keluarga gambar, tidak ada gambar kustom available yang dapat digunakan untuk membuat instans dalam keluarga gambar setelah gambar tersebut di-deprecated. Lakukan dengan hati-hati. |
Deprecated |
| ImageFamily |
string |
No |
Nama keluarga gambar. Panjang nama harus 2 hingga 128 karakter. Harus diawali dengan huruf atau karakter Tionghoa. Tidak dapat diawali dengan aliyun atau acs: dan tidak dapat mengandung http:// atau https://. Dapat berisi angka, titik (.), titik dua (:), garis bawah (_), atau tanda hubung (-). Nilai default: kosong. |
hangzhou-daily-update |
| BootMode |
string |
No |
Mode boot baru gambar. Nilai valid:
Penting
Untuk mencegah instans gagal dimulai karena mode boot baru tidak didukung oleh gambar, pastikan Anda memahami mode boot yang didukung oleh gambar sebelum mengubahnya. Untuk informasi selengkapnya tentang mode boot gambar, lihat Boot modes. Valid values:
|
BIOS |
| LicenseType |
string |
No |
Tipe lisensi yang digunakan untuk mengaktifkan sistem operasi setelah gambar diimpor. Saat ini, hanya BYOL yang didukung. BYOL: Lisensi yang disertakan dengan sistem operasi sumber. Saat menggunakan BYOL, pastikan kunci lisensi Anda didukung oleh Alibaba Cloud. |
BYOL |
| Description |
string |
No |
Deskripsi gambar kustom. Panjang deskripsi harus 2 hingga 256 karakter. Tidak dapat diawali dengan http:// atau https://. Nilai default: kosong. Secara default, deskripsi asli dipertahankan. |
testDescription |
| Features |
object |
No |
Atribut yang terkait dengan fitur gambar. |
|
| NvmeSupport |
string |
No |
Apakah gambar mendukung NVMe. Nilai valid:
|
supported |
| ImdsSupport |
string |
No |
Mode akses metadata gambar. Nilai valid:
|
v2 |
| DryRun |
boolean |
No |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
ID permintaan. |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3**** |
Contoh
Respons sukses
JSONformat
{
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3****"
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidImageName.Malformed | Image names must be between 2 and 128 characters long, using either English or Chinese characters. The name must start with a letter or a Chinese character, and can include numbers, colons, underscores and hyphens. | |
| 400 | MissingParameter | The input parameter "RegionId" that is mandatory for processing this request is not supplied. | |
| 400 | InvalidImageName.Duplicated | The specified Image name has already bean used. | |
| 400 | InvalidDescription.Malformed | The specified description is wrongly formed. | |
| 400 | ImageQuotaFull.ImageFamily | The specified image family has exceeded max number of images for one image family. | |
| 400 | InvalidImageFamily.Malformed | The specified parameter "ImageFamily" is malformed. | |
| 400 | ImageFamilyQuotaFull | The specified region has exceeded max number of image family. | |
| 400 | InvalidBootMode.NotSupport | The specified parameter BootMode is not supported. | |
| 400 | InvalidLicenseType.NotSupported | The specified parameter LicenseType is not supported. | |
| 400 | InvalidParameter.FeaturesImdsSupport | The specified parameter Features.ImdsSupport is not supported. | |
| 403 | ImageStatus.NotAvailable | The specified image status is not available. | |
| 403 | ImageStatus.NotDeprecated | The specified image status is not deprecated. | |
| 403 | ImageUseShared | The specified image has been shared to others, please remove shared accounts first. | |
| 403 | OperationDeined.ImageUsingByInstance | The boot mode of the image cannot be modified because it has associated instances. | |
| 403 | InvalidOperation.FeaturesImdsSupportNotMatch | The specified parameter Features.ImdsSupport can not be set to v1 from v2. | |
| 403 | InvalidStatus.ImageIsCreating | The operation cannot be performed because the image is creating. Please wait until the creation is complete and try again. | |
| 403 | InvalidOperation.PublicImageUnsupported | The community image's publisher is not the current account. Modification is not permitted. | |
| 403 | InvalidDescription.Malformed | The specified parameter description is not valid. | |
| 404 | InvalidImageId.NotFound | The specified ImageId does not exist. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.