ModifyImageAttribute API を呼び出して、カスタムイメージの属性 (イメージ ファミリー、名前、ブートモード、ステータス、NVMe サポートの有無など) を変更します。
今すぐお試しください
テスト
RAM 認証
|
アクション |
アクセスレベル |
リソースタイプ |
条件キー |
依存アクション |
|
ecs:ModifyImageAttribute |
update |
*Image
|
なし | なし |
リクエストパラメーター
|
パラメーター |
型 |
必須 / 任意 |
説明 |
例 |
| RegionId |
string |
必須 |
カスタムイメージが配置されているリージョンの ID です。最新の Alibaba Cloud リージョンリストは、DescribeRegions API を呼び出して確認できます。 |
cn-hangzhou |
| ImageId |
string |
必須 |
カスタムイメージの ID です。 |
m-bp18ygjuqnwhechc**** |
| ImageName |
string |
任意 |
カスタムイメージの名前です。名前は 2~128 文字である必要があります。先頭は英字または漢字である必要があります。 このパラメーターを指定しない場合、元の名前を保持します。 |
testImageName |
| Status |
string |
任意 |
イメージのステータスです。有効な値:
説明
ただし、これがイメージファミリー内で唯一の利用可能なカスタムイメージである場合、これを非推奨にすると、そのファミリー内のいずれのイメージからもインスタンスを作成できなくなります。このオプションは慎重に使用してください。 |
Deprecated |
| ImageFamily |
string |
任意 |
イメージファミリーの名前です。名前は 2~128 文字である必要があります。先頭は英字または漢字である必要があります。 デフォルトでは、このパラメーターは空です。 |
hangzhou-daily-update |
| BootMode |
string |
任意 |
イメージの起動モードです。有効な値:
重要
起動失敗を防ぐため、起動モードを変更する前に、イメージがサポートしている起動モードを確認してください。詳細については、「Boot modes」をご参照ください。 列挙値:
|
BIOS |
| LicenseType |
string |
任意 |
イメージのインポート後にオペレーティングシステムをアクティベートするためのライセンスタイプです。有効な値は
|
BYOL |
| Description |
string |
任意 |
カスタムイメージの新しい説明です。説明は 2~256 文字である必要があり、 このパラメーターを指定しない場合、元の説明を保持します。 |
testDescription |
| Features |
object |
任意 |
イメージの機能です。 |
|
| NvmeSupport |
string |
任意 |
イメージが NVMe をサポートしているかどうかを指定します。有効な値:
|
supported |
| ImdsSupport |
string |
任意 |
イメージのメタデータアクセスモードです。有効な値:
|
v2 |
| DryRun |
boolean |
任意 |
リクエストが有効かどうかを確認するために、ドライランを実行するかどうかを指定します。有効な値:
|
レスポンスフィールド
|
フィールド |
型 |
説明 |
例 |
|
object |
レスポンスデータ。 |
||
| RequestId |
string |
リクエスト ID。 |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3**** |
例
成功レスポンス
JSONJSON
{
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3****"
}
エラーコード
|
HTTP ステータスコード |
エラーコード |
エラーメッセージ |
説明 |
|---|---|---|---|
| 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. | 指定されたリソースの説明の形式が無効です。長さは 2 ~ 256 文字で、先頭を http:// または https:// にすることはできません。 |
| 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. |
完全なリストについては、「エラーコード」をご参照ください。
変更履歴
完全なリストについては、「変更履歴」をご参照ください。