Deletes an image component by specifying the RegionId and ImageComponentId parameters.
Operation description
Only custom image components that you have created can be deleted.
Before deleting a component, make sure that the component is not used in any template. Otherwise, the deletion fails.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ecs:DeleteImageComponent |
delete |
*ImageComponent
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
The region ID. You can call DescribeRegions to query the most recent region list. |
cn-hangzhou |
| RegionId |
string |
Yes |
所属的地域 ID。您可以调用 DescribeRegions 查看最新的阿里云地域列表。 |
cn-hangzhou |
| ImageComponentId |
string |
Yes |
The ID of the image component to delete. |
ic-bp67acfmxazb4p**** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E |
Examples
Success response
JSON format
{
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 403 | InvalidImageComponent.InUse | %s. | The current component is being used by the image pipeline and cannot be deleted. |
| 404 | InvalidImageComponent.NotFound | %s | The specified image component does not exist. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.