11Running this sample with the managed YDB instance in Yandex Cloud
22---
33
4- (0) Install the yc command line tool
4+ (0) Install the required Python dependencies
5+
6+ python3 -m pip install iso8601
7+ python3 -m pip install 'ydb[ yc] '
8+
9+ (1) Install the yc command line tool
510
611https://cloud.yandex.ru/docs/cli/operations/install-cli
712
8- (1 ) Create the service account using the YC Web Console, and assign it the ydb.editor role.
13+ (2 ) Create the service account using the YC Web Console, and assign it the ydb.editor role.
914
1015Alternatively use the following shell snippet:
1116
@@ -21,7 +26,7 @@ export SA_ID=`yc iam service-account get --name $SA_NAME | sed -n 's/^id: \(.*\)
2126yc resource-manager folder add-access-binding $YC_FOLDER --role ydb.editor --subject serviceAccount:$SA_ID
2227```
2328
24- (2 ) Generate the service account key to be used for authentication.
29+ (3 ) Generate the service account key to be used for authentication.
2530
2631Note: unfortunately, right now YC Web Console does not offer a way to generate the SA key
2732with its Web interface.
@@ -30,7 +35,7 @@ with its Web interface.
3035yc iam key create --service-account-name $SA_NAME --output $HOME /key-ydb-sa-0.json
3136```
3237
33- (3 ) Obtain the endpoint and database path from the Web Console.
38+ (4 ) Obtain the endpoint and database path from the Web Console.
3439
3540Alternatively, use the following command to grab the required data in the shell:
3641
@@ -40,7 +45,7 @@ yc ydb db get --name ydb1
4045
4146` ydb1 ` value in the command above is the logical name of the YDB managed database.
4247
43- (4 ) Run the sample:
48+ (5 ) Run the sample:
4449
4550``` bash
4651# Set the path to the service account key file
0 commit comments