v32

latestOpenAPI 3.1.0raw.githubusercontent.com2026-05-151,1412,2144.5 MB
Storage

Configure S3 bucket automatic cleanup

Sets up automatic object expiration for an S3 bucket. All objects in the bucket will be automatically deleted after the specified number of days to help manage storage costs and meet compliance requirements. This applies a global lifecycle rule to the entire bucket - all existing and future objects will be subject to the expiration policy.

Deprecated: Use PATCH /v4/object_storages/{storage_id}/buckets/{bucket_name} with {"lifecycle": {"expiration_days": N}} instead.

post/storage/provisioning/v1/storage/{storage_id}/s3/bucket/{bucket_name}/lifecycle

Path parameters

storage_idinteger required

Unique identifier for the storage instance

bucket_namestring required

Name of the S3 bucket to configure lifecycle policy for

Request body

expiration_daysinteger

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 request

{
  "expiration_days": 30
}

Response

A SuccessResponse is a response that shows that operations was completed successfully