Yandex Cloud
Search
Contact UsGet started
  • Blog
  • Pricing
  • Documentation
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • ML & AI
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Customer Stories
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
  • Blog
  • Pricing
  • Documentation
Yandex project
© 2025 Yandex.Cloud LLC
Yandex Cloud Functions
  • Comparison with other Yandex Cloud services
    • All guides
    • Using functions to get an IAM token for a service account
    • Connecting to managed databases from functions
      • Adding environment variables
      • Specifying a cloud network
      • Transferring Yandex Lockbox secrets
      • Allocating memory for the /tmp directory
      • Viewing monitoring charts
      • Migration to the ru-central1-d availability zone
      • Deleting a function version
      • Deleting a function
    • Viewing operations with service resources
  • Tools
  • Pricing policy
  • Access management
  • Terraform reference
  • Monitoring metrics
  • Audit Trails events
  • Release notes
  • FAQ
  1. Step-by-step guides
  2. Managing a function
  3. Specifying a cloud network

Specifying a cloud network where the function will be executed

Written by
Yandex Cloud
Updated at June 3, 2025

You can specify a cloud network where the function will be executed.

A cloud network must meet the following conditions:

  • Has subnets in all availability zones.
  • Has at least one resource with an IP address in the specified cloud network.

Note

If the network does not meet the conditions above, the service does not guarantee its operation.

Management console
CLI
API
  1. In the management console, select the folder containing the function.
  2. Select Cloud Functions.
  3. Select a function.
  4. Go to the Editor tab.
  5. Under Parameters, in the Network field, choose a network for function execution.
  6. Click Save changes.

If you do not have the Yandex Cloud CLI yet, install and initialize it.

By default, the CLI uses the folder specified when creating the profile. To change the default folder, use the yc config set folder-id <folder_ID> command. You can also set a different folder for any specific command using the --folder-name or --folder-id parameter.

To specify a cloud network, run the command:

yc serverless function version create \
  --function-name=<function_name> \
  --runtime <runtime_environment> \
  --entrypoint <entry_point> \
  --memory 128m \
  --execution-timeout 5s \
  --source-version-id <version_ID> \
  --network-id <network_ID>

Where:

  • --function-name: Function name.
  • --runtime: Runtime environment.
  • --entrypoint: Entry point in <function_file_name>.<handler_name> format.
  • --memory: Amount of RAM.
  • --execution-timeout: Maximum function running time before the timeout is reached.
  • --source-version-id: ID of the function version from which you want to copy the code.
  • --network-id: ID of a cloud network where the function will be executed.

To specify a cloud network, use the createVersion REST API method for the Function resource or the FunctionService/CreateVersion gRPC API call.

See alsoSee also

  • Networking in Cloud Functions.

Was the article helpful?

Previous
Adding environment variables
Next
Transferring Yandex Lockbox secrets
Yandex project
© 2025 Yandex.Cloud LLC