Yandex Cloud
  • Services
  • Solutions
  • Why Yandex Cloud
  • Blog
  • Pricing
  • Documentation
  • Contact us
Get started
Language / Region
Yandex project
© 2023 Yandex.Cloud LLC
Yandex Serverless Containers
  • Comparison with other Yandex Cloud services
  • Getting started
  • Step-by-step instructions
  • Concepts
  • Practical guidelines
  • Access management
  • Pricing policy
  • Containers API reference
    • Authentication in the API
    • gRPC
    • REST
      • Overview
      • Container
        • Overview
        • create
        • delete
        • deployRevision
        • get
        • getRevision
        • list
        • listAccessBindings
        • listOperations
        • listRevisions
        • rollback
        • setAccessBindings
        • update
        • updateAccessBindings
  • API Triggers reference
  • Questions and answers
  1. Containers API reference
  2. REST
  3. Container
  4. listRevisions

Serverless Containers Service, REST: Container.listRevisions

Written by
Yandex Cloud
  • HTTP request
  • Query parameters
  • Response

Retrieves the list of revisions for the specified container, or of all container revisions
in the specified folder.

HTTP request

GET https://serverless-containers.api.cloud.yandex.net/containers/v1/revisions

Query parameters

Parameter Description
folderId

ID of the folder to list container revisions for. To get a folder ID make a list request.

containerId

ID of the container to list revisions for. To get a container 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 [Revision.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

{
  "revisions": [
    {
      "id": "string",
      "containerId": "string",
      "description": "string",
      "createdAt": "string",
      "image": {
        "imageUrl": "string",
        "imageDigest": "string",
        "command": {
          "command": [
            "string"
          ]
        },
        "args": {
          "args": [
            "string"
          ]
        },
        "environment": "object",
        "workingDir": "string"
      },
      "resources": {
        "memory": "string",
        "cores": "string",
        "coreFraction": "string"
      },
      "executionTimeout": "string",
      "concurrency": "string",
      "serviceAccountId": "string",
      "status": "string",
      "secrets": [
        {
          "id": "string",
          "versionId": "string",
          "key": "string",
          "environmentVariable": "string"
        }
      ],
      "connectivity": {
        "networkId": "string",
        "subnetIds": [
          "string"
        ]
      },
      "provisionPolicy": {
        "minInstances": "string"
      },
      "scalingPolicy": {
        "zoneInstancesLimit": "string",
        "zoneRequestsLimit": "string"
      },
      "logOptions": {
        "disabled": true,
        "minLevel": "string",

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

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

List of revisions for the specified folder or container.

revisions[].
id
string

ID of the revision.

revisions[].
containerId
string

ID of the container that the revision belongs to.

revisions[].
description
string

Description of the revision.

revisions[].
createdAt
string (date-time)

Creation timestamp for the revision.

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).

revisions[].
image
object

Image configuration for the revision.

Revision image specification.

revisions[].
image.
imageUrl
string

Image URL, that is used by the revision.

revisions[].
image.
imageDigest
string

Digest of the image. Calculated at creation time.

revisions[].
image.
command
object

Override for the image's ENTRYPOINT.

revisions[].
image.
command.
command[]
string

Command that will override ENTRYPOINT of an image.

Commands will be executed as is. The runtime will not substitute environment variables or execute shell commands. If one wants to do that, they should invoke shell interpreter with an appropriate shell script.

revisions[].
image.
args
object

Override for the image's CMD.

revisions[].
image.
args.
args[]
string

Arguments that will override CMD of an image.

Arguments will be passed as is. The runtime will not substitute environment variables or execute shell commands. If one wants to do that, they should invoke shell interpreter with an appropriate shell script.

revisions[].
image.
environment
object

Additional environment for the container.

Each key must match the regular expression [a-zA-Z][a-zA-Z0-9_]*. The maximum string length in characters for each value is 4096.

revisions[].
image.
workingDir
string

Override for the image's WORKDIR.

revisions[].
resources
object

Resources allocated to the revision.

Resources allocated to a revision.

revisions[].
resources.
memory
string (int64)

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

Acceptable values are 134217728 to 4294967296, inclusive.

revisions[].
resources.
cores
string (int64)

Number of cores available to the revision.

Acceptable values are 0 to 1, inclusive.

revisions[].
resources.
coreFraction
string (int64)

Specifies baseline performance for a core in percent.

Acceptable values are 0 to 100, inclusive.

revisions[].
executionTimeout
string

Timeout for the execution of the revision.

If the timeout is exceeded, Serverless Containers responds with a 504 HTTP code.

revisions[].
concurrency
string (int64)

The number of concurrent requests allowed per container instance.

revisions[].
serviceAccountId
string

ID of the service account associated with the revision.

revisions[].
status
string

Status of the revision.

  • CREATING: Revision is being created.
  • ACTIVE: Revision is currently used by the container.
  • OBSOLETE: Revision is not used by the container. May be deleted later.
revisions[].
secrets[]
object

Yandex Lockbox secrets to be used by the revision.

revisions[].
secrets[].
id
string

ID of Yandex Lockbox secret.

revisions[].
secrets[].
versionId
string

ID of Yandex Lockbox secret.

revisions[].
secrets[].
key
string

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

revisions[].
secrets[].
environmentVariable
string

Environment variable in which secret's value is delivered.

revisions[].
connectivity
object

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

Revision connectivity specification.

revisions[].
connectivity.
networkId
string

Network the revision will have access to.

revisions[].
connectivity.
subnetIds[]
string

The list of subnets (from the same network) the revision can be attached to.

Deprecated, it is sufficient to specify only network_id, without the list of subnet_ids.

The string length in characters for each value must be greater than 0.

revisions[].
provisionPolicy
object

Policy for provisioning instances of the revision.

The policy is only applied when the revision is ACTIVE.

revisions[].
provisionPolicy.
minInstances
string (int64)

Minimum number of guaranteed provisioned container instances for all zones in total.

revisions[].
scalingPolicy
object

Policy for scaling instances of the revision.

revisions[].
scalingPolicy.
zoneInstancesLimit
string (int64)

Upper limit for instance count in each zone. 0 means no limit.

revisions[].
scalingPolicy.
zoneRequestsLimit
string (int64)

Upper limit of requests count in each zone. 0 means no limit.

revisions[].
logOptions
object

Options for logging from the container.

revisions[].
logOptions.
disabled
boolean (boolean)

Is logging from container disabled.

revisions[].
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.

revisions[].
logOptions.
logGroupId
string
revisions[].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})?.

revisions[].
logOptions.
folderId
string
revisions[].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