DeleteImageCache
Deletes the image cache association in a workspace and checks agent references and instance usage before submission.
Operation description
Deletes the image cache association in a workspace and checks agent references and instance usage before submission.
Deletion conditions
The deletion request is rejected if the cache is still referenced by an agent with the cache switch enabled, or if the cache is still in use by instances or being released. You can first query agentCount, canDelete, and deleteBlockReason by calling GetImageCache.
Query results
The imageId in the response corresponds to this request. The current implementation of deletionPending returns false. To check whether the cache is still visible, call GetImageCache or ListImageCaches.
This operation deletes the cache association in the specified workspace. It does not delete the source ACR repository or the source image.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
agentcore:DeleteImageCache |
delete |
*Workspace
|
None | None |
Request syntax
DELETE /image-caches/{imageId} HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| imageId |
string |
Yes |
The cache record ID. |
img-example |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| regionId |
string |
Yes |
The product entry region. This parameter is passed as a query parameter and must be consistent with the selected region endpoint and the workspace region. |
cn-hangzhou |
| workspaceId |
string |
Yes |
The workspace ID. |
ws-example |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The delete image cache response. |
||
| requestId |
string |
The request ID, which is used for troubleshooting. |
req-example |
| message |
string |
The response message. |
success |
| httpStatusCode |
integer |
The HTTP status code. |
200 |
| code |
string |
The business response code. |
SUCCESS |
| success |
boolean |
Indicates whether the request is successful. A successful request does not indicate that the cache creation is complete. |
true |
| data |
object |
The delete image cache result. |
|
| imageId |
string |
The image cache ID. |
img-example |
| deletionPending |
boolean |
Indicates whether the deletion is in progress. The current implementation always returns false. To check the cache visibility, call GetImageCache or ListImageCaches. |
false |
Examples
Success response
JSON format
{
"requestId": "req-example",
"message": "success",
"httpStatusCode": 200,
"code": "SUCCESS",
"success": true,
"data": {
"imageId": "img-example",
"deletionPending": false
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidArgument | The specified request parameter is invalid. | |
| 403 | Forbidden | The caller is not allowed to perform this operation. | |
| 404 | NotFound | The specified Workspace or source resource does not exist. | |
| 503 | ImageCacheUnavailable | No image cache execution resources are available in the requested cache region. | |
| 409 | ImageCacheInUse | The image cache is in use and cannot be deleted. | |
| 409 | ImageCacheBusy | A concurrent operation conflicts with deleting the image cache. Refresh its status and try again. | |
| 409 | ImageCacheDeleting | The image cache is being deleted. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.