Skip to main content

Get

Returns the specified container.

To get the list of all available containers, make a List request.

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

const GetContainerRequest =
cloudApi.serverless.containers_container_service.GetContainerRequest;

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

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

GetContainerRequest

containerId : string

ID of the container to return.

To get a container ID make a ContainerService.List request.

Container

Status

  • STATUS_UNSPECIFIED

  • CREATING

    Container is being created.

  • ACTIVE

    Container is ready for use.

  • DELETING

    Container is being deleted.

  • ERROR

    Container failed. The only allowed action is delete.

id : string

ID of the container. Generated at creation time.

folderId : string

ID of the folder that the container belongs to.

createdAt : google.protobuf.Timestamp

Creation timestamp for the container.

name : string

Name of the container. The name is unique within the folder.

description : string

Description of the container.

labels : string

Container labels as key:value pairs.

url : string

URL that needs to be requested to call the container.

status : Status

Status of the container.