Backups in Cloud Functions
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. - Select Cloud Functions.
- In the left-hand panel, select
Functions.
If you do not 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.
To get a list of functions, run the following command:
yc serverless function list
Result:
+----------------------+--------------------+----------------------+--------+
| ID | NAME | FOLDER ID | STATUS |
+----------------------+--------------------+----------------------+--------+
| b097d9ous3ge******** | my-beta-function | aoek49ghmknn******** | ACTIVE |
+----------------------+--------------------+----------------------+--------+
To get a list of functions, use the list REST API method for the Function resource or the FunctionsService/List gRPC API call.
You can get a list of functions using the Yandex Cloud Toolkit plugin
Getting a list of function versions
- In the management console
, select the folder containing the function. - Select Cloud Functions.
- In the left-hand panel, select
Functions. - 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 do not 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.
To find out the name or unique ID of a function, get a list of functions in the folder.
To get a list of function versions, run the following command:
yc serverless function version list --function-name <function_name>
Result:
+----------------------+----------------------+-----------+--------------+---------+---------------------+
| ID | FUNCTION ID | RUNTIME | ENTRYPOINT | TAGS | CREATED AT |
+----------------------+----------------------+-----------+--------------+---------+---------------------+
| b09u830mb1n3******** | b097d9ous3ge******** | python311 | test.handler | $latest | 2023-08-22 09:23:23 |
| b09ch6pmpohf******** | b097d9ous3ge******** | python311 | test.handler | beta | 2023-08-22 09:12:38 |
+----------------------+----------------------+-----------+--------------+---------+---------------------+
To get a list of function versions, use the listVersions REST API method for the Function resource or the FunctionsService/ListVersions gRPC API call.
You can create a list of function versions using the Yandex Cloud Toolkit plugin
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
, select the folder containing your function. - Select Cloud Functions.
- In the left-hand panel, select
Functions. - 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 do not 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.
To find out the name or unique ID of a function version, get a list of function versions in the folder.
To get detailed information about a function version by:
-
ID
, run the command:yc serverless function version get <version_ID>
Result:
id: b09u830mb1n3******** function_id: b097d9ous3ge******** created_at: "2023-08-22T09:23:23.383Z" runtime: python311 entrypoint: test.handler resources: memory: "134217728" execution_timeout: 5s image_size: "4096" status: ACTIVE tags: - $latest log_group_id: eolv6578frac********
-
TAGS
, run the command:yc serverless function version get-by-tag --function-name <function_name> --tag <tag>
Result:
id: b09ch6pmpohf******** function_id: b097d9ous3ge******** created_at: "2023-08-22T09:12:38.464Z" runtime: python311 entrypoint: test.handler resources: memory: "134217728" execution_timeout: 5s image_size: "4096" status: ACTIVE tags: - beta log_group_id: eolv6578frac********
To get detailed information about a function version, use the getVersion REST API method for the Function resource or the FunctionsService/GetVersion gRPC API call.
You can get details about a function version using the Yandex Cloud Toolkit plugin
Getting a list of triggers
- In the management console
, go to the folder where you want to view a list of triggers. - Select Cloud Functions.
- In the left-hand panel, select
Triggers.
If you do not 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 |
+----------------------+------------+----------------------+
| dd0gj5tsj2********** | my-trigger | aoek49ghmk********** |
+----------------------+------------+----------------------+
To get a list of triggers, use the list REST API method for the Trigger resource or the TriggerService/List gRPC API call.
Getting information about a trigger
- In the management console
, select the folder containing your trigger. - Select Cloud Functions.
- In the left-hand panel, select
Triggers. - Select the trigger to get detailed information about.
If you do not 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.
To find out the name or unique ID of a trigger, get a list of triggers in the folder.
Get detailed information about a trigger:
yc serverless trigger get <trigger_name>
Result:
id: a1s9q2li6t**********
folder_id: b1g9hv2loa**********
created_at: "2023-08-01T12:36:14.321Z"
name: my-trigger
description: Trigger for uploaded objects
rule:
object_storage:
event_type:
- OBJECT_STORAGE_EVENT_TYPE_CREATE_OBJECT
bucket_id: **********
batch_settings:
size: "10"
cutoff: 10s
invoke_function:
function_id: d4e5muirrt**********
function_tag: $latest
service_account_id: ajek0fou8e**********
status: ACTIVE
To get detailed information about a trigger, use the get REST API method for the Trigger resource or the TriggerService/Get gRPC API call.