Get
Returns the specified Image resource.
To get the list of available Image resources, make a List request.
- TypeScript
- Python
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);
})();
import os
import grpc
import yandexcloud
from yandex.cloud.compute.v1.image_service_pb2 import GetImageRequest
from yandex.cloud.compute.v1.image_service_pb2_grpc import ImageServiceStub
token = os.getenv("YC_OAUTH_TOKEN")
sdk = yandexcloud.SDK(token=token)
service = sdk.client(ImageServiceStub)
response = service.Get(GetImageRequest(image_id="imageId"))
print(response)
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.