Skip to main content

List

Retrieves the list of Image resources in the specified registry or repository.

import { cloudApi, serviceClients, Session } from "@yandex-cloud/nodejs-sdk";

const ListImagesRequest = cloudApi.compute.image_service.ListImagesRequest;

(async () => {
const authToken = process.env["YC_OAUTH_TOKEN"];
const session = new Session({ oauthToken: authToken });
const client = session.client(serviceClients.ImageServiceClient);

const result = await client.list(
ListImagesRequest.fromPartial({
folderId: "folderId",
// pageSize: 0,
// pageToken: "pageToken",
// filter: "filter",
// orderBy: "orderBy"
})
);
console.log(result);
})();

ListImagesRequest

registryId : string

ID of the registry to list Docker images in.

registry_id is ignored if a ListImagesRequest.repository_name is specified in the request.

To get the registry ID use a RegistryService.List request.

repositoryName : string

Name of the repository to list Docker images in.

To get the repository name use a RepositoryService.List request.

folderId : string

ID of the folder to list Docker images in.

folder_id is ignored if a ListImagesRequest.repository_name or a ListImagesRequest.registry_id are specified in the request.

To get the folder ID use a yandex.cloud.resourcemanager.v1.FolderService.List request.

pageSize : int64

The maximum number of results per page to return. If the number of available results is larger than page_size, the service returns a ListImagesResponse.next_page_token that can be used to get the next page of results in subsequent list requests. Default value: 100.

pageToken : string

Page token. To get the next page of results, set page_token to the ListImagesResponse.next_page_token returned by a previous list request.

filter : string

A filter expression that filters resources listed in the response. The expression must specify:

  1. The field name. Currently you can use filtering only on Image.name field.
  2. An = operator.
  3. The value in double quotes ("). Must be a maximum of 256 characters long and match the regular expression [a-z0-9]+(?:[._-][a-z0-9]+)*(/([a-z0-9]+(?:[._-][a-z0-9]+)*)).
orderBy : string

ListImagesResponse

images : Image

List of Image resources.

nextPageToken : string

This token allows you to get the next page of results for list requests. If the number of results is larger than ListImagesRequest.page_size, use the next_page_token as the value for the ListImagesRequest.page_token query parameter in the next list request. Each subsequent list request will have its own next_page_token to continue paging through the results.

Image

An Image resource. For more information, see Docker image.

id : string

Output only. ID of the Docker image.

name : string

Name of the Docker image. The name is unique within the registry.

digest : string

Content-addressable identifier of the Docker image.

compressedSize : int64

Compressed size of the Docker image, specified in bytes.

config : Blob

Configuration of the Docker image.

layers : Blob

Layers of the Docker image.

tags : string

Tags of the Docker image.

Each tag is unique within the repository.

createdAt : google.protobuf.Timestamp

Output only. Creation timestamp in RFC3339 text format.

Blob

A Blob resource.

id : string

Output only. ID of the blob.

digest : string

Content-addressable identifier of the blob.

size : int64

Size of the blob, specified in bytes.

urls : string

List of blob urls.