yc serverless function version create
Written by
Updated at October 3, 2024
Create new function version
Command Usage
Syntax:
yc serverless function version create (--function-id <FUNCTION_ID>|--function-name <FUNCTION_NAME>) [Flags...] [Global Flags...]
Flags
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 |
stringToString Version environment variables. |
--tags |
value[,value] Version tags. |
--network-name |
string Version network name. |
--network-id |
string Version network id. |
--subnet-name |
value[,value] Version subnet names. |
--subnet-id |
value[,value] 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:
|
--secret |
PROPERTY=VALUE[,PROPERTY=VALUE...] Version secret. Possible property names:
|
--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 |
PROPERTY=VALUE[,PROPERTY=VALUE...] Add a mount to the version. Example: type=ephemeral-disk,mount-point=mnt1,size=5GB Possible property names:
|
--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. |
Global Flags
Flag | Description |
---|---|
--profile |
string Set the custom configuration file. |
--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. |
--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. |
--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). |
--endpoint |
string Set the Cloud API endpoint (host:port). |
--token |
string Set the OAuth token to use. |
--impersonate-service-account-id |
string Set the ID of the service account to impersonate. |
--no-browser |
Disable opening browser for authentication. |
--format |
string Set the output format: text (default), yaml, json, json-rest. |
--jq |
string Query to select values from the response using jq syntax |
-h ,--help |
Display help for the command. |