Changing the container operation mode
Written by
Updated at January 22, 2025
CLI
API
To change the container operation mode, run this command:
yc serverless container revision deploy \
--container-id <container_ID> \
--image <Docker_image_URL> \
--service-account-id <service_account_ID> \
--runtime <operation_mode>
Where:
--container-id
: Container ID. To find out the ID, get a list of containers.--image
: Yandex Container Registry Docker image URL.--service-account-id
: ID of the service account with permissions to download a Docker image.--runtime
: Container operation mode. Possible values:http
,task
. The default value ishttp
.
Result:
done (3s)
id: bba8faed420g********
container_id: bbab5i36nvda********
created_at: "2024-12-13T12:12:09.057Z"
image:
image_url: cr.yandex/crpp35hht729********/ubuntu:hello
image_digest: sha256:f6f34c6cf5f56e594e9828274592f1cc4d9383b1689057ccaf188d41********
resources:
memory: "134217728"
cores: "1"
core_fraction: "100"
execution_timeout: 3s
concurrency: "1"
service_account_id: aje07l4q4vmo********
status: ACTIVE
log_options:
folder_id: b1gc1t4cb638********
runtime:
task: {}
To change the container operation mode, use the deployRevision REST API method for the Container resource or the ContainerService/DeployRevision gRPC API call.