Skip to main content

Get

Returns the specified Image resource.

To get the list of available Image resources, make a List request.

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

const GetImageRequest = cloudApi.compute.image_service.GetImageRequest;

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

const result = await client.get(
GetImageRequest.fromPartial({
imageId: "imageId",
})
);
console.log(result);
})();

GetImageRequest

imageId : string

ID of the Docker image resource to return.

To get the Docker image ID use a ImageService.List request.

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.