From 271f8d70792d76640ed8dcbeec7f7345b064a331 Mon Sep 17 00:00:00 2001 From: "gabriel.alves" Date: Thu, 6 Nov 2025 11:27:18 -0300 Subject: [PATCH] fix storage s3 protocol code on docs page --- .../en/pages/store-journey/storage/use-s3.mdx | 59 ++++++++++--------- .../pages/store-jornada/storage/usar-s3.mdx | 59 ++++++++++--------- 2 files changed, 64 insertions(+), 54 deletions(-) diff --git a/src/content/docs/en/pages/store-journey/storage/use-s3.mdx b/src/content/docs/en/pages/store-journey/storage/use-s3.mdx index d246695dac..2a80798bd5 100644 --- a/src/content/docs/en/pages/store-journey/storage/use-s3.mdx +++ b/src/content/docs/en/pages/store-journey/storage/use-s3.mdx @@ -23,22 +23,21 @@ The S3 protocol allows you to access buckets and objects using an Object Storage 1. Run the following `POST` request in your terminal, replacing `[TOKEN VALUE]` with your [personal token](/en/documentation/products/guides/personal-tokens/): ```bash -curl --location 'https://api.azion.com/v4#/operations/PostEdgeStorageCredentials' \ ---header 'Accept: application/json' \ ---header 'Authorization: Token [TOKEN VALUE]' \ ---header 'Content-Type: application/json' \ ---data '{ - "name": "my-s3-credential", - "capabilities": [ +curl --request POST \ + --url https://api.azion.com/v4/workspace/storage/credentials \ + --header 'Accept: application/json' \ + --header 'Authorization: Token [TOKEN VALUE]' \ + --header 'Content-Type: application/json' \ + --data '{ + "name": "full-access", + "capabilities": [ "listAllBucketNames", "listBuckets", "listFiles", "readFiles", "writeFiles", "deleteFiles" - ], - "bucket": "", - "expiration_date": "" + ] }' ``` @@ -53,26 +52,32 @@ curl --location 'https://api.azion.com/v4#/operations/PostEdgeStorageCredentials ```json { - "state": "executed", - "data": { - "name": "my-s3-credential", - "access_key": "", - "secret_key": "", // this value can no longer be accessed in future requests - "capabilities": [ - "listAllBucketNames", - "listBuckets", - "listFiles", - "readFiles", - "writeFiles", - "deleteFiles" - ], - "bucket": "", - "expiration_date": "", - "created_at": "" - } + "state": "executed", + "data": { + "name": "full-access", + "access_key": "", + "secret_key": "", // this value can no longer be accessed in future requests + , + "capabilities": [ + "listAllBucketNames", + "listBuckets", + "listFiles", + "readFiles", + "writeFiles", + "deleteFiles" + ], + "bucket": null, + "expiration_date": null, + "last_editor": "editor@email.com", + "last_modified": "2025-11-05T19:55:31.542240Z" + } } ``` +:::note +The bucket field is optional. If it is not provided and the credential has the capabilities listAllBucketNames and listBuckets, it can be used to access all buckets in the account. However, if the bucket field is specified, access will be restricted to the indicated bucket. +::: + 3. Copy the values of the `access_key` and `secret_key` to set up access thorugh the S3 protocol. --- diff --git a/src/content/docs/pt-br/pages/store-jornada/storage/usar-s3.mdx b/src/content/docs/pt-br/pages/store-jornada/storage/usar-s3.mdx index 3aa2a064bd..ad1bf87f5d 100644 --- a/src/content/docs/pt-br/pages/store-jornada/storage/usar-s3.mdx +++ b/src/content/docs/pt-br/pages/store-jornada/storage/usar-s3.mdx @@ -21,22 +21,21 @@ O protocolo S3 permite que você acesse buckets e objetos usando uma URL do Obje 1. Execute a seguinte requisição `POST` no seu terminal, substituindo `[TOKEN VALUE]` pelo seu [personal token](/pt-br/documentacao/produtos/guias/personal-tokens/): ```bash -curl --location 'https://api.azion.com/v4#/operations/PostEdgeStorageCredentials' \ ---header 'Accept: application/json' \ ---header 'Authorization: Token [TOKEN VALUE]' \ ---header 'Content-Type: application/json' \ ---data '{ - "name": "my-s3-credential", - "capabilities": [ +curl --request POST \ + --url https://api.azion.com/v4/workspace/storage/credentials \ + --header 'Accept: application/json' \ + --header 'Authorization: Token [TOKEN VALUE]' \ + --header 'Content-Type: application/json' \ + --data '{ + "name": "full-access", + "capabilities": [ "listAllBucketNames", "listBuckets", "listFiles", "readFiles", "writeFiles", "deleteFiles" - ], - "bucket": "", - "expiration_date": "" + ] }' ``` @@ -51,26 +50,32 @@ curl --location 'https://api.azion.com/v4#/operations/PostEdgeStorageCredentials ```json { - "state": "executed", - "data": { - "name": "my-s3-credential", - "access_key": "", - "secret_key": "", // this value can no longer be accessed in future requests - "capabilities": [ - "listAllBucketNames", - "listBuckets", - "listFiles", - "readFiles", - "writeFiles", - "deleteFiles" - ], - "bucket": "", - "expiration_date": "", - "created_at": "" - } + "state": "executed", + "data": { + "name": "full-access", + "access_key": "", + "secret_key": "", // this value can no longer be accessed in future requests + , + "capabilities": [ + "listAllBucketNames", + "listBuckets", + "listFiles", + "readFiles", + "writeFiles", + "deleteFiles" + ], + "bucket": null, + "expiration_date": null, + "last_editor": "gabriel.bullit@gmail.com", + "last_modified": "2025-11-05T19:55:31.542240Z" + } } ``` +:::note +O campo bucket é opcional. Caso não seja informado e a credencial possua as capacidades listAllBucketNames e listBuckets, ela poderá ser utilizada para acessar todos os buckets da conta. No entanto, se o campo bucket for especificado, o acesso será restrito apenas ao bucket indicado. +::: + 3. Copie os valores de `access_key` e `secret_key` para configurar o acesso através do protocolo S3. ---