import os
from gcore import Gcore
client = Gcore(
api_key=os.environ.get("GCORE_API_KEY"), # This is the default and can be omitted
)
client.storage.buckets.policy.create(
bucket_name="bucket_name",
storage_id=0,
)
Copy
Ask AI
This response has no body data.
Storage
Make S3 bucket public
Applies a public read policy to the S3 bucket, allowing anonymous users to download/access all objects in the bucket via HTTP GET requests. This makes the bucket suitable for static website hosting, public file sharing, or CDN integration. Only grants read access - users cannot upload, modify, or delete objects without proper authentication.
Deprecated: Use PATCH /provisioning/v3/storages/{`storage_id`}/buckets/{`bucket_name`} with {"policy": {"public": true}} instead.
POST
/
storage
/
provisioning
/
v1
/
storage
/
{storage_id}
/
s3
/
bucket
/
{bucket_name}
/
policy
Python
Copy
Ask AI
import os
from gcore import Gcore
client = Gcore(
api_key=os.environ.get("GCORE_API_KEY"), # This is the default and can be omitted
)
client.storage.buckets.policy.create(
bucket_name="bucket_name",
storage_id=0,
)