カスタムイメージを削除します。ImageId および Force パラメーターを指定してカスタムイメージを削除できます。
操作説明
カスタムイメージの削除が許可されないシナリオおよびイメージ削除後の注意事項については、カスタムイメージの削除を参照してください。
今すぐお試しください
テスト
RAM 認証
|
アクション |
アクセスレベル |
リソースタイプ |
条件キー |
依存アクション |
|
ecs:DeleteImage |
delete |
*Image
|
なし | なし |
リクエストパラメーター
|
パラメーター |
型 |
必須 / 任意 |
説明 |
例 |
| RegionId |
string |
必須 |
カスタムイメージのリージョン ID。 DescribeRegions を呼び出して、最新のリージョンリストをクエリできます。 |
cn-hangzhou |
| ImageId |
string |
必須 |
イメージ ID。指定されたカスタムイメージが存在しない場合、リクエストは無視されます。 |
m-bp67acfmxazb4p**** |
| Force |
boolean |
任意 |
カスタムイメージを強制的に削除するかどうかを指定します。有効な値:
デフォルト値: false。 |
false |
| DryRun |
boolean |
任意 |
レスポンスフィールド
|
フィールド |
型 |
説明 |
例 |
|
object |
|||
| RequestId |
string |
リクエスト ID |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E |
例
成功レスポンス
JSONJSON
{
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E"
}
エラーレスポンス
JSONJSON
{
"RequestId": "CEF72CEB-54B6-4AE8-B225-F876FF7BA984"
}
エラーコード
|
HTTP ステータスコード |
エラーコード |
エラーメッセージ |
説明 |
|---|---|---|---|
| 403 | ImageUsingByInstance | The specified image has been used to create instances. You can use the DescribeInstances API to query these instances, or you can use the force parameter to proceed. | |
| 403 | ImageUseShared | The specified image has been shared to others. You can use the DescribeImageSharePermission API to query the users who have been shared. | |
| 403 | OperationDenied.ImageCopying | The image is being copied. Please use the CancelCopyImage API. | |
| 403 | ImageIsImporting | The specified Image is importing. | |
| 403 | ImageIsExporting | The specified image is currently being exported. You can use the DescribeTasks API to check the status of related tasks and cancel them if needed. | |
| 403 | ImageIsPublic | You can not delete public image, please modify it to private. | |
| 404 | InvalidImageId.NotFound | The specified ImageId does not exist. |
完全なリストについては、「エラーコード」をご参照ください。
変更履歴
完全なリストについては、「変更履歴」をご参照ください。