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
    • Overview
    • Creating a function
      • Overview
      • Node.js
      • Python
      • Go
      • PHP
      • Bash
      • Java
  • 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
      • Getting a list of functions
      • Getting a list of function versions
      • Getting information about a function
      • Getting information about a function version
    • Managing rights to access functions
      • Making a function public
      • Making a function private
      • Viewing roles assigned to a function
      • Assigning roles to a function
      • Revoking roles assigned to a function
    • Creating a function
      • Creating a function
      • Creating a function version
    • Invoking a function
      • Invoking a function
      • Authenticating when invoking a private function via HTTPS
    • Managing functions
      • Updating a function
        • Updating a name
        • Updating a description
      • Scaling a function
        • Viewing scaling settings
        • Adding scaling settings
        • Deleting scaling settings
      • Adding environment variables
      • Specifying a cloud network
      • Transmitting Yandex Lockbox secrets
      • Managing tags
        • Adding a tag
        • Removing a tag
      • Managing labels
        • Adding a label
        • Updating a label
        • Deleting a label
      • Viewing monitoring charts
      • Managing logs
        • Viewing logs
        • Writing logs
      • Deleting a function
    • Getting information about a trigger
      • Getting a list of triggers
      • Getting information about a trigger
    • Creating a trigger
      • Create a timer
      • Creating a trigger for Message Queue
      • Creating a trigger for Object Storage
      • Creating a trigger for Container Registry
      • Creating a trigger for Cloud Logs
      • Creating a trigger for Cloud Logging
      • Creating a trigger for Yandex IoT Core
      • Creating a trigger for budgets
      • Creating a trigger for Data Streams
      • Creating an email trigger
    • Managing triggers
      • Updating a trigger
        • Updating a name
        • Updating a description
      • Managing labels
        • Adding a label
        • Updating a label
        • Deleting a label
      • Viewing monitoring charts
      • Deleting a trigger
  • Concepts
    • Overview
    • Function
    • Invoking a function
    • Networking
    • Runtime environment
      • Overview
      • Environment
      • Execution context
      • Preloaded runtime environment
    • Builder
    • Trigger
      • Overview
      • Timer
      • Trigger for Message Queue
      • Trigger for Object Storage
      • Trigger for Container Registry
      • Trigger for Cloud Logs
      • Trigger for Cloud Logging
      • Trigger for Yandex IoT Core
      • Trigger for budgets
      • Trigger for Data Streams
      • Email trigger
    • Dead Letter Queue
    • Function logs
    • Backups
    • Quotas and limits
  • Developing in Node.js
    • Overview
    • Managing dependencies
    • Request handler
    • Invocation context
    • Logging
    • Handling errors
    • Using the SDK
  • Developing in Python
    • Overview
    • Managing dependencies
    • Request handler
    • Invocation context
    • Logging
    • Handling errors
    • Using the SDK
  • Developing in Go
    • Overview
    • Managing dependencies
    • Request handler
    • Invocation context
    • Logging
    • Handling errors
    • Using the SDK
  • Developing in PHP
    • Overview
    • Managing dependencies
    • Request handler
    • Invocation context
    • Logging
    • Handling errors
  • Developing in Bash
    • Overview
    • Request handler
    • Logging
    • Handling errors
    • Using the SDK
  • Developing in Java
    • Overview
    • Programming model
      • Overview
      • Function interface
      • YcFunction interface
      • HttpServlet class
      • Spring Boot
    • Managing dependencies
    • Request handler
    • Invocation context
    • Logging
    • Handling errors
    • Using the SDK
  • Developing in R
    • Overview
    • Programming model
    • Managing dependencies
    • Request handler
    • Invocation context
    • Logging
    • Handling errors
  • Developing in C#
    • Overview
    • Programming model
      • Overview
      • Function interface
      • YcFunction interface
    • Managing dependencies
    • Request handler
    • Invocation context
    • Logging
    • Handling errors
    • Using the SDK
  • Practical guidelines
    • All practical guidelines
    • Creating skills for Alice
    • Deploying a web application
    • Developing a skill for Alice and a website with authorization
    • Writing data from a device to Managed Service for PostgreSQL
    • Developing a Slack bot
    • Developing a Telegram bot
    • Connecting to a YDB database from a Python function
    • Connecting to a YDB database from a function in Node.js
    • Converting a video to a GIF in Python
    • Creating a Node.js function using TypeScript
    • Developing user integration
    • Creating a trigger for budgets that invokes a function to stop VM instances
  • Pricing policy
  • Access management
  • API Functions reference
    • Authentication in the API
    • gRPC
      • Overview
      • FunctionService
      • OperationService
    • REST
      • Overview
      • Function
        • Overview
        • create
        • createVersion
        • delete
        • get
        • getVersion
        • getVersionByTag
        • list
        • listAccessBindings
        • listOperations
        • listRuntimes
        • listScalingPolicies
        • listTagHistory
        • listVersions
        • removeScalingPolicy
        • removeTag
        • setAccessBindings
        • setScalingPolicy
        • setTag
        • update
        • updateAccessBindings
  • API Triggers reference
    • Authentication in the API
    • gRPC
      • Overview
      • TriggerService
      • OperationService
    • REST
      • Overview
      • Trigger
        • Overview
        • create
        • delete
        • get
        • list
        • listOperations
        • pause
        • resume
        • update
  • Questions and answers
  1. API Functions reference
  2. REST
  3. Function
  4. listVersions

Cloud Functions Service, REST: Function.listVersions

Written by
Yandex Cloud
,
improved by
amatol
  • HTTP request
  • Query parameters
  • Response

Retrieves the list of versions for the specified function, or of all function versions
in the specified folder.

HTTP request

GET https://serverless-functions.api.cloud.yandex.net/functions/v1/versions

Query parameters

Parameter Description
folderId

ID of the folder to list function versions for. To get a folder ID make a list request.

functionId

ID of the function to list versions for. To get a function ID use a list request.

pageSize

The maximum number of results per page to return. If the number of available results is larger than pageSize, the service returns a nextPageToken that can be used to get the next page of results in subsequent list requests.

Default value: 100.

Acceptable values are 0 to 1000, inclusive.

pageToken

Page token. To get the next page of results, set pageToken to the nextPageToken returned by a previous list request.

The maximum string length in characters is 100.

filter

A filter expression that filters resources listed in the response.

The expression must specify:

  1. The field name. Currently filtering can only be applied to the status and runtime fields.
  2. An = operator.
  3. The value in double quotes ("). Must be 3-63 characters long and match the regular expression [a-z][-a-z0-9]{1,61}[a-z0-9]. Example of a filter: status="ACTIVE".

The maximum string length in characters is 1000.

Response

HTTP Code: 200 - OK

{
  "versions": [
    {
      "id": "string",
      "functionId": "string",
      "description": "string",
      "createdAt": "string",
      "runtime": "string",
      "entrypoint": "string",
      "resources": {
        "memory": "string"
      },
      "executionTimeout": "string",
      "serviceAccountId": "string",
      "imageSize": "string",
      "status": "string",
      "tags": [
        "string"
      ],
      "logGroupId": "string",
      "environment": "object",
      "connectivity": {
        "networkId": "string",
        "subnetId": [
          "string"
        ]
      },
      "namedServiceAccounts": "object",
      "secrets": [
        {
          "id": "string",
          "versionId": "string",
          "key": "string",
          "environmentVariable": "string"
        }
      ],
      "logOptions": {
        "disabled": true,
        "minLevel": "string",

        // `versions[].logOptions` includes only one of the fields `logGroupId`, `folderId`
        "logGroupId": "string",
        "folderId": "string",
        // end of the list of possible fields`versions[].logOptions`

      }
    }
  ],
  "nextPageToken": "string"
}
Field Description
versions[] object

List of versions for the specified folder or function.

versions[].
id
string

ID of the version.

versions[].
functionId
string

ID of the function that the version belongs to.

versions[].
description
string

Description of the version.

The string length in characters must be 0-256.

versions[].
createdAt
string (date-time)

Creation timestamp for the version.

String in RFC3339 text format. The range of possible values is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z, i.e. from 0 to 9 digits for fractions of a second.

To work with values in this field, use the APIs described in the Protocol Buffers reference. In some languages, built-in datetime utilities do not support nanosecond precision (9 digits).

versions[].
runtime
string

ID of the runtime environment for the function.

Supported environments and their identifiers are listed in the Runtime environments.

versions[].
entrypoint
string

Entrypoint for the function: the name of the function to be called as the handler.

Specified in the format <function file name>.<handler name>, for example, index.myFunction.

versions[].
resources
object

Resources allocated to the version.

Resources allocated to a version.

versions[].
resources.
memory
string (int64)

Amount of memory available to the version, specified in bytes.

Acceptable values are 134217728 to 4294967296, inclusive.

versions[].
executionTimeout
string

Timeout for the execution of the version.

If the timeout is exceeded, Cloud Functions responds with a 504 HTTP code.

versions[].
serviceAccountId
string

ID of the service account associated with the version.

versions[].
imageSize
string (int64)

Final size of the deployment package after unpacking.

versions[].
status
string

Status of the version.

  • CREATING: Version is being created.
  • ACTIVE: Version is ready to use.
versions[].
tags[]
string

Version tags. For details, see Version tag.

versions[].
logGroupId
string

ID of the log group for the version.

versions[].
environment
object

Environment settings for the version.

versions[].
connectivity
object

Network access. If specified the version will be attached to specified network/subnet(s).

Version connectivity specification.

versions[].
connectivity.
networkId
string

Network the version will have access to. It's essential to specify network with subnets in all availability zones.

versions[].
connectivity.
subnetId[]
string

Complete list of subnets (from the same network) the version can be attached to. It's essential to specify at least one subnet for each availability zones.

versions[].
namedServiceAccounts
object

Additional service accounts to be used by the version.

versions[].
secrets[]
object

Yandex Lockbox secrets to be used by the version.

versions[].
secrets[].
id
string

ID of Yandex Lockbox secret.

versions[].
secrets[].
versionId
string

ID of Yandex Lockbox version.

versions[].
secrets[].
key
string

Key in secret's payload, which value to be delivered into function environment.

versions[].
secrets[].
environmentVariable
string

environment variable in which secret's value to be delivered.

versions[].
logOptions
object

Options for logging from the function

versions[].
logOptions.
disabled
boolean (boolean)

Is logging from function disabled.

versions[].
logOptions.
minLevel
string
Minimum log entry level. See [LogLevel.Level] for details.
  • TRACE: Trace log level.

    Possible use case: verbose logging of some business logic.

  • DEBUG: Debug log level.

    Possible use case: debugging special cases in application logic.

  • INFO: Info log level.

    Mostly used for information messages.

  • WARN: Warn log level.

    May be used to alert about significant events.

  • ERROR: Error log level.

    May be used to alert about errors in infrastructure, logic, etc.

  • FATAL: Fatal log level.

    May be used to alert about unrecoverable failures and events.

versions[].
logOptions.
logGroupId
string
versions[].logOptions includes only one of the fields logGroupId, folderId

Entry should be written to log group resolved by ID.

Value must match the regular expression ([a-zA-Z][-a-zA-Z0-9_.]{0,63})?.

versions[].
logOptions.
folderId
string
versions[].logOptions includes only one of the fields logGroupId, folderId

Entry should be written to default log group for specified folder.

Value must match the regular expression ([a-zA-Z][-a-zA-Z0-9_.]{0,63})?.

nextPageToken string

Token for getting the next page of the list. If the number of results is greater than the specified pageSize, use nextPageToken as the value for the pageToken parameter in the next list request.

Each subsequent page will have its own nextPageToken to continue paging through the results.

Was the article helpful?

Language / Region
Yandex project
© 2023 Yandex.Cloud LLC
In this article:
  • HTTP request
  • Query parameters
  • Response