Method listVersions
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"
}
]
}
],
"nextPageToken": "string"
}
Field | Description |
---|---|
versions[] | object Version of a function. For details about the concept, see Function versions. |
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. |
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 |
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.
|
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 Secret for serverless function |
versions[]. secrets[]. id |
string ID of lockbox secret |
versions[]. secrets[]. versionId |
string ID of secret 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 |
nextPageToken | string Token for getting the next page of the list. If the number of results is greater than the specified pageSize, use Each subsequent page will have its own |