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 | ||
---|---|---|
| ||
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 |
---|
Do not make any changes because a A missing |
A bucket has some may have one or multiple lifecycle policies, such as:
...
Such policies are applied on a bucket object via using one or more multiple Policy-Lifecycle
headers:
Code Block | ||
---|---|---|
| ||
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 implicitly applying to all content in the bucket by;
Naming the single policy
...
Not declaring it enabled (as it is by default)
...
Relying on a missing prefix
...
The preserve query argument on the COPY operations means to leave the indicates leaving other persisted headers as they wereit is.