Versions Compared

Key

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

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

Code Block
languagebash
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 so it is not required to make which does not require any changes.

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

...

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, apply implicitly applying to all content in the bucket by;

  • Naming the single policy

  • Not declaring it enabled (as it is by default enabled)

  • Relying on a missing prefix

The preserve query argument on the COPY operations indicates leaving other persisted headers as they arewith no change.

Important

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

  • Currently, Swarm only supports expiration policies.

SeeS3 lifecycle policy examples.