All Products
Search
Document Center

Elastic Container Instance:DescribeImageCaches

Last Updated:Jun 10, 2026

Mengkueri detail satu atau beberapa cache gambar.

Coba sekarang

Coba API ini di OpenAPI Explorer tanpa perlu penandatanganan manual. Panggilan yang berhasil akan secara otomatis menghasilkan contoh kode SDK sesuai dengan parameter Anda. Unduh kode tersebut dengan kredensial bawaan yang aman untuk penggunaan lokal.

Test

RAM authorization

Tabel berikut menjelaskan otorisasi yang diperlukan untuk memanggil API ini. Anda dapat menentukannya dalam kebijakan Resource Access Management (RAM). Kolom pada tabel dijelaskan sebagai berikut:

  • Action: Aksi yang dapat digunakan dalam elemen Action pada pernyataan kebijakan izin RAM untuk memberikan izin guna melakukan operasi tersebut.

  • API: API yang dapat Anda panggil untuk melakukan aksi tersebut.

  • Access level: Tingkat akses yang telah ditentukan untuk setiap API. Nilai yang valid: create, list, get, update, dan delete.

  • Resource type: Jenis resource yang mendukung otorisasi untuk melakukan aksi tersebut. Ini menunjukkan apakah aksi tersebut mendukung izin tingkat resource. Resource yang ditentukan harus kompatibel dengan aksi tersebut. Jika tidak, kebijakan tersebut tidak akan berlaku.

    • Untuk API dengan izin tingkat resource, jenis resource yang diperlukan ditandai dengan tanda bintang (*). Tentukan Nama Sumber Daya Alibaba Cloud (ARN) yang sesuai dalam elemen Resource pada kebijakan.

    • Untuk API tanpa izin tingkat resource, ditampilkan sebagai All Resources. Gunakan tanda bintang (*) dalam elemen Resource pada kebijakan.

  • Condition key: Kunci kondisi yang didefinisikan oleh layanan. Kunci ini memungkinkan kontrol granular, berlaku baik hanya untuk aksi maupun untuk aksi yang terkait dengan resource tertentu. Selain kunci kondisi spesifik layanan, Alibaba Cloud menyediakan serangkaian common condition keys yang berlaku di semua layanan yang didukung RAM.

  • Dependent action: Aksi dependen yang diperlukan untuk menjalankan aksi tersebut. Untuk menyelesaikan aksi tersebut, pengguna RAM atau role RAM harus memiliki izin untuk melakukan semua aksi dependen.

Action

Access level

Resource type

Condition key

Dependent action

eci:DescribeImageCaches

get

ImageCache

acs:eci:{#regionId}:{#accountId}:imagecache/*

ImageCache

acs:eci:{#regionId}:{#accountId}:imagecache/{#imagecacheId}

  • eci:tag
None

Parameter permintaan

Parameter

Type

Required

Description

Example

RegionId

string

Yes

ID wilayah.

cn-hangzhou

RegionId

string

Yes

The region ID.

cn-hangzhou

ImageCacheId

string

No

ID cache gambar.

imc-bp195erqe9o2pb09****

ImageCacheName

string

No

Nama cache gambar.

testcache

SnapshotId

string

No

ID snapshot yang sesuai dengan cache gambar.

s-2zec5oj8e1yhxijt****

Image

string

No

Gambar kontainer.

nginx

ResourceGroupId

string

No

ID kelompok sumber daya tempat cache gambar berada.

rg-2df3isufhi38****

Tag

array<object>

No

Tag yang dilampirkan pada cache gambar.

object

No

The tags that are attached to the image cache. You can specify up to 20 tags.

Key

string

No

The key of the tag.

imc

Value

string

No

The value of the tag.

test

MatchImage

array

No

Gambar kontainer yang digunakan untuk mengkueri cache gambar yang cocok. Anda dapat menentukan hingga 100 gambar.

registry-vpc.cn-hangzhou.aliyuncs.com/eci_open/nginx:1.15.10-perl

string

No

The container images that are used to query the matched image caches. You can specify up to 100 images.

registry-vpc.cn-hangzhou.aliyuncs.com/eci_open/nginx:1.15.10-perl

Limit

integer

No

Jumlah maksimum entri yang akan dikembalikan.

20

NextToken

string

No

Token yang digunakan untuk kueri berikutnya. Anda dapat memperoleh token dari parameter NextToken pada tanggapan panggilan API sebelumnya.

AAAAAdDWBF2****

ImageFullMatch

boolean

No

Apakah akan melakukan pencocokan eksak untuk gambar kontainer.
Parameter ini digunakan untuk memfilter hasil kueri lebih lanjut saat MatchImage ditentukan.
.

true

ImageMatchCountRequest

integer

No

Jumlah cache gambar yang cocok secara eksak dengan gambar kontainer.
Parameter ini digunakan untuk memfilter hasil kueri lebih lanjut saat MatchImage ditentukan.
.

3

Elemen respons

Element

Type

Description

Example

object

RequestId

string

The ID of the request.

39FC2E43-3DD7-4CEF-9EF4-E4AD6E635301

ImageCaches

array<object>

The list of image caches.

array<object>

The list of image caches.

Images

array

The list of images in the image cache.

string

The list of images in the image cache.

registry-vpc.cn-hangzhou.aliyuncs.com/eci_open/nginx:1.15.10-perl

CreationTime

string

The time when the image cache was created.

2021-02-09T02:24:07Z

Status

string

The status of the image cache. Valid values:

  • Preparing: The image cache is being prepared.

  • Creating: The image cache is being created.

  • Ready: The image cache is created.

  • Failed: The image cache failed to be created.

  • Updating: The image cache is being updated.

  • UpdateFailed: The image cache failed to be updated.

The image cache can be used only when it is in the Ready state.

Ready

Progress

string

The progress of creating the snapshot for the image cache.

Catatan

If the instant image cache feature is enabled, a temporary local snapshot is created before a standard snapshot is created. This parameter indicates the progress of creating the standard snapshot.

100%

ExpireDateTime

string

The expiration time.

2019-11-10T09:00:48Z

LastMatchedTime

string

The last time when the image cache was matched.

2021-08-18T03:48:10Z

ContainerGroupId

string

The ID of the container group.

eci-bp18oq3m15prd9jb****

Tags

array<object>

The list of tags of the image cache.

object

The list of tags of the image cache.

Key

string

The tag key.

imc

Value

string

The tag value.

test

Events

array<object>

The events that are generated when the image is pulled for the image cache.

object

The events that are generated when the image is pulled for the image cache.

Type

string

The type of the event.

Normal

LastTimestamp

string

The time when the event ended.

2021-02-09T02:24:48Z

Message

string

The event message.

Successfully check image cache resource.

Name

string

The name of the event.

imagetest.1661f31f851a****

Count

integer

The number of events.

1

FirstTimestamp

string

The time when the event started.

2021-02-09T02:24:48Z

Reason

string

The reason for the event.

Started

ImageCacheId

string

The ID of the image cache.

imc-bp195erqe9o2pb09****

RegionId

string

The region ID.

cn-beijing

SnapshotId

string

The ID of the snapshot that corresponds to the image cache.

s-2zec5oj8e1yhxijt****

FlashSnapshotId

string

The ID of the local snapshot. If the instant image cache feature is enabled, a temporary local snapshot is created.

s-bp12w3v37sit96t6****

ResourceGroupId

string

The ID of the resource group.

rg-2df3isufhi38****

ImageCacheSize

integer

The size of the image cache. Unit: GiB.

20

ImageCacheName

string

The name of the image cache.

imagetest

EliminationStrategy

string

The policy for retaining the image cache. If you leave this parameter empty, the image cache is always retained.

You can set this parameter to LRU. This value indicates that the image cache can be automatically deleted. When the number of image caches reaches the quota limit, the system automatically deletes the least recently used image caches for which `EliminationStrategy` is set to `LRU`.

LRU

NextToken

string

The returned pagination token.

AAAAAdDWBF2****

TotalCount

integer

The total number of entries returned.

15

Contoh

Respons sukses

JSONformat

{
  "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
}

Kode kesalahan

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 The service on which this request depends has not been activated. Please activate and try again.
403 Forbidden.SubUser 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.

Lihat Error Codes untuk daftar lengkap.

Catatan rilis

Lihat Release Notes untuk daftar lengkap.