/
Lifecycle Policy Usage and Examples

Lifecycle Policy Usage and Examples

A user must enable lifecycle policies at the cluster setting level. Use the management API when enabled:

curl -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' -d '{}' \ 'http://lucky1.tx.caringo.com:91/api/storage/clusters/_self/settings/policy.lifecycle?value=enabled' \ -u admin:ourpwdofchoicehere

Info

A missing Policy-Lifecycle header on the domain is considered a tacit enablement that does not require any changes.

A bucket contains one or multiple lifecycle policies, such as:

  • Expire all versioned content after one year.

  • Expire all current content after 5 years, etc.

Such policies are applied on a bucket object using one or multiple Policy-Lifecycle headers:

curl -X COPY --post301 --location-trusted \ -H 'Policy-Lifecycle: RuleId:"rule5" ExpirationDays:1825 ObsoleteExpirationDays:365' \ 'http://lucky1.tx.caringo.com/mybucket?domain=mydomain&preserve'

In the previous example, apply implicitly to all content in the bucket by:

  • Naming the single policy

  • Not declaring it enabled (default enabled)

  • Relying on a missing prefix

The preserve query argument on the COPY operations indicates leaving other persisted headers unchanged.

Important

  • Re-transmit all Policy-Lifecycle headers to appear on the new object. It is advised to use the Content UI for editing policy rules.

  • Swarm supports expiration policies currently.

See https://docs.aws.amazon.com/AmazonS3/latest/userguide/lifecycle-configuration-examples.html.

 

Related content

Policy Specification
Policy Specification
More like this
Bucket Lifecycle Policy
Bucket Lifecycle Policy
More like this
Policy Document
Policy Document
Read with this
Swarm Storage Policies
Swarm Storage Policies
More like this
Gateway Configuration
Gateway Configuration
Read with this
Evaluation
More like this

© DataCore Software Corporation. · https://www.datacore.com · All rights reserved.