Skip to main content
POST
/
storage
/
provisioning
/
v1
/
storage
/
{storage_id}
/
s3
/
bucket
/
{bucket_name}
/
lifecycle
Python
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.lifecycle.create(
    bucket_name="bucket_name",
    storage_id=0,
)
This response has no body data.

Authorizations

Authorization
string
header
required

API key for authentication. Make sure to include the word apikey, followed by a single space and then your token. Example: apikey 1234$abcdef

Path Parameters

storage_id
integer<int64>
required

Unique identifier for the storage instance

bucket_name
string
required

Name of the S3 bucket to configure lifecycle policy for

Body

application/json

Lifecycle configuration for automatic object cleanup

expiration_days
integer<int64>

Number of days after which objects will be automatically deleted from the bucket. Must be a positive integer. Common values: 30 for monthly cleanup, 365 for yearly retention.

Example:

30

Response