Queries information about image caches.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
eci:DescribeImageCaches | get |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
RegionId | string | Yes | The region ID of the image caches. | cn-hangzhou |
ImageCacheId | string | No | The IDs of the image caches. | imc-bp195erqe9o2pb09**** |
ImageCacheName | string | No | The names of the image caches. | testcache |
SnapshotId | string | No | The IDs of the snapshots that correspond to the image caches. | s-2zec5oj8e1yhxijt**** |
Image | string | No | The container images. | nginx |
ResourceGroupId | string | No | The ID of the resource group to which the image caches belong. | rg-2df3isufhi38**** |
Tag | array<object> | No | The tags to add to the image caches. | |
object | No | The information about the tag. A maximum of 20 tags can be added to the image cache. | ||
Key | string | No | The key of tag N of the image cache. | imc |
Value | string | No | The value of tag N of the image cache. | test |
MatchImage | array | No | The container images used to match the image caches that you want to query. You can specify a maximum of 100 container images. | |
string | No | The container image used to match the image caches that you want to query. | registry-vpc.cn-hangzhou.aliyuncs.com/eci_open/nginx:1.15.10-perl | |
Limit | integer | No | The maximum entries of query results that are allowed to be displayed. | 20 |
NextToken | string | No | The pagination token that is used in the next request to retrieve a new page of results. You must specify the token that is obtained from the previous query as the value of NextToken. | AAAAAdDWBF2**** |
ImageFullMatch | boolean | No | Specifies whether the image layers of the image caches must contain all image layers of the container image. | true |
ImageMatchCountRequest | integer | No | The quantity of image caches whose image layers contain all image layers of the container image. | 3 |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "39FC2E43-3DD7-4CEF-9EF4-E4AD6E635301",
"ImageCaches": [
{
"Images": [
"registry-vpc.cn-hangzhou.aliyuncs.com/eci_open/nginx:1.15.10-perl"
],
"CreationTime": "2021-02-09T02:24:07Z",
"Status": "Ready",
"Progress": "100%",
"ExpireDateTime": "2019-11-10T09:00:48Z",
"LastMatchedTime": "2021-08-18T03:48:10Z",
"ContainerGroupId": "eci-bp18oq3m15prd9jb****",
"Tags": [
{
"Key": "imc",
"Value": "test"
}
],
"Events": [
{
"Type": "Normal",
"LastTimestamp": "2021-02-09T02:24:48Z",
"Message": "Successfully check image cache resource.",
"Name": "imagetest.1661f31f851a****",
"Count": 1,
"FirstTimestamp": "2021-02-09T02:24:48Z",
"Reason": "Started"
}
],
"ImageCacheId": "imc-bp195erqe9o2pb09****",
"RegionId": "cn-beijing",
"SnapshotId": "s-2zec5oj8e1yhxijt****",
"FlashSnapshotId": "s-bp12w3v37sit96t6****",
"ResourceGroupId": "rg-2df3isufhi38****",
"ImageCacheSize": 20,
"ImageCacheName": "imagetest",
"EliminationStrategy": "LRU"
}
],
"NextToken": "AAAAAdDWBF2****",
"TotalCount": 15
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | Account.Arrearage | Your account has an outstanding payment. | Your account has an outstanding payment. |
400 | DryRunOperation | Request validation has been passed with DryRun flag set. | Request validation has been passed with DryRun flag set. |
400 | ServiceNotEnabled | %s | You have not activated the service that is required for processing this request. |
403 | Forbidden.SubUser | The specified action is not available for you. | The specified action is not available for you. |
403 | Forbidden.UserBussinessStatus | This operation is not allowed, because you have overdue bills. Pay the overdue bill and try again. | - |
403 | Forbidden.UserNotRealNameAuthentication | This operation is not allowed, because you have not passed the real-name verification. | - |
403 | NoPermission | The RAM role does not belong to ECS. | - |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2023-09-05 | The Error code has changed. The response structure of the API has changed | View Change Details |
2023-04-17 | The Error code has changed. The request parameters of the API has changed | View Change Details |
2022-10-09 | The Error code has changed. The request parameters of the API has changed. The response structure of the API has changed | View Change Details |
2021-09-22 | The Error code has changed. The request parameters of the API has changed | View Change Details |
2021-09-22 | The Error code has changed. The response structure of the API has changed | View Change Details |
2021-08-10 | The Error code has changed. The response structure of the API has changed | View Change Details |