Backups
Data in Cloud Functions is stored securely and replicated within the Yandex.Cloud infrastructure. You can get:
- Lists of functions.
- Lists of function versions.
- Information about function versions.
- Lists of triggers.
- Information about triggers.
Getting a list of functions
- In the management console, go to the folder where you want to view a list of functions.
- Open Cloud Functions.
- Go to the Functions tab.
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.
Get a list of functions:
yc serverless function list
Result:
+----------------------+--------------------+----------------------+--------+
| ID | NAME | FOLDER ID | STATUS |
+----------------------+--------------------+----------------------+--------+
| b097d9ous3gep99khe83 | my-beta-function | aoek49ghmknnpj1ll45e | ACTIVE |
+----------------------+--------------------+----------------------+--------+
You can get a list of functions using the list API method.
Getting a list of function versions
- In the management console, go to the folder where the function is located.
- Open Cloud Functions.
- Go to the Functions tab.
- Select the function to get a list of versions for.
- Under Version history, you can find the list of function versions and their details.
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.
Get the list of versions for the function:
yc serverless function version list --function-name <function name>
Result:
+----------------------+----------------------+----------+--------------+---------+---------------------+
| ID | FUNCTION ID | RUNTIME | ENTRYPOINT | TAGS | CREATED AT |
+----------------------+----------------------+----------+--------------+---------+---------------------+
| b09u830mb1n32a7rj0n8 | b097d9ous3gep99khe83 | python37 | test.handler | $latest | 2019-06-13 09:23:23 |
| b09ch6pmpohfc9sogj5f | b097d9ous3gep99khe83 | python37 | test.handler | beta | 2019-06-13 09:12:38 |
+----------------------+----------------------+----------+--------------+---------+---------------------+
You can get a list of function versions using the listVersions API method.
Getting information about a function version
Warning
There is no backup of function code. We recommend saving it on your own.
- In the management console, go to the folder where the function is located.
- Open Cloud Functions.
- Go to the Functions tab.
- Select the function to get a list of versions for.
- Under Version history, you can find the list of function versions and their details.
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.
Get details of the function version by:
-
ID
:yc serverless function version get <version ID>
Result:
id: b09u830mb1n32a7rj0n8 function_id: b097d9ous3gep99khe83 created_at: "2019-06-13T09:23:23.383Z" runtime: python37 entrypoint: test.handler resources: memory: "134217728" execution_timeout: 5s image_size: "4096" status: ACTIVE tags: - $latest log_group_id: eolv6578frac08uh5h6s
-
TAGS
:yc serverless function version get-by-tag --function-name <function name> --tag <tag>
Result:
id: b09ch6pmpohfc9sogj5f function_id: b097d9ous3gep99khe83 created_at: "2019-06-13T09:12:38.464Z" runtime: python37 entrypoint: test.handler resources: memory: "134217728" execution_timeout: 5s image_size: "4096" status: ACTIVE tags: - beta log_group_id: eolv6578frac08uh5h6s
You can get details of the function version using the getVersion API method.
Getting a list of triggers
- In the management console, go to the folder where you want to view a list of triggers.
- Open Cloud Functions.
- Go to the Triggers tab.
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.
Get a list of triggers:
yc serverless trigger list
Result:
+----------------------+------------+----------------------+
| ID | NAME | FOLDER ID |
+----------------------+------------+----------------------+
| dd0gj5tsj2pq9at8ja8i | my-trigger | aoek49ghmknnpj1ll45e |
+----------------------+------------+----------------------+
You can get a list of triggers using the list API method.
Getting information about a trigger
- In the management console, go to the folder where the trigger is located.
- Open Cloud Functions.
- Go to the Triggers tab.
- Select the trigger to get detailed information about.
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.
Get detailed information about a trigger:
yc serverless trigger get <trigger name>
Result:
id: dd0gj5tsj2pq9at8ja8i
folder_id: aoek49ghmknnpj1ll45e
created_at: "2019-08-28T12:26:25.675Z"
name: my-trigger
description: My YMQ trigger.
rule:
message_queue:
arn: yrn:yc:ymq:ru-central1:aoek49ghmknnpj1ll45e:my-mq
service_account_id: bfbqqeo6jkpls2tse5o6
batch_settings:
size: "10"
cutoff: 10s
invoke_function:
function_id: b09e5lu91ta21vdrrgma
function_tag: $latest
service_account_id: bfbqqeo6jkpls2tse5o6
status: ACTIVE
You can get detailed information about a trigger using the get API method.