Yandex Cloud
  • Services
  • Solutions
  • Why Yandex Cloud
  • Blog
  • Pricing
  • Documentation
  • Contact us
Get started
Language / Region
Yandex project
© 2023 Yandex.Cloud LLC
Yandex Cloud Functions
  • Comparison with other Yandex Cloud services
  • Getting started
  • Step-by-step instructions
    • All instructions
    • Using functions to get an IAM token for a service account
    • Connecting to managed databases from functions
    • Getting information about a function
    • Managing rights to access functions
    • Creating a function
    • Invoking a function
    • Managing functions
      • Updating a function
      • Scaling a function
      • Adding environment variables
      • Specifying a cloud network
      • Transmitting Yandex Lockbox secrets
      • Managing tags
      • Managing labels
      • Viewing monitoring charts
      • Managing logs
      • Deleting a function
    • Getting information about a trigger
    • Creating a trigger
    • Managing triggers
  • Concepts
  • Developing in Node.js
  • Developing in Python
  • Developing in Go
  • Developing in PHP
  • Developing in Bash
  • Developing in Java
  • Developing in R
  • Developing in C#
  • Practical guidelines
  • Pricing policy
  • Access management
  • API Functions reference
  • API Triggers reference
  • Questions and answers
  1. Step-by-step instructions
  2. Managing functions
  3. Specifying a cloud network

Specifying a cloud network where the function will be executed

Written by
Yandex Cloud
  • See also

Note

This feature is in the Preview stage. For access, contact technical support.

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 given cloud network.
Management console
CLI
API
  1. In the management console, select the folder containing your 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 Create version.

If you don't have the Yandex Cloud command line interface yet, install and initialize it.

The folder specified in the CLI profile is used by default. You can specify a different folder 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: The function name.
  • --runtime: The runtime environment.
  • --entrypoint: The entry point specified in the . format.
  • --memory: The amount of RAM.
  • --execution-timeout: The maximum function execution time before the timeout is reached.
  • --source-version-id: The ID of the function version to copy the code of.
  • --network-id: ID of a cloud network where the function will be executed.

You can specify a cloud network using the createVersion API method.

See also

  • Networking in Cloud Functions.

Was the article helpful?

Language / Region
Yandex project
© 2023 Yandex.Cloud LLC