Yandex Cloud
Search
Contact UsGet started
  • Blog
  • Pricing
  • Documentation
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • ML & AI
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Customer Stories
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
  • Blog
  • Pricing
  • Documentation
Yandex project
© 2025 Yandex.Cloud LLC
Yandex Serverless Containers
  • Comparison with other Yandex Cloud services
  • Access management
  • Pricing policy
  • Terraform reference
    • API authentication
      • Overview
        • Overview
        • Get
        • List
        • Create
        • Update
        • Delete
        • DeployRevision
        • Rollback
        • GetRevision
        • ListRevisions
        • ListOperations
        • ListAccessBindings
        • SetAccessBindings
        • UpdateAccessBindings
  • Audit Trails events
  • Release notes
  • FAQ

In this article:

  • HTTP request
  • Body parameters
  • Resources
  • ImageSpec
  • Command
  • Args
  • Secret
  • Connectivity
  • ProvisionPolicy
  • ScalingPolicy
  • LogOptions
  • StorageMount
  • Mount
  • ObjectStorage
  • DiskSpec
  • Runtime
  • MetadataOptions
  • Response
  • DeployContainerRevisionMetadata
  • Status
  • Revision
  • Image
  • Command
  • Args
  • Resources
  • Secret
  • Connectivity
  • ProvisionPolicy
  • ScalingPolicy
  • LogOptions
  • StorageMount
  • Mount
  • ObjectStorage
  • DiskSpec
  • Runtime
  • MetadataOptions
  1. Containers API reference
  2. REST
  3. Container
  4. DeployRevision

Serverless Containers Service, REST: Container.DeployRevision

Written by
Yandex Cloud
Updated at January 14, 2025
  • HTTP request
  • Body parameters
  • Resources
  • ImageSpec
  • Command
  • Args
  • Secret
  • Connectivity
  • ProvisionPolicy
  • ScalingPolicy
  • LogOptions
  • StorageMount
  • Mount
  • ObjectStorage
  • DiskSpec
  • Runtime
  • MetadataOptions
  • Response
  • DeployContainerRevisionMetadata
  • Status
  • Revision
  • Image
  • Command
  • Args
  • Resources
  • Secret
  • Connectivity
  • ProvisionPolicy
  • ScalingPolicy
  • LogOptions
  • StorageMount
  • Mount
  • ObjectStorage
  • DiskSpec
  • Runtime
  • MetadataOptions

Deploys a revision for the specified container.

HTTP requestHTTP request

POST https://serverless-containers.api.cloud.yandex.net/containers/v1/revisions:deploy

Body parametersBody parameters

{
  "containerId": "string",
  "description": "string",
  "resources": {
    "memory": "string",
    "cores": "string",
    "coreFraction": "string"
  },
  "executionTimeout": "string",
  "serviceAccountId": "string",
  "imageSpec": {
    "imageUrl": "string",
    "command": {
      "command": [
        "string"
      ]
    },
    "args": {
      "args": [
        "string"
      ]
    },
    "environment": "object",
    "workingDir": "string"
  },
  "concurrency": "string",
  "secrets": [
    {
      "id": "string",
      "versionId": "string",
      "key": "string",
      // Includes only one of the fields `environmentVariable`
      "environmentVariable": "string"
      // end of the list of possible fields
    }
  ],
  "connectivity": {
    "networkId": "string",
    "subnetIds": [
      "string"
    ]
  },
  "provisionPolicy": {
    "minInstances": "string"
  },
  "scalingPolicy": {
    "zoneInstancesLimit": "string",
    "zoneRequestsLimit": "string"
  },
  "logOptions": {
    "disabled": "boolean",
    // Includes only one of the fields `logGroupId`, `folderId`
    "logGroupId": "string",
    "folderId": "string",
    // end of the list of possible fields
    "minLevel": "string"
  },
  "storageMounts": [
    {
      "bucketId": "string",
      "prefix": "string",
      "readOnly": "boolean",
      "mountPointPath": "string"
    }
  ],
  "mounts": [
    {
      "mountPointPath": "string",
      "mode": "string",
      // Includes only one of the fields `objectStorage`, `ephemeralDiskSpec`
      "objectStorage": {
        "bucketId": "string",
        "prefix": "string"
      },
      "ephemeralDiskSpec": {
        "size": "string",
        "blockSize": "string"
      }
      // end of the list of possible fields
    }
  ],
  "runtime": {
    // Includes only one of the fields `http`, `task`
    "http": "object",
    "task": "object"
    // end of the list of possible fields
  },
  "metadataOptions": {
    "gceHttpEndpoint": "string",
    "awsV1HttpEndpoint": "string"
  }
}

Field

Description

containerId

string

Required field. ID of the container to create a revision for.

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

description

string

Description of the revision.

resources

Resources

Required field. Resources allocated to the revision.

executionTimeout

string (duration)

Timeout for the execution of the revision.

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

serviceAccountId

string

ID of the service account to associate with the revision.

imageSpec

ImageSpec

Required field. Image configuration for the revision.

concurrency

string (int64)

The number of concurrent requests allowed per container instance.

The default value is 1.

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.

runtime

Runtime

The container's execution mode

metadataOptions

MetadataOptions

Metadata options for the revision.

ResourcesResources

Resources allocated to a revision.

Field

Description

memory

string (int64)

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

cores

string (int64)

Number of cores available to the revision.

coreFraction

string (int64)

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

ImageSpecImageSpec

Revision image specification.

Field

Description

imageUrl

string

Required field. Image URL, that is used by the revision.

command

Command

Override for the image's ENTRYPOINT.

args

Args

Override for the image's CMD.

environment

object (map<string, string>)

Additional environment for the container.

workingDir

string

Override for the image's WORKDIR.

CommandCommand

Field

Description

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.

ArgsArgs

Field

Description

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.

SecretSecret

Secret that is available to the container at run time.

Field

Description

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.

environmentVariable

string

Environment variable in which secret's value is delivered.

Includes only one of the fields environmentVariable.

ConnectivityConnectivity

Revision connectivity specification.

Field

Description

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.

ProvisionPolicyProvisionPolicy

Field

Description

minInstances

string (int64)

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

ScalingPolicyScalingPolicy

Field

Description

zoneInstancesLimit

string (int64)

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

zoneRequestsLimit

string (int64)

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

LogOptionsLogOptions

Field

Description

disabled

boolean

Is logging from container disabled.

logGroupId

string

Entry should be written to log group resolved by ID.

Includes only one of the fields logGroupId, folderId.

Log entries destination.

folderId

string

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

Includes only one of the fields logGroupId, folderId.

Log entries destination.

minLevel

enum (Level)

Minimum log entry level.

See LogLevel.Level for details.

  • LEVEL_UNSPECIFIED: Default log level.

    Equivalent to not specifying log level at all.

  • TRACE: Trace log level.

    Possible use case: verbose logging of some business logic.

  • DEBUG: Debug log level.

    Possible use case: debugging special cases in application logic.

  • INFO: Info log level.

    Mostly used for information messages.

  • WARN: Warn log level.

    May be used to alert about significant events.

  • ERROR: Error log level.

    May be used to alert about errors in infrastructure, logic, etc.

  • FATAL: Fatal log level.

    May be used to alert about unrecoverable failures and events.

StorageMountStorageMount

Field

Description

bucketId

string

Required field. S3 bucket name for mounting.

prefix

string

S3 bucket prefix for mounting.

readOnly

boolean

Is mount read only.

mountPointPath

string

Required field. Mount point path inside the container for mounting.

MountMount

Mount contains an information about version's external storage mount

Field

Description

mountPointPath

string

Required field. The absolute mount point path inside the container for mounting.

mode

enum (Mode)

Mount's mode

  • MODE_UNSPECIFIED
  • READ_ONLY
  • READ_WRITE

objectStorage

ObjectStorage

Object storage mounts

Includes only one of the fields objectStorage, ephemeralDiskSpec.

Target mount option

ephemeralDiskSpec

DiskSpec

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

Includes only one of the fields objectStorage, ephemeralDiskSpec.

Target mount option

ObjectStorageObjectStorage

ObjectStorage as a mount

Field

Description

bucketId

string

Required field. ObjectStorage bucket name for mounting.

prefix

string

ObjectStorage bucket prefix for mounting.

DiskSpecDiskSpec

Disk as a mount

Field

Description

size

string (int64)

The size of disk for mount in bytes

blockSize

string (int64)

Optional block size of disk for mount in bytes

RuntimeRuntime

The container's execution mode

Field

Description

http

object

The classic one. You need to run an HTTP server inside the container.

Includes only one of the fields http, task.

task

object

We run a process from ENTRYPOINT inside the container for each user request.

Includes only one of the fields http, task.

MetadataOptionsMetadataOptions

Field

Description

gceHttpEndpoint

enum (MetadataOption)

Enabled access to GCE flavored metadata

  • METADATA_OPTION_UNSPECIFIED: Option is default
  • ENABLED: Option is enabled
  • DISABLED: Option is disabled

awsV1HttpEndpoint

enum (MetadataOption)

Enabled access to AWS flavored metadata (IMDSv1)

  • METADATA_OPTION_UNSPECIFIED: Option is default
  • ENABLED: Option is enabled
  • DISABLED: Option is disabled

ResponseResponse

HTTP Code: 200 - OK

{
  "id": "string",
  "description": "string",
  "createdAt": "string",
  "createdBy": "string",
  "modifiedAt": "string",
  "done": "boolean",
  "metadata": {
    "containerRevisionId": "string"
  },
  // Includes only one of the fields `error`, `response`
  "error": {
    "code": "integer",
    "message": "string",
    "details": [
      "object"
    ]
  },
  "response": {
    "id": "string",
    "containerId": "string",
    "description": "string",
    "createdAt": "string",
    "image": {
      "imageUrl": "string",
      "imageDigest": "string",
      "command": {
        "command": [
          "string"
        ]
      },
      "args": {
        "args": [
          "string"
        ]
      },
      "environment": "object",
      "workingDir": "string"
    },
    "resources": {
      "memory": "string",
      "cores": "string",
      "coreFraction": "string"
    },
    "executionTimeout": "string",
    "concurrency": "string",
    "serviceAccountId": "string",
    "status": "string",
    "secrets": [
      {
        "id": "string",
        "versionId": "string",
        "key": "string",
        // Includes only one of the fields `environmentVariable`
        "environmentVariable": "string"
        // end of the list of possible fields
      }
    ],
    "connectivity": {
      "networkId": "string",
      "subnetIds": [
        "string"
      ]
    },
    "provisionPolicy": {
      "minInstances": "string"
    },
    "scalingPolicy": {
      "zoneInstancesLimit": "string",
      "zoneRequestsLimit": "string"
    },
    "logOptions": {
      "disabled": "boolean",
      // Includes only one of the fields `logGroupId`, `folderId`
      "logGroupId": "string",
      "folderId": "string",
      // end of the list of possible fields
      "minLevel": "string"
    },
    "storageMounts": [
      {
        "bucketId": "string",
        "prefix": "string",
        "readOnly": "boolean",
        "mountPointPath": "string"
      }
    ],
    "mounts": [
      {
        "mountPointPath": "string",
        "mode": "string",
        // Includes only one of the fields `objectStorage`, `ephemeralDiskSpec`
        "objectStorage": {
          "bucketId": "string",
          "prefix": "string"
        },
        "ephemeralDiskSpec": {
          "size": "string",
          "blockSize": "string"
        }
        // end of the list of possible fields
      }
    ],
    "runtime": {
      // Includes only one of the fields `http`, `task`
      "http": "object",
      "task": "object"
      // end of the list of possible fields
    },
    "metadataOptions": {
      "gceHttpEndpoint": "string",
      "awsV1HttpEndpoint": "string"
    }
  }
  // end of the list of possible fields
}

An Operation resource. For more information, see Operation.

Field

Description

id

string

ID of the operation.

description

string

Description of the operation. 0-256 characters long.

createdAt

string (date-time)

Creation timestamp.

String in RFC3339 text format. The range of possible values is from
0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z, i.e. from 0 to 9 digits for fractions of a second.

To work with values in this field, use the APIs described in the
Protocol Buffers reference.
In some languages, built-in datetime utilities do not support nanosecond precision (9 digits).

createdBy

string

ID of the user or service account who initiated the operation.

modifiedAt

string (date-time)

The time when the Operation resource was last modified.

String in RFC3339 text format. The range of possible values is from
0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z, i.e. from 0 to 9 digits for fractions of a second.

To work with values in this field, use the APIs described in the
Protocol Buffers reference.
In some languages, built-in datetime utilities do not support nanosecond precision (9 digits).

done

boolean

If the value is false, it means the operation is still in progress.
If true, the operation is completed, and either error or response is available.

metadata

DeployContainerRevisionMetadata

Service-specific metadata associated with the operation.
It typically contains the ID of the target resource that the operation is performed on.
Any method that returns a long-running operation should document the metadata type, if any.

error

Status

The error result of the operation in case of failure or cancellation.

Includes only one of the fields error, response.

The operation result.
If done == false and there was no failure detected, neither error nor response is set.
If done == false and there was a failure detected, error is set.
If done == true, exactly one of error or response is set.

response

Revision

The normal response of the operation in case of success.
If the original method returns no data on success, such as Delete,
the response is google.protobuf.Empty.
If the original method is the standard Create/Update,
the response should be the target resource of the operation.
Any method that returns a long-running operation should document the response type, if any.

Includes only one of the fields error, response.

The operation result.
If done == false and there was no failure detected, neither error nor response is set.
If done == false and there was a failure detected, error is set.
If done == true, exactly one of error or response is set.

DeployContainerRevisionMetadataDeployContainerRevisionMetadata

Field

Description

containerRevisionId

string

ID of the revision that is being created.

StatusStatus

The error result of the operation in case of failure or cancellation.

Field

Description

code

integer (int32)

Error code. An enum value of google.rpc.Code.

message

string

An error message.

details[]

object

A list of messages that carry the error details.

RevisionRevision

Field

Description

id

string

ID of the revision.

containerId

string

ID of the container that the revision belongs to.

description

string

Description of the revision.

createdAt

string (date-time)

Creation timestamp for the revision.

String in RFC3339 text format. The range of possible values is from
0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z, i.e. from 0 to 9 digits for fractions of a second.

To work with values in this field, use the APIs described in the
Protocol Buffers reference.
In some languages, built-in datetime utilities do not support nanosecond precision (9 digits).

image

Image

Image configuration for the revision.

resources

Resources

Resources allocated to the revision.

executionTimeout

string (duration)

Timeout for the execution of the revision.

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

concurrency

string (int64)

The number of concurrent requests allowed per container instance.

serviceAccountId

string

ID of the service account associated with the revision.

status

enum (Status)

Status of the revision.

  • 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.

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.

runtime

Runtime

The container's execution mode

metadataOptions

MetadataOptions

Metadata options for the revision.

ImageImage

Revision image specification.

Field

Description

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

object (map<string, string>)

Additional environment for the container.

workingDir

string

Override for the image's WORKDIR.

CommandCommand

Field

Description

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.

ArgsArgs

Field

Description

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.

ResourcesResources

Resources allocated to a revision.

Field

Description

memory

string (int64)

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

cores

string (int64)

Number of cores available to the revision.

coreFraction

string (int64)

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

SecretSecret

Secret that is available to the container at run time.

Field

Description

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.

environmentVariable

string

Environment variable in which secret's value is delivered.

Includes only one of the fields environmentVariable.

ConnectivityConnectivity

Revision connectivity specification.

Field

Description

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.

ProvisionPolicyProvisionPolicy

Field

Description

minInstances

string (int64)

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

ScalingPolicyScalingPolicy

Field

Description

zoneInstancesLimit

string (int64)

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

zoneRequestsLimit

string (int64)

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

LogOptionsLogOptions

Field

Description

disabled

boolean

Is logging from container disabled.

logGroupId

string

Entry should be written to log group resolved by ID.

Includes only one of the fields logGroupId, folderId.

Log entries destination.

folderId

string

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

Includes only one of the fields logGroupId, folderId.

Log entries destination.

minLevel

enum (Level)

Minimum log entry level.

See LogLevel.Level for details.

  • LEVEL_UNSPECIFIED: Default log level.

    Equivalent to not specifying log level at all.

  • TRACE: Trace log level.

    Possible use case: verbose logging of some business logic.

  • DEBUG: Debug log level.

    Possible use case: debugging special cases in application logic.

  • INFO: Info log level.

    Mostly used for information messages.

  • WARN: Warn log level.

    May be used to alert about significant events.

  • ERROR: Error log level.

    May be used to alert about errors in infrastructure, logic, etc.

  • FATAL: Fatal log level.

    May be used to alert about unrecoverable failures and events.

StorageMountStorageMount

Field

Description

bucketId

string

Required field. S3 bucket name for mounting.

prefix

string

S3 bucket prefix for mounting.

readOnly

boolean

Is mount read only.

mountPointPath

string

Required field. Mount point path inside the container for mounting.

MountMount

Mount contains an information about version's external storage mount

Field

Description

mountPointPath

string

Required field. The absolute mount point path inside the container for mounting.

mode

enum (Mode)

Mount's mode

  • MODE_UNSPECIFIED
  • READ_ONLY
  • READ_WRITE

objectStorage

ObjectStorage

Object storage mounts

Includes only one of the fields objectStorage, ephemeralDiskSpec.

Target mount option

ephemeralDiskSpec

DiskSpec

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

Includes only one of the fields objectStorage, ephemeralDiskSpec.

Target mount option

ObjectStorageObjectStorage

ObjectStorage as a mount

Field

Description

bucketId

string

Required field. ObjectStorage bucket name for mounting.

prefix

string

ObjectStorage bucket prefix for mounting.

DiskSpecDiskSpec

Disk as a mount

Field

Description

size

string (int64)

The size of disk for mount in bytes

blockSize

string (int64)

Optional block size of disk for mount in bytes

RuntimeRuntime

The container's execution mode

Field

Description

http

object

The classic one. You need to run an HTTP server inside the container.

Includes only one of the fields http, task.

task

object

We run a process from ENTRYPOINT inside the container for each user request.

Includes only one of the fields http, task.

MetadataOptionsMetadataOptions

Field

Description

gceHttpEndpoint

enum (MetadataOption)

Enabled access to GCE flavored metadata

  • METADATA_OPTION_UNSPECIFIED: Option is default
  • ENABLED: Option is enabled
  • DISABLED: Option is disabled

awsV1HttpEndpoint

enum (MetadataOption)

Enabled access to AWS flavored metadata (IMDSv1)

  • METADATA_OPTION_UNSPECIFIED: Option is default
  • ENABLED: Option is enabled
  • DISABLED: Option is disabled

Was the article helpful?

Previous
Delete
Next
Rollback
Yandex project
© 2025 Yandex.Cloud LLC