Cloud Functions Service, REST: Function.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 Default value: 100. Acceptable values are 0 to 1000, inclusive. |
pageToken | Page token. To get the next page of results, set The maximum string length in characters is 100. |
filter | A filter expression that filters resources listed in the response. The expression must specify:
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"
],
"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`
},
"storageMounts": [
{
"bucketId": "string",
"prefix": "string",
"mountPointName": "string",
"readOnly": true
}
],
"asyncInvocationConfig": {
"retriesCount": "string",
"successTarget": {
// `versions[].asyncInvocationConfig.successTarget` includes only one of the fields `emptyTarget`, `ymqTarget`
"emptyTarget": {},
"ymqTarget": {
"queueArn": "string",
"serviceAccountId": "string"
},
// end of the list of possible fields`versions[].asyncInvocationConfig.successTarget`
},
"failureTarget": {
// `versions[].asyncInvocationConfig.failureTarget` includes only one of the fields `emptyTarget`, `ymqTarget`
"emptyTarget": {},
"ymqTarget": {
"queueArn": "string",
"serviceAccountId": "string"
},
// end of the list of possible fields`versions[].asyncInvocationConfig.failureTarget`
},
"serviceAccountId": "string"
},
"tmpfsSize": "string",
"concurrency": "string",
"mounts": [
{
"name": "string",
"mode": "string",
// `versions[].mounts[]` includes only one of the fields `objectStorage`, `ephemeralDiskSpec`
"objectStorage": {
"bucketId": "string",
"prefix": "string"
},
"ephemeralDiskSpec": {
"size": "string",
"blockSize": "string"
},
// end of the list of possible fields`versions[].mounts[]`
}
]
}
],
"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 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 |
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, multiple of 128MB. Acceptable values are 134217728 to 8589934592, 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[]. 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. The string length in characters for each value must be greater than 0. |
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.
|
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 |
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 |
versions[]. storageMounts[] |
object S3 mounts to be used by the version. |
versions[]. storageMounts[]. bucketId |
string Required. S3 bucket name for mounting. The string length in characters must be 3-63. Value must match the regular expression |
versions[]. storageMounts[]. prefix |
string S3 bucket prefix for mounting. |
versions[]. storageMounts[]. mountPointName |
string Required. Mount point directory name (not path) for mounting. The string length in characters must be 1-100. Value must match the regular expression |
versions[]. storageMounts[]. readOnly |
boolean (boolean) Is mount read only. |
versions[]. asyncInvocationConfig |
object Config for asynchronous invocations of the version |
versions[]. asyncInvocationConfig. retriesCount |
string (int64) Number of retries of version invocation Acceptable values are 0 to 100, inclusive. |
versions[]. asyncInvocationConfig. successTarget |
object Required. Target for successful result of the version's invocation Target to which a result of an invocation will be sent |
versions[]. asyncInvocationConfig. successTarget. emptyTarget |
object Target to ignore a result versions[].asyncInvocationConfig.successTarget includes only one of the fields emptyTarget , ymqTarget |
versions[]. asyncInvocationConfig. successTarget. ymqTarget |
object Target to send a result to ymq versions[].asyncInvocationConfig.successTarget includes only one of the fields emptyTarget , ymqTarget |
versions[]. asyncInvocationConfig. successTarget. ymqTarget. queueArn |
string Required. Queue ARN |
versions[]. asyncInvocationConfig. successTarget. ymqTarget. serviceAccountId |
string Required. Service account which has write permission on the queue. The maximum string length in characters is 50. |
versions[]. asyncInvocationConfig. failureTarget |
object Required. Target for unsuccessful result, if all retries failed Target to which a result of an invocation will be sent |
versions[]. asyncInvocationConfig. failureTarget. emptyTarget |
object Target to ignore a result versions[].asyncInvocationConfig.failureTarget includes only one of the fields emptyTarget , ymqTarget |
versions[]. asyncInvocationConfig. failureTarget. ymqTarget |
object Target to send a result to ymq versions[].asyncInvocationConfig.failureTarget includes only one of the fields emptyTarget , ymqTarget |
versions[]. asyncInvocationConfig. failureTarget. ymqTarget. queueArn |
string Required. Queue ARN |
versions[]. asyncInvocationConfig. failureTarget. ymqTarget. serviceAccountId |
string Required. Service account which has write permission on the queue. The maximum string length in characters is 50. |
versions[]. asyncInvocationConfig. serviceAccountId |
string Service account which can invoke version |
versions[]. tmpfsSize |
string (int64) Optional size of in-memory mounted /tmp directory in bytes. |
versions[]. concurrency |
string (int64) The maximum number of requests processed by a function instance at the same time Acceptable values are 0 to 16, inclusive. |
versions[]. mounts[] |
object Mounts to be used by the version. |
versions[]. mounts[]. name |
string Required. Unique mount point name. Device will be mounted into /function/storage/ The string length in characters must be 1-100. Value must match the regular expression |
versions[]. mounts[]. mode |
string Mount's mode |
versions[]. mounts[]. objectStorage |
object Object storage mounts versions[].mounts[] includes only one of the fields objectStorage , ephemeralDiskSpec |
versions[]. mounts[]. objectStorage. bucketId |
string Required. ObjectStorage bucket name for mounting. The string length in characters must be 3-63. Value must match the regular expression |
versions[]. mounts[]. objectStorage. prefix |
string ObjectStorage bucket prefix for mounting. |
versions[]. mounts[]. ephemeralDiskSpec |
object Working disk (worker-local non-shared read-write NBS disk templates) versions[].mounts[] includes only one of the fields objectStorage , ephemeralDiskSpec |
versions[]. mounts[]. ephemeralDiskSpec. size |
string (int64) The size of disk for mount in bytes Value must be greater than 0. |
versions[]. mounts[]. ephemeralDiskSpec. blockSize |
string (int64) Optional block size of disk for mount in bytes |
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 |