Yandex Cloud
Поиск
Связаться с экспертомПопробовать бесплатно
  • Кейсы
  • Документация
  • Блог
  • Все сервисы
    • Cloud Interconnect
    • Cloud Backup
    • Cloud Registry
    • Yandex AI Studio
    • Compute Cloud
    • Object Storage
    • Managed Service for Kubernetes®
    • Yandex BareMetal
    • Smart Web Security
    • Security Deck
    • Managed Service for PostgreSQL
    • Managed Service for ClickHouse®
    • Monium
    • Cloud CDN
    • Network Load Balancer
    • Virtual Private Cloud
    • Cloud DNS
    • Application Load Balancer
    • Yandex Cloud Video
    • Stackland
    • Yandex Cloud Router
    • Yandex Managed Service for Trino
    • Managed Service for MySQL®
    • Managed Service for Valkey™
    • Managed Service for Apache Spark™
    • Yandex StoreDoc
    • Managed Service for OpenSearch
    • Managed Service for Apache Kafka®
    • Data Transfer
    • Yandex MPP Analytics Engine for PostgreSQL
    • Yandex Managed Service for Apache Airflow®
    • Data Processing
    • Yandex MetaData Hub
    • Managed Service for YDB
    • Managed Service for Sharded PostgreSQL
    • Managed Service for YTsaurus
    • Yandex WebSQL
    • DataLens
    • Yandex Search API
    • SpeechSense
    • SpeechKit
    • DataSphere
    • Vision OCR
    • Translate
    • VibeCraft
    • Yandex Cloud Detection and Response
    • Yandex Identity Hub
    • Key Management Service
    • Certificate Manager
    • Yandex Lockbox
    • Audit Trails
    • SmartCaptcha
    • GOST Gateway
    • Yandex SIEM
    • SourceCraft Code Assistant
    • Container Registry
    • Managed Service for GitLab
    • SourceCraft
    • Managed Service for Prometheus®
    • Cloud Functions
    • API Gateway
    • Yandex Cloud Postbox
    • Message Queue
    • Data Streams
    • Serverless Containers
    • Cloud Notification Service
    • Identity and Access Management
    • Yandex Cloud Console
    • Resource Manager
    • Yandex Cloud Billing
    • Yandex Cloud Quota Manager
    • Cloud Apps
  • Статус работы сервисов
  • Marketplace
    • Популярные
    • Инфраструктура и сеть
    • Платформа данных
    • Искусственный интеллект
    • Безопасность
    • Инструменты DevOps
    • Бессерверные вычисления
    • Управление ресурсами
  • Все решения
    • По отраслям
    • По типу задач
    • Экономика платформы
    • Безопасность
    • Техническая поддержка
    • Каталог партнёров
    • Обучение и сертификация
    • Облако для стартапов
    • Облако для крупного бизнеса
    • Центр технологий для общества
    • Облако для интеграторов
    • Поддержка IT-бизнеса
    • Облако для фрилансеров
    • Обучение и сертификация
    • Блог
    • Документация
    • Контент-программа
    • Мероприятия и вебинары
    • Контакты, чаты и сообщества
    • Идеи
    • Калькулятор цен
    • Тарифы
    • Акции и free tier
  • Кейсы
  • Документация
  • Блог
Создавайте контент и получайте гранты!Готовы написать своё руководство? Участвуйте в контент-программе и получайте гранты на работу с облачными сервисами!
Подробнее о программе
Сделано на Gravity UI
Проект Яндекса
© 2026 ООО «Яндекс.Облако»
Интерфейс командной строки
  • Начало работы
    • Все инструкции
    • Установка
    • Обновление
    • Удаление
    • Работа с версиями команд
    • Overview
    • help
    • init
      • Overview
        • Overview
        • add-access-binding
        • add-labels
        • allow-unauthenticated-invoke
        • create
        • delete
        • deny-unauthenticated-invoke
        • get
        • invoke
        • list
        • list-access-bindings
        • list-operations
        • list-scaling-policies
        • logs
        • remove-access-binding
        • remove-labels
        • remove-scaling-policy
        • set-access-bindings
        • set-scaling-policy
        • tag-history
        • update
          • Overview
          • create
          • delete
          • get
          • get-by-tag
          • list
          • logs
          • remove-tag
          • set-tag
    • version
  • Релизы
  • Решение проблем
  1. Справочник (англ.)
  2. serverless
  3. function
  4. version
  5. create

yc serverless function version create

Статья создана
Yandex Cloud
Обновлена 5 ноября 2026 г.
Открыть в Markdown

Create new function version

Command UsageCommand Usage

Syntax:

yc serverless function version create (--function-id <FUNCTION_ID>|--function-name <FUNCTION_NAME>) [Flags...] [Global Flags...]

FlagsFlags

Flag

Description

--function-id

string

Function id.

--function-name

string

Function name.

--async

Display information about the operation in progress, without waiting for the operation to complete.

--runtime

string

Runtime. Valid values are listed by "serverless function runtime list".

--entrypoint

string

Entry point.

--memory

byteSize

Required memory. Example: '1GB', '128MB'. The default value is 128MB.

--execution-timeout

duration

Execution timeout. The default value is 3s

--service-account-id

string

Service account id.

--package-bucket-name

string

Storage bucket name of the function package.

--package-object-name

string

Storage object name of the function package.

--package-sha256

string

Sha256 of the function package.

--source-path

string

Local filesystem path of the function package: either directory or file (file can be a valid zip archive).

--source-version-id

string

ID of a version to make a copy from.

--description

string

Version description.

--environment

map<string><string>

Version environment variables.

--tags

[]string

Version tags.

--network-name

string

Version network name.

--network-id

string

Version network id.

--subnet-name

[]string

DEPRECATED: specify only the network (--network-name or --network-id), without the list of subnets.

Version subnet names.

--subnet-id

[]string

DEPRECATED: specify only the network (--network-name or --network-id), without the list of subnets.

Version subnet ids.

--add-service-account

PROPERTY=VALUE[,PROPERTY=VALUE...]

Adds a named service account to the version. Can be used multiple times.

Possible property names:

  • alias: Specifies an alias, through which the service account can be accessed.

  • id: Service account id

  • name: Service account name.

--secret

PROPERTY=VALUE[,PROPERTY=VALUE...]

Version secret.

Possible property names:

  • name: Specifies the secret name

  • id: Specifies the secret id

  • version-id: Specifies the secret version id. If not provided, current version of the secret will be used.

  • key: Specifies key of the entry in the secret to use.

  • environment-variable: Specifies environment variable name that the secret value will be loaded to.

--storage-mounts

PROPERTY=VALUE[,PROPERTY=VALUE...]

DEPRECATED: Use mounts instead. Storage mounts. Example: mount-point=dir,bucket=user-bucket,read-only=false

Possible property names:

  • mount-point: Mount point is used for creating the directory to which the bucket is mounted. It will be accessible by the path /function/storage/<mount_point>.

  • bucket: Specifies a name of the bucket mount to.

  • prefix: Specifies a prefix of the bucket. Leave empty to mount the entire bucket.

  • read-only: Select to mount bucket in read only mode.

--mount

PROPERTY=VALUE[,PROPERTY=VALUE...]

Add a mount to the version. Example: type=ephemeral-disk,mount-point=mnt1,size=5GB

Possible property names:

  • type: Specifies the type of the mount. Valid values are 'object-storage' and 'ephemeral-disk'.

  • mount-point: Mount point is used for creating the directory to which the target is mounted. It will be accessible by the path /function/storage/<mount_point>.

  • bucket: [object-storage] Specifies a name of the bucket mount to.

  • prefix: [object-storage] Specifies a prefix of the bucket. Leave empty to mount the entire bucket.

  • mode: [object-storage] Specifies mount's accessibility mode. Valid values are 'ro' and 'rw'.

  • size: [ephemeral-disk] Specifies the size of the disk for mount. Must be a multiple of a gigabyte. Example: '5GB'.

  • block-size: [ephemeral-disk] Specifies the optional block size of the disk for mount. Valid values: 4KB, 8KB, 16KB, 32KB, 64KB and 128KB.

--no-logging

Disable logging from function.

--log-group-id

string

Send logs to custom log group by id.

--log-group-name

string

Send logs to custom log group by name.

--log-folder-id

string

Send logs to default log group of custom folder by id.

--log-folder-name

string

Send logs to default log group of custom folder by name.

--min-log-level

string

Min log level. Values: 'trace', 'debug', 'info', 'warn', 'error', 'fatal'

--async-max-retries

int

Max retries for async invocation.

--async-service-account-id

string

Service account for asynchronous function invocation.

--async-success-ymq-arn

string

YMQ ARN target for success invocation.

--async-success-sa-id

string

Service account for writing successful result of async invocation function.

--async-failure-ymq-arn

string

YMQ ARN target for failure.

--async-failure-sa-id

string

Service account for writing unsuccessful result of async invocation function.

--tmpfs-size

byteSize

Size of memory for use as in-memory storage mounted as /tmp directory. Example: '512MB', '1GB'. The default value is 0B.

--concurrency

int

The maximum number of requests processed by a function instance at the same time.

--metadata-options

PROPERTY=VALUE[,PROPERTY=VALUE...]

Options set the access mode to function's metadata endpoints. Example: aws-v1-http-endpoint=disabled,gce-http-endpoint=enabled

Possible property names:

  • aws-v1-http-endpoint: Enables access to AWS flavored metadata (IMDSv1). Values: enabled, disabled

  • gce-http-endpoint: Enables access to GCE flavored metadata. Values: enabled, disabled

Global FlagsGlobal Flags

Flag

Description

--profile

string

Set the custom profile.

--region

string

Set the region.

--cloud-id

string

Set the ID of the cloud to use.

--folder-id

string

Set the ID of the folder to use.

--folder-name

string

Set the name of the folder to use (will be resolved to id).

--debug

Debug logging.

--debug-grpc

Debug gRPC logging. Very verbose, used for debugging connection problems.

--no-user-output

Disable printing user intended output to stderr.

--pager

string

Set the custom pager.

--no-pager

Do not pipe help output through a pager.

--format

string

Set the output format: text (default), yaml, json, json-rest.

--retry

int

Enable gRPC retries. By default, retries are enabled with maximum 5 attempts.
Pass 0 to disable retries. Pass any negative value for infinite retries.
Even infinite retries are capped with 2 minutes timeout.

--timeout

string

Set the timeout.

--token

string

Set the OAuth token to use.

--jq

string

Query to select values from the response using jq syntax

--endpoint

string

Set the Cloud API endpoint (host:port).

--impersonate-service-account-id

string

Set the ID of the service account to impersonate.

--no-browser

Disable opening browser for authentication.

--query

string

Query to select values from the response using jq syntax

--print-metadata

Print operation metadata along with result.

--syntax

string

Choose syntax option.

--cli-auto-prompt

string[="on"]

Enable interactive auto-prompt mode. Values: on, partial, off. Bare --cli-auto-prompt is equivalent to --cli-auto-prompt=on.

--no-cli-auto-prompt

Disable interactive auto-prompt mode (overrides --cli-auto-prompt, env and profile).

-h, --help

Display help for the command.

  • Выделить память для директории /tmp
  • Задать количество одновременных вызовов экземпляра функции
  • Добавить переменные окружения функции
  • Настройте асинхронный вызов
  • Передать секреты Yandex Lockbox в функцию
  • Пример команды
  • Настроить параметры сервиса метаданных функции
  • Смонтировать бакеты в функцию
  • Смонтировать эфемерный диск в функцию
  • Указать облачную сеть, в которой будет исполняться функция
  • Создать версию функции

Была ли статья полезна?

Предыдущая
Overview
Следующая
delete
Создавайте контент и получайте гранты!Готовы написать своё руководство? Участвуйте в контент-программе и получайте гранты на работу с облачными сервисами!
Подробнее о программе
Сделано на Gravity UI
Проект Яндекса
© 2026 ООО «Яндекс.Облако»