GetImageCache

Updated at:

Queries the details of an image cache.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

acc:GetImageCache

get

*ImageCache

acs:acc:{#regionId}:{#accountId}:imagecache/{#ImageCacheId}

None None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

Yes

The region ID.

cn-hangzhou

ImageCacheId

string

Yes

The image cache ID.

imc-bp1dj*****

Response elements

Element

Type

Description

Example

object

The response parameters.

RequestId

string

The request ID.

0E234675-3465-4CC3-9D0F-9A864BC*****

RegionId

string

The region ID.

cn-hangzhou

ImageCacheId

string

The image cache ID.

imc-bp1dj*****

ImageCacheName

string

The name of the image cache.

my-imc

Status

string

The status of the image cache.

Ready

Images

array

The names of the container images in the image cache.

string

The name of the container image.

registry-vpc.cn-hangzhou.aliyuncs.com/*****/*****:v1

Size

integer

The size of the image cache. Unit: GiB. Minimum value: 1 GiB.

8

CreateTime

string

The time when the image cache was created, in ISO 8601 format and UTC.

2025-**-**T07:55:25Z

ReadyTime

string

The time when the image cache becomes active, in ISO 8601 format and UTC.

2025-**-**T07:58:25Z

ResourceGroupId

string

The resource group ID.

rg-aekzh43v*****

Tags

array<object>

The tags of the image cache. Up to 20 tags are supported.

object

The tag of the image cache.

Key

string

The tag key of the image cache.

imc

Value

string

The tag value of the image cache.

test

Events

array<object>

The events of the image cache.

object

The event of the image cache.

Count

integer

The number of times the event was triggered.

1

Type

string

The event type.

Normal

Name

string

The event name.

imagetest.1661f31f851*****

Reason

string

The cause of the event.

ImageCacheCreated

Message

string

The event message.

Image cache [my-imc] has been created successfully

FirstTimestamp

string

The time when the event first occurred.

2025-**-**T02:24:48Z

LastTimestamp

string

The time when the event last occurred.

2025-**-**T02:24:48Z

PaymentType

string

The billing method.

PayAsYouGo

NetworkConfig

object

The network configurations for pulling images when the image cache is created.

VSwitchIds

array

The vSwitch IDs.

string

The vSwitch ID.

vsw-0jlqxyfxgdw4tzqy*****

SecurityGroupId

string

The security group ID.

sg-0jlgektkddwa42n*****

EipInstance

object

The configurations of the elastic IP address (EIP) instance.

InstanceId

string

The elastic IP address.

eip-0jl0bx3fnpnjc9i4*****

AutoCreate

boolean

Specifies whether to automatically create an EIP.

true

Bandwidth

integer

The bandwidth of the automatically created EIP. Unit: Mbit/s.

100

Platform

string

The platform type of the image cache. Valid values: linux/amd64 and windows/amd64.

windows/amd64

Type

string

The image cache type. Valid values: General, Base, and Derived.

General

Examples

Success response

JSON format

{
  "RequestId": "0E234675-3465-4CC3-9D0F-9A864BC*****",
  "RegionId": "cn-hangzhou",
  "ImageCacheId": "imc-bp1dj*****",
  "ImageCacheName": "my-imc",
  "Status": "Ready",
  "Images": [
    "registry-vpc.cn-hangzhou.aliyuncs.com/*****/*****:v1"
  ],
  "Size": 8,
  "CreateTime": "2025-**-**T07:55:25Z",
  "ReadyTime": "2025-**-**T07:58:25Z",
  "ResourceGroupId": "rg-aekzh43v*****",
  "Tags": [
    {
      "Key": "imc",
      "Value": "test"
    }
  ],
  "Events": [
    {
      "Count": 1,
      "Type": "Normal",
      "Name": "imagetest.1661f31f851*****",
      "Reason": "ImageCacheCreated",
      "Message": "Image cache [my-imc] has been created successfully",
      "FirstTimestamp": "2025-**-**T02:24:48Z",
      "LastTimestamp": "2025-**-**T02:24:48Z"
    }
  ],
  "PaymentType": "PayAsYouGo",
  "NetworkConfig": {
    "VSwitchIds": [
      "vsw-0jlqxyfxgdw4tzqy*****"
    ],
    "SecurityGroupId": "sg-0jlgektkddwa42n*****",
    "EipInstance": {
      "InstanceId": "eip-0jl0bx3fnpnjc9i4*****",
      "AutoCreate": true,
      "Bandwidth": 100
    }
  },
  "Platform": "windows/amd64",
  "Type": "General"
}

Error codes

HTTP status code

Error code

Error message

Description

400 InvalidParameter %s. Invalid parameter
400 InvalidParameter.LengthExceeded %s. Array parameter exceeds maximum length
400 InvalidParameter.ValueExceeded %s. Parameter exceeds upper value limit
400 MissingParameter %s. Missing parameter
400 InvalidParameter.NotFound %s. The specific parameter does not exist.
403 EntityNotExist.ResourceId The resource does not exist. The resource does not exist
403 EntityNotExist.ResourceGroup The resource group does not exist. The resource group does not exist
403 RegionNotSupport The specified Region is not supported. The specified Region is not supported
403 ImageCache.NotExist The specified image cache does not exist. The specified image cache does not exist

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.