...
Cluster setting
Policy header on domain objects (optional)
Policy headers on bucket objects
Cluster Setting Values
The Swarm cluster setting policy.lifecycle
supports two values:
...
Use Management API for policy.lifecycle
setting.
Policy Header Values
Domain objects support a Policy-Lifecycle
header to control the behavior of lifecycle policies for buckets in the domain. The header supports either of the following values:
...
Important
Duplicate names are not allowed across lifecycle rules for a bucket.
Unsupported names or values return an 400 error on the bucket (or domain) write. The 400 response indicates the source of the problem.
Supported Rule Attributes
Attribute | Value | Definition | ||
---|---|---|---|---|
RuleId | <unique rule id> | A required, user-defined ID of the rule. The value is contained within quotes and must be URL-encoded. | ||
Enabled | <true|false> | An optional indication to verify if the rule is enabled. The absence of this attribute indicates the rule enabled. | ||
NamePrefix | <prefix> | An optional prefix to match against the relative name of the object in question.
| ||
ExpirationDays | <nonnegative integer> | The current version of an object is expired after the defined number of days. | ||
ExpirationDate | <ISO 8601 date> | The current version of an object is expired after the defined date (midnight UTC time). | ||
ObsoleteExpirationDays | <nonnegative integer> | A non-current version of an object is expired after the defined number of days when the object becomes non-current.
| ||
ObsoleteExpirationDate | <ISO 8601 date> | A non-current version of the object is expired after the defined date (midnight UTC time).
|
Rules with Attributes
Every rule:
Must have one or multiple expiration attributes.
ExpirationDays and ExpirationDate attributes are mutually exclusive.
ObsoleteExpirationDays and ObsoleteExprirationDate attributes are mutually exclusive.
Expiration Time Rule
For expiration days,
Expiration time = Creation time of the current version + Number of days indicated + Rounded up to the next midnight UTCFor obsolete expiration days,
Expiration time = Create time of the next newest object version + Number of days indicated + Rounded up to the next midnight UTCISO 8601 dates must unambiguously specify a calendar date. The (unspecified) expiration time is always midnight UTC of that date; any timezone specification is not allowed.
Expiration of a current version of an object (i.e. non-delete marker in the versioning enabled bucket) represents creating a delete marker, pushing the current version down the versioning stack.
In all other cases, the object or object version is permanently deleted.
...