From 3f63851d9b75105ff750e3c932df241e9bce231f Mon Sep 17 00:00:00 2001 From: sachaarbonel Date: Thu, 16 May 2024 14:59:58 +0530 Subject: [PATCH 1/2] update docs --- docusaurus/video/docusaurus/docs/api/_common_/storage.mdx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docusaurus/video/docusaurus/docs/api/_common_/storage.mdx b/docusaurus/video/docusaurus/docs/api/_common_/storage.mdx index bf98ab56..9b87aea9 100644 --- a/docusaurus/video/docusaurus/docs/api/_common_/storage.mdx +++ b/docusaurus/video/docusaurus/docs/api/_common_/storage.mdx @@ -220,6 +220,8 @@ The following policy needs to be attached to your queue (replace the value of Re To use Google Cloud Storage as your storage provider, you need to send your [service account](https://cloud.google.com/iam/docs/service-accounts-create) credentials as they are stored in your JSON file. Stream only needs permission to write new files, it is not necessary to grant any other permission. +> **Note:**: Note: We recommend reading the credentials from the file to avoid issues with copying and pasting errors. + @@ -238,12 +240,14 @@ await serverSideClient.createExternalStorage({ ```py +with open("/path/to/your/service-account-file.json") as service_account_file: + creds = service_account_file.read() client.create_external_storage( name='my-gcs', storage_type='gcs', bucket='my-bucket', path='directory_name/', - gcs_credentials="content of the service account file" + gcs_credentials=creds ) ``` From 9d772ac189f0e7ad7c3dd9b142ae4bebab1e5ee4 Mon Sep 17 00:00:00 2001 From: sachaarbonel Date: Thu, 16 May 2024 15:01:23 +0530 Subject: [PATCH 2/2] return to line --- docusaurus/video/docusaurus/docs/api/_common_/storage.mdx | 1 + 1 file changed, 1 insertion(+) diff --git a/docusaurus/video/docusaurus/docs/api/_common_/storage.mdx b/docusaurus/video/docusaurus/docs/api/_common_/storage.mdx index 9b87aea9..d9153bd9 100644 --- a/docusaurus/video/docusaurus/docs/api/_common_/storage.mdx +++ b/docusaurus/video/docusaurus/docs/api/_common_/storage.mdx @@ -242,6 +242,7 @@ await serverSideClient.createExternalStorage({ ```py with open("/path/to/your/service-account-file.json") as service_account_file: creds = service_account_file.read() + client.create_external_storage( name='my-gcs', storage_type='gcs',