Serverless Containers Service, gRPC: ContainerService.DeployRevision
- gRPC request
- DeployContainerRevisionRequest
- Resources
- ImageSpec
- Command
- Args
- Secret
- Connectivity
- ProvisionPolicy
- ScalingPolicy
- LogOptions
- StorageMount
- Mount
- ObjectStorage
- DiskSpec
- Runtime
- Http
- Task
- MetadataOptions
- operation.Operation
- DeployContainerRevisionMetadata
- Revision
- Image
- Command
- Args
- Resources
- Secret
- Connectivity
- ProvisionPolicy
- ScalingPolicy
- LogOptions
- StorageMount
- Mount
- ObjectStorage
- DiskSpec
- Runtime
- Http
- Task
- MetadataOptions
Deploys a revision for the specified container.
gRPC request
rpc DeployRevision (DeployContainerRevisionRequest) returns (operation.Operation)
DeployContainerRevisionRequest
{
"container_id": "string",
"description": "string",
"resources": {
"memory": "int64",
"cores": "int64",
"core_fraction": "int64"
},
"execution_timeout": "google.protobuf.Duration",
"service_account_id": "string",
"image_spec": {
"image_url": "string",
"command": {
"command": [
"string"
]
},
"args": {
"args": [
"string"
]
},
"environment": "map<string, string>",
"working_dir": "string"
},
"concurrency": "int64",
"secrets": [
{
"id": "string",
"version_id": "string",
"key": "string",
// Includes only one of the fields `environment_variable`
"environment_variable": "string"
// end of the list of possible fields
}
],
"connectivity": {
"network_id": "string",
"subnet_ids": [
"string"
]
},
"provision_policy": {
"min_instances": "int64"
},
"scaling_policy": {
"zone_instances_limit": "int64",
"zone_requests_limit": "int64"
},
"log_options": {
"disabled": "bool",
// Includes only one of the fields `log_group_id`, `folder_id`
"log_group_id": "string",
"folder_id": "string",
// end of the list of possible fields
"min_level": "Level"
},
"storage_mounts": [
{
"bucket_id": "string",
"prefix": "string",
"read_only": "bool",
"mount_point_path": "string"
}
],
"mounts": [
{
"mount_point_path": "string",
"mode": "Mode",
// Includes only one of the fields `object_storage`, `ephemeral_disk_spec`
"object_storage": {
"bucket_id": "string",
"prefix": "string"
},
"ephemeral_disk_spec": {
"size": "int64",
"block_size": "int64"
}
// end of the list of possible fields
}
],
"runtime": {
// Includes only one of the fields `http`, `task`
"http": "Http",
"task": "Task"
// end of the list of possible fields
},
"metadata_options": {
"gce_http_endpoint": "MetadataOption",
"aws_v1_http_endpoint": "MetadataOption"
}
}
Field |
Description |
container_id |
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 |
Required field. Resources allocated to the revision. |
execution_timeout |
Timeout for the execution of the revision. If the timeout is exceeded, Serverless Containers responds with a 504 HTTP code. |
service_account_id |
string ID of the service account to associate with the revision. |
image_spec |
Required field. Image configuration for the revision. |
concurrency |
int64 The number of concurrent requests allowed per container instance. The default value is 1. |
secrets[] |
Yandex Lockbox secrets to be used by the revision. |
connectivity |
Network access. If specified the revision will be attached to specified network/subnet(s). |
provision_policy |
Policy for provisioning instances of the revision. The policy is only applied when the revision is ACTIVE. |
scaling_policy |
Policy for scaling instances of the revision. |
log_options |
Options for logging from the container. |
storage_mounts[] |
S3 mounts to be used by the revision. |
mounts[] |
Mounts to be used by the revision. |
runtime |
The container's execution mode |
metadata_options |
Metadata options for the revision. |
Resources
Resources allocated to a revision.
Field |
Description |
memory |
int64 Amount of memory available to the revision, specified in bytes, multiple of 128MB. |
cores |
int64 Number of cores available to the revision. |
core_fraction |
int64 Specifies baseline performance for a core in percent, multiple of 5%. |
ImageSpec
Revision image specification.
Field |
Description |
image_url |
string Required field. Image URL, that is used by the revision. |
command |
Override for the image's ENTRYPOINT. |
args |
Override for the image's CMD. |
environment |
object (map<string, string>) Additional environment for the container. |
working_dir |
string Override for the image's WORKDIR. |
Command
Field |
Description |
command[] |
string Command that will override ENTRYPOINT of an image. Commands will be executed as is. The runtime will not substitute environment |
Args
Field |
Description |
args[] |
string Arguments that will override CMD of an image. Arguments will be passed as is. The runtime will not substitute environment |
Secret
Secret that is available to the container at run time.
Field |
Description |
id |
string ID of Yandex Lockbox secret. |
version_id |
string ID of Yandex Lockbox secret. |
key |
string Key in secret's payload, which value to be delivered into container environment. |
environment_variable |
string Environment variable in which secret's value is delivered. Includes only one of the fields |
Connectivity
Revision connectivity specification.
Field |
Description |
network_id |
string Network the revision will have access to. |
subnet_ids[] |
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
Field |
Description |
min_instances |
int64 Minimum number of guaranteed provisioned container instances for all zones |
ScalingPolicy
Field |
Description |
zone_instances_limit |
int64 Upper limit for instance count in each zone. |
zone_requests_limit |
int64 Upper limit of requests count in each zone. |
LogOptions
Field |
Description |
disabled |
bool Is logging from container disabled. |
log_group_id |
string Entry should be written to log group resolved by ID. Includes only one of the fields Log entries destination. |
folder_id |
string Entry should be written to default log group for specified folder. Includes only one of the fields Log entries destination. |
min_level |
enum Level Minimum log entry level. See LogLevel.Level for details.
|
StorageMount
Field |
Description |
bucket_id |
string Required field. S3 bucket name for mounting. |
prefix |
string S3 bucket prefix for mounting. |
read_only |
bool Is mount read only. |
mount_point_path |
string Required field. Mount point path inside the container for mounting. |
Mount
Mount contains an information about version's external storage mount
Field |
Description |
mount_point_path |
string Required field. The absolute mount point path inside the container for mounting. |
mode |
enum Mode Mount's mode
|
object_storage |
Object storage mounts Includes only one of the fields Target mount option |
ephemeral_disk_spec |
Working disk (worker-local non-shared read-write NBS disk templates) Includes only one of the fields Target mount option |
ObjectStorage
ObjectStorage as a mount
Field |
Description |
bucket_id |
string Required field. ObjectStorage bucket name for mounting. |
prefix |
string ObjectStorage bucket prefix for mounting. |
DiskSpec
Disk as a mount
Field |
Description |
size |
int64 The size of disk for mount in bytes |
block_size |
int64 Optional block size of disk for mount in bytes |
Runtime
The container's execution mode
Field |
Description |
http |
The classic one. You need to run an HTTP server inside the container. Includes only one of the fields |
task |
We run a process from ENTRYPOINT inside the container for each user request. Includes only one of the fields |
Http
Field |
Description |
Empty |
Task
Field |
Description |
Empty |
MetadataOptions
Field |
Description |
gce_http_endpoint |
enum MetadataOption Enabled access to GCE flavored metadata
|
aws_v1_http_endpoint |
enum MetadataOption Enabled access to AWS flavored metadata (IMDSv1)
|
operation.Operation
{
"id": "string",
"description": "string",
"created_at": "google.protobuf.Timestamp",
"created_by": "string",
"modified_at": "google.protobuf.Timestamp",
"done": "bool",
"metadata": {
"container_revision_id": "string"
},
// Includes only one of the fields `error`, `response`
"error": "google.rpc.Status",
"response": {
"id": "string",
"container_id": "string",
"description": "string",
"created_at": "google.protobuf.Timestamp",
"image": {
"image_url": "string",
"image_digest": "string",
"command": {
"command": [
"string"
]
},
"args": {
"args": [
"string"
]
},
"environment": "map<string, string>",
"working_dir": "string"
},
"resources": {
"memory": "int64",
"cores": "int64",
"core_fraction": "int64"
},
"execution_timeout": "google.protobuf.Duration",
"concurrency": "int64",
"service_account_id": "string",
"status": "Status",
"secrets": [
{
"id": "string",
"version_id": "string",
"key": "string",
// Includes only one of the fields `environment_variable`
"environment_variable": "string"
// end of the list of possible fields
}
],
"connectivity": {
"network_id": "string",
"subnet_ids": [
"string"
]
},
"provision_policy": {
"min_instances": "int64"
},
"scaling_policy": {
"zone_instances_limit": "int64",
"zone_requests_limit": "int64"
},
"log_options": {
"disabled": "bool",
// Includes only one of the fields `log_group_id`, `folder_id`
"log_group_id": "string",
"folder_id": "string",
// end of the list of possible fields
"min_level": "Level"
},
"storage_mounts": [
{
"bucket_id": "string",
"prefix": "string",
"read_only": "bool",
"mount_point_path": "string"
}
],
"mounts": [
{
"mount_point_path": "string",
"mode": "Mode",
// Includes only one of the fields `object_storage`, `ephemeral_disk_spec`
"object_storage": {
"bucket_id": "string",
"prefix": "string"
},
"ephemeral_disk_spec": {
"size": "int64",
"block_size": "int64"
}
// end of the list of possible fields
}
],
"runtime": {
// Includes only one of the fields `http`, `task`
"http": "Http",
"task": "Task"
// end of the list of possible fields
},
"metadata_options": {
"gce_http_endpoint": "MetadataOption",
"aws_v1_http_endpoint": "MetadataOption"
}
}
// 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. |
created_at |
Creation timestamp. |
created_by |
string ID of the user or service account who initiated the operation. |
modified_at |
The time when the Operation resource was last modified. |
done |
bool If the value is |
metadata |
DeployContainerRevisionMetadata Service-specific metadata associated with the operation. |
error |
The error result of the operation in case of failure or cancellation. Includes only one of the fields The operation result. |
response |
The normal response of the operation in case of success. Includes only one of the fields The operation result. |
DeployContainerRevisionMetadata
Field |
Description |
container_revision_id |
string ID of the revision that is being created. |
Revision
Field |
Description |
id |
string ID of the revision. |
container_id |
string ID of the container that the revision belongs to. |
description |
string Description of the revision. |
created_at |
Creation timestamp for the revision. |
image |
Image configuration for the revision. |
resources |
Resources allocated to the revision. |
execution_timeout |
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. |
service_account_id |
string ID of the service account associated with the revision. |
status |
enum Status Status of the revision.
|
secrets[] |
Yandex Lockbox secrets to be used by the revision. |
connectivity |
Network access. If specified the revision will be attached to specified network/subnet(s). |
provision_policy |
Policy for provisioning instances of the revision. The policy is only applied when the revision is ACTIVE. |
scaling_policy |
Policy for scaling instances of the revision. |
log_options |
Options for logging from the container. |
storage_mounts[] |
S3 mounts to be used by the revision. |
mounts[] |
Mounts to be used by the revision. |
runtime |
The container's execution mode |
metadata_options |
Metadata options for the revision. |
Image
Revision image specification.
Field |
Description |
image_url |
string Image URL, that is used by the revision. |
image_digest |
string Digest of the image. Calculated at creation time. |
command |
Override for the image's ENTRYPOINT. |
args |
Override for the image's CMD. |
environment |
object (map<string, string>) Additional environment for the container. |
working_dir |
string Override for the image's WORKDIR. |
Command
Field |
Description |
command[] |
string Command that will override ENTRYPOINT of an image. Commands will be executed as is. The runtime will not substitute environment |
Args
Field |
Description |
args[] |
string Arguments that will override CMD of an image. Arguments will be passed as is. The runtime will not substitute environment |
Resources
Resources allocated to a revision.
Field |
Description |
memory |
int64 Amount of memory available to the revision, specified in bytes, multiple of 128MB. |
cores |
int64 Number of cores available to the revision. |
core_fraction |
int64 Specifies baseline performance for a core in percent, multiple of 5%. |
Secret
Secret that is available to the container at run time.
Field |
Description |
id |
string ID of Yandex Lockbox secret. |
version_id |
string ID of Yandex Lockbox secret. |
key |
string Key in secret's payload, which value to be delivered into container environment. |
environment_variable |
string Environment variable in which secret's value is delivered. Includes only one of the fields |
Connectivity
Revision connectivity specification.
Field |
Description |
network_id |
string Network the revision will have access to. |
subnet_ids[] |
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
Field |
Description |
min_instances |
int64 Minimum number of guaranteed provisioned container instances for all zones |
ScalingPolicy
Field |
Description |
zone_instances_limit |
int64 Upper limit for instance count in each zone. |
zone_requests_limit |
int64 Upper limit of requests count in each zone. |
LogOptions
Field |
Description |
disabled |
bool Is logging from container disabled. |
log_group_id |
string Entry should be written to log group resolved by ID. Includes only one of the fields Log entries destination. |
folder_id |
string Entry should be written to default log group for specified folder. Includes only one of the fields Log entries destination. |
min_level |
enum Level Minimum log entry level. See LogLevel.Level for details.
|
StorageMount
Field |
Description |
bucket_id |
string Required field. S3 bucket name for mounting. |
prefix |
string S3 bucket prefix for mounting. |
read_only |
bool Is mount read only. |
mount_point_path |
string Required field. Mount point path inside the container for mounting. |
Mount
Mount contains an information about version's external storage mount
Field |
Description |
mount_point_path |
string Required field. The absolute mount point path inside the container for mounting. |
mode |
enum Mode Mount's mode
|
object_storage |
Object storage mounts Includes only one of the fields Target mount option |
ephemeral_disk_spec |
Working disk (worker-local non-shared read-write NBS disk templates) Includes only one of the fields Target mount option |
ObjectStorage
ObjectStorage as a mount
Field |
Description |
bucket_id |
string Required field. ObjectStorage bucket name for mounting. |
prefix |
string ObjectStorage bucket prefix for mounting. |
DiskSpec
Disk as a mount
Field |
Description |
size |
int64 The size of disk for mount in bytes |
block_size |
int64 Optional block size of disk for mount in bytes |
Runtime
The container's execution mode
Field |
Description |
http |
The classic one. You need to run an HTTP server inside the container. Includes only one of the fields |
task |
We run a process from ENTRYPOINT inside the container for each user request. Includes only one of the fields |
Http
Field |
Description |
Empty |
Task
Field |
Description |
Empty |
MetadataOptions
Field |
Description |
gce_http_endpoint |
enum MetadataOption Enabled access to GCE flavored metadata
|
aws_v1_http_endpoint |
enum MetadataOption Enabled access to AWS flavored metadata (IMDSv1)
|