Yandex Cloud
Search
Discuss with expertTry it for free
  • Customer Stories
  • Documentation
  • Blog
  • All Services
    • 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
    • Yandex Identity Hub
    • Key Management Service
    • Certificate Manager
    • Yandex Lockbox
    • Audit Trails
    • SmartCaptcha
    • Cloud Desktop
    • Yandex SIEM
    • SourceCraft Code Assistant
    • Container Registry
    • Managed Service for GitLab
    • Managed Service for Prometheus®
    • Cloud Functions
    • API Gateway
    • Yandex Cloud Postbox
    • Message Queue
    • Serverless Integrations
    • IoT Core
    • Data Streams
    • Serverless Containers
    • Cloud Notification Service
    • Yandex Query
    • Identity and Access Management
    • Yandex Cloud Console
    • Resource Manager
    • Yandex Cloud Billing
    • Yandex Cloud Quota Manager
    • Cloud Apps
  • System Status
  • Marketplace
    • Featured
    • Infrastructure & Network
    • Data Platform
    • AI for business
    • Security
    • DevOps tools
    • Serverless
    • Monitoring & Resources
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Center for Technologies and Society
    • Yandex Cloud Partner program
    • Price calculator
    • Pricing plans
  • Customer Stories
  • Documentation
  • Blog
© 2026 Direct Cursus Technology L.L.C.
Command line interface
  • Getting started
    • All guides
    • Installation
    • Updates
    • Deletion
    • Working with command versions
    • Running commands
    • Endpoints
    • Configuration
    • Synchronous and asynchronous command execution modes
  • Releases
  • Troubleshooting

In this article:

  • Providing multiple values for a single parameter
  • Examples
  • Managing a CLI configuration
  • Accessing resources by name
  • Synchronous command execution
  • Connecting to a proxy server
  • Command versioning
  1. Concepts
  2. Running commands

Running the Yandex Cloud CLI commands

Written by
Yandex Cloud
Updated at August 19, 2026
View in Markdown
  • Providing multiple values for a single parameter
    • Examples
  • Managing a CLI configuration
    • Accessing resources by name
  • Synchronous command execution
  • Connecting to a proxy server
  • Command versioning

CLI commands are grouped by Yandex Cloud service or component.

Note

To get help information for a particular command, specify the --help global flag.

Commands are executed after authentication, and the token is then saved in the file system. You can also get the token from the YC_IAM_TOKEN environment variable regardless of whether or not you have a saved token.

Providing multiple values for a single parameterProviding multiple values for a single parameter

Some CLI parameters can take multiple values. Depending on the command, you can either provide a comma-separated list of values or specify them individually by repeating the parameter:

yc <command> \
  --<parameter> <value_1> \
  --<parameter> <value_2>

The supported method for providing values depends on the command and parameter. Before running a command, view its description:

yc <command> --help

ExamplesExamples

When creating a function version, you can provide each environment variable in a separate --environment parameter. For example, this method is useful if the variable value contains commas:

yc serverless function version create \
  --function-name my-function \
  --runtime python312 \
  --entrypoint main.handler \
  --source-path ./function.zip \
  --environment OPENSEARCH_HOSTS='["hostname1","hostname2","hostname3"]' \
  --environment OPENSEARCH_INDEX=index_v2

When assigning roles for a certificate, provide each binding individually by repeating the --access-binding parameter:

yc certificate-manager certificate set-access-bindings my-certificate \
  --access-binding role=editor,subject=userAccount:gfei8n54hmfh******** \
  --access-binding role=viewer,subject=userAccount:helj89sfj80a******** \
  --access-binding role=editor,subject=serviceAccount:ajel6l0jcb9s********

Managing a CLI configurationManaging a CLI configuration

Use one of the following to set or change the values of the CLI configuration parameters before executing a command:

  • Profiles: They store the value of a parameter (or multiple parameters) to use when running each command.

    You can create multiple profiles and switch between them as you need or run a command once using parameters from another profile by specifying the global --profile parameter.

    For more information about profile management, see the step-by-step instructions.

  • Global parameters: They define properties only once when a command is called.

    Global parameters are available for any command at any nesting level, but not all commands can process them. For example, if a resource is defined only by an ID, the cloud and folder parameters are ignored.

For a full list of available configuration parameters, see CLI configuration.

Accessing resources by nameAccessing resources by name

In most CLI commands, you can use either the resource ID or resource name. If you access a resource by its name, the search will be limited to the default folder.

If the resource is in a different folder and you want to access it, specify the folder explicitly via a global parameter:

yc <command> <resource_name> --folder-id <folder_ID>
yc <command> <resource_name> --folder-name <folder_name>

# Examples
yc compute instance get testvm --folder-id b1g2doq3bh19********
yc lockbox payload get my-secret --folder-name testname

To find out the default folder:

yc config list

Tip

If using a resource ID, you do not need to specify the folder because their IDs are unique.

Synchronous command executionSynchronous command execution

Some commands take a long time to execute. In this case, you can control the timing of command execution.
While a command is running, the CLI displays dots in synchronous mode and immediately provides information about the operation in asynchronous mode. For more information about synchronization, see Synchronous and asynchronous modes of command execution.

Connecting to a proxy serverConnecting to a proxy server

The CLI can send requests to Yandex Cloud through a proxy server. To do this, you need to create the HTTPS_PROXY environment variable which the CLI will read for connection parameters. In the variable, specify:

  • Login and a password if authentication is required to connect.
  • Proxy server domain name or IP address.
  • Port to connect to.

Tip

In the proxy server URL, specify the protocol used by the proxy server for incoming connections. If you do not know the protocol, contact your administrator. For more information about supported protocols, see this net/http package guide.

If the password contains special characters, replace them with hexadecimal ASCII codes. For example, if the password contains the @ character, use %40.

Linux/macOS
Windows (PowerShell)
Windows (cmd)

To create the HTTPS_PROXY environment variable, run this command:

export HTTPS_PROXY="https://user:password@hostname:port"

To disable traffic routing through the proxy server, clear HTTPS_PROXY:

unset HTTPS_PROXY

To create the HTTPS_PROXY environment variable, run this command:

$Env:HTTPS_PROXY = "https://user:password@hostname:port"

To disable traffic routing through the proxy server, restart the shell or clear HTTPS_PROXY using the command below:

$Env:HTTPS_PROXY = ""

To create the HTTPS_PROXY environment variable, run this command:

set HTTPS_PROXY=https://user:password@hostname:port

To disable traffic routing through the proxy server, restart the shell or clear HTTPS_PROXY using the command below:

set HTTPS_PROXY=

Command versioningCommand versioning

To quickly release new service functionality and provide broader coverage of public API calls, the Yandex Cloud CLI is gradually introducing a new approach to generating command trees directly from the public gRPC API proto specifications.

With the new approach in place, new commands and their parameters are not always the same as the previous ones. For backward compatibility, versioning of service command trees has been implemented.

In each group of service commands, e.g., yc compute, the main command branch remains as before: yc compute [ instance | image | disk | ... ], but branches with command version numbers are also added, e.g., yc compute v0 [ instance | image | disk | ... ].

The main branch of commands must match one of the versions. If there is only one version, the main branch completely duplicates it.

The information on adding or removing a command version, as well as on switching the main branch to another version, is published in Yandex Cloud CLI releases.

Tip

Use the current version of the CLI and the command tree the service has assigned as the main one. If CLI commands are called from scripts, CI/CD, or other automated processes, first check command compatibility when migrating to a new CLI version. While the legacy version of the commands is available, you can explicitly state it in specific commands or set it as the default version.

For more information, see Working with Yandex Cloud CLI command versions.

Useful linksUseful links

Working with the Yandex Cloud CLI and API in Microsoft Windows

Was the article helpful?

Previous
Without a GUI and browser
Next
Endpoints
© 2026 Direct Cursus Technology L.L.C.