This guide walks you through updating an Object Storage bucket using the Azion Console, 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
In the Azion Console, you can update a bucket by following these steps:
- Access the Object Storage menu in the Products menu.
- On the Object Storage page, click on the bucket you want to update.
- On the bucket page, click the Settings button.
- Make the necessary changes to the permissions and click Save to apply the changes.
- In Danger Zone, you can permanently delete the bucket. Note: You cannot delete a bucket that is not empty. Additionally, objects deleted in the last 24 hours are also taken into account.
Requirements
To update a bucket:
azion update edge-storage bucketAzion 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;' \--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" }}