Skip to main content

GetRevision

Returns the specified revision of a container.

To get the list of available revision, make a ListRevisions request.

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

const GetContainerRevisionRequest =
cloudApi.serverless.containers_container_service.GetContainerRevisionRequest;

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

const result = await client.getRevision(
GetContainerRevisionRequest.fromPartial({
containerRevisionId: "containerRevisionId",
})
);
console.log(result);
})();

GetContainerRevisionRequest

containerRevisionId : string

ID of the revision to return.

To get a revision ID make a ContainerService.ListRevisions request.

Revision

Status

  • STATUS_UNSPECIFIED

  • CREATING

    Revision is being created.

  • ACTIVE

    Revision is currently used by the container.

  • OBSOLETE

    Revision is not used by the container. May be deleted later.

id : string

ID of the revision.

containerId : string

ID of the container that the revision belongs to.

description : string

Description of the revision.

createdAt : google.protobuf.Timestamp

Creation timestamp for the revision.

image : Image

Image configuration for the revision.

resources : Resources

Resources allocated to the revision.

executionTimeout : google.protobuf.Duration

Timeout for the execution of the revision.

If the timeout is exceeded, Serverless Containers responds with a 504 HTTP code.

concurrency : int64

The number of concurrent requests allowed per container instance.

serviceAccountId : string

ID of the service account associated with the revision.

status : Status

Status of the revision.

secrets : Secret

Yandex Lockbox secrets to be used by the revision.

connectivity : Connectivity

Network access. If specified the revision will be attached to specified network/subnet(s).

provisionPolicy : ProvisionPolicy

Policy for provisioning instances of the revision.

The policy is only applied when the revision is ACTIVE.

scalingPolicy : ScalingPolicy

Policy for scaling instances of the revision.

logOptions : LogOptions

Options for logging from the container.

storageMounts : StorageMount

S3 mounts to be used by the revision.

mounts : Mount

Mounts to be used by the revision.

Image

Revision image specification.

imageUrl : string

Image URL, that is used by the revision.

imageDigest : string

Digest of the image. Calculated at creation time.

command : Command

Override for the image's ENTRYPOINT.

args : Args

Override for the image's CMD.

environment : string

Additional environment for the container.

workingDir : string

Override for the image's WORKDIR.

Resources

Resources allocated to a revision.

memory : int64

Amount of memory available to the revision, specified in bytes, multiple of 128MB.

cores : int64

Number of cores available to the revision.

coreFraction : int64

Specifies baseline performance for a core in percent, multiple of 5%. Should be 100% for cores > 1.

Secret

Secret that is available to the container at run time.

id : string

ID of Yandex Lockbox secret.

versionId : string

ID of Yandex Lockbox secret.

key : string

Key in secret's payload, which value to be delivered into container environment.

One of reference

  • environmentVariable : string

    Environment variable in which secret's value is delivered.

Connectivity

Revision connectivity specification.

networkId : string

Network the revision will have access to.

subnetIds : string

The list of subnets (from the same network) the revision can be attached to.

Deprecated, it is sufficient to specify only network_id, without the list of subnet_ids.

ProvisionPolicy

minInstances : int64

Minimum number of guaranteed provisioned container instances for all zones in total.

ScalingPolicy

zoneInstancesLimit : int64

Upper limit for instance count in each zone. 0 means no limit.

zoneRequestsLimit : int64

Upper limit of requests count in each zone. 0 means no limit.

LogOptions

disabled : bool

Is logging from container disabled.

One of destination

Log entries destination.

  • logGroupId : string

    Entry should be written to log group resolved by ID.

  • folderId : string

    Entry should be written to default log group for specified folder.

minLevel : yandex.cloud.logging.v1.LogLevel.Level

Minimum log entry level.

See LogLevel.Level for details.

StorageMount

bucketId : string

S3 bucket name for mounting.

prefix : string

S3 bucket prefix for mounting.

readOnly : bool

Is mount read only.

mountPointPath : string

Mount point path inside the container for mounting.

Mount

Mount contains an information about version's external storage mount

Mode
  • MODE_UNSPECIFIED

  • READ_ONLY

  • READ_WRITE

ObjectStorage

ObjectStorage as a mount

bucketId : string

ObjectStorage bucket name for mounting.

prefix : string

ObjectStorage bucket prefix for mounting.

DiskSpec

Disk as a mount

size : int64

The size of disk for mount in bytes

blockSize : int64

Optional block size of disk for mount in bytes

mountPointPath : string

The absolute mount point path inside the container for mounting.

mode : Mode

Mount's mode

One of target

Target mount option

  • objectStorage : ObjectStorage

    Object storage mounts

  • ephemeralDiskSpec : DiskSpec

    Working disk (worker-local non-shared read-write NBS disk templates)

Command

command : string

Command that will override ENTRYPOINT of an image.

Commands will be executed as is. The runtime will not substitute environment variables or execute shell commands. If one wants to do that, they should invoke shell interpreter with an appropriate shell script.

Args

args : string

Arguments that will override CMD of an image.

Arguments will be passed as is. The runtime will not substitute environment variables or execute shell commands. If one wants to do that, they should invoke shell interpreter with an appropriate shell script.

ObjectStorage

ObjectStorage as a mount

bucketId : string

ObjectStorage bucket name for mounting.

prefix : string

ObjectStorage bucket prefix for mounting.

DiskSpec

Disk as a mount

size : int64

The size of disk for mount in bytes

blockSize : int64

Optional block size of disk for mount in bytes