How to update an Edge Storage bucket
This guide walks you through updating an Edge Storage bucket using the Azion API and Azion CLI. It includes changing the permissions of a bucket, which can be crucial for managing access to your data.
Updating a bucket
Requirements
To update a bucket:
azion update edge-storage bucket
Azion CLI will present a series of interactions, so the bucket can be updated. Run azion update edge-storage bucket -h
for further information about the data that can be updated.
In this example, you will change the permission of the bucket.
Run the following PATCH
request in your terminal, replacing [TOKEN VALUE]
with your personal token and bucket_name
with the name of the bucket to attribute the read-write permission:
curl --location --request PATCH 'https://api.azion.com/v4/storage/buckets/<bucket_name>' \--header 'Accept: application/json; version=3' \--header 'Content-Type: application/json' \--header 'Authorization: Token [TOKEN VALUE]' \--data '{ "edge_access": "read_write"}'
You should receive the following response:
{ "state": "executed", "data": { "name": "my-bucket-ro", "edge_access": "read_write" }}
Contributors