Object Storage
Set lifecycle rules
put
/object-storage/buckets/{bucket_uuid}/lifecycleReplace every lifecycle rule of the bucket: delete objects some days after they are written or on a date, delete old versions, clean up delete markers and abort incomplete multipart uploads. Expired objects are deleted permanently in the background, usually within 48 hours of the due date.
Autorización
Authorization
Authorization*string
Bearer YOUR_API_TOKEN con un token de API. También vale la cabecera X-API-Key: YOUR_API_TOKEN.
Parámetros de ruta
bucket_uuid*string
Cuerpo de la petición
Replace every lifecycle rule of the bucket (DELETE removes them all).
application/jsonObligatorio
rules*array<ObjectStorageLifecycleRule>
Rango
items ≤ 1000Propiedades (8)
id*string
Rango
length ≤ 255enabled?boolean
Por defecto
truefilter?ObjectStorageLifecycleFilter | null
Propiedades (4)
prefix?string | null
Rango
length ≤ 4096tags?array<ObjectStorageLifecycleTag> | null
Rango
items ≤ 50Propiedades (2)
key*string
Rango
length ≤ 512value*string
Rango
length ≤ 512object_size_greater_than?integer | null
object_size_less_than?integer | null
expiration?ObjectStorageLifecycleExpiration | null
Propiedades (3)
days?integer | null
Days after the object was written
date?string | null
YYYY-MM-DD (midnight UTC), after today
expired_object_delete_marker?boolean | null
Remove delete markers left without any version (versioned buckets)
noncurrent_version_expiration?ObjectStorageLifecycleNoncurrent | null
Propiedades (2)
noncurrent_days*integer
Days after a version stopped being the current one
newer_noncurrent_versions?integer | null
Keep this many newer versions
abort_incomplete_multipart_upload?ObjectStorageLifecycleAbort | null
Propiedades (1)
days_after_initiation*integer
transitions?any
Not supported
noncurrent_version_transitions?any
Not supported
Respuestas
Successful Response
application/json
detail*string
generation?integer | null
notes?array<string>