Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

At the cluster setting level, a user must enable lifecycle policies. As it is enabled in the cluster, so use the management API:

...

Code Block
languagebash
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, we’re not naming the single policy, we are not declaring it enabled (as it is by default), and we are relying on a missing prefix to implicitly apply to all content in the bucket. The preserve query argument on the COPY operations means to leave the other persisted headers as they were.

SeeS3 lifecycle policy examples.