...
Table of Contents | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
Lifecycle policy specification includes:
Cluster setting
Policy header on domain objects (optional)
Policy headers on bucket objects
Cluster Setting Values
The CAStor Swarm cluster setting policy.lifecycle
supports the following two values:
disabled – The A default value for the evaluation of all lifecycle policies is disabled in the cluster . Generally, the default value disables the feature, giving the legacy behavior, so disabled is the default for the settingto provide legacy behavior.
enabled – Lifecycle policy may be disabled Either enable or disable lifecycle policies at the domain level for domains where such policies should not be are applied.
The Use Management API for policy.lifecycle
setting will be persisted and set-able via the Management API and SNMP just like other policy settings.
...
.
Domain Setting Values
Domain objects supports support a persisted Policy-Lifecycle
header that controls to control the behavior of lifecycle policies for buckets in the domain. The header supports one either of the following values:
<unspecified> – The lack of a defined policy header means represents that lifecycle policies are only enabled for buckets in the domain exactly when the
policy.lifecycle
setting is enabled. Applying lifecycle policy at the domain level is optional.enabled – The lifecycle policies are enabled for buckets in the a domain , but only when the
policy.lifecycle
cluster setting is enabled.disabled – The lifecycle policies are disabled for buckets in the a domain regardless of the
policy.lifecycle
setting. The Policy-Lifecycle value may be prefixed with a <cluster name>=, meaning that the policy only applies within the specified cluster. If this feature is used, multiple values are allowed.
Info |
---|
Domain objects will NOT support policy specification on domains that applies to tenanted content in the domain. |
...
Info |
---|
InfoLifecycle policy is not applied to unnamed content within a domain. Only named objects within buckets contains lifecycle policy applied. |
Bucket Setting Values
Bucket objects support a Policy-Lifecycle
header with multiple values.
Each
...
header value encodes
...
one lifecycle policy
...
rule
...
.
Each lifecycle rule is comprised of a number of optional attributes, expressed as <name>:<value> pairs separated by
...
space. Extra spaces are allowed at the beginning, end, and before &
...
after the colon.
Info |
---|
Important
|
Supported Rule Attributes
The following attributes are supported:
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. Duplicate rule ids (on different Policy-Lifecycle headers) on the same bucket are disallowed. | ||
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). |
|
|
|
Note
Swarm supports the following ISO 8601 date formats:
2024-01-01T00:00:00.000Z
2024-01-01T00:00:00Z
2024-01-01T00:00:00
2024-01-01
Rules with Attributes
Every rule
...
:
Must have one or more multiple expiration -related attributes.
Every rule must have an action.
A rule may not have both ExpirationDays and ExpirationDate attributes are mutually exclusive.A rule may not have both
ObsoleteExpirationDays and ObsoleteExprirationDate attributes are mutually exclusive.
Expiration Time Rule
For expiration days, the expiration time refers to;
Expiration time = Creation time of the current version + Number of days indicated + Rounded up to the next midnight UTC.For obsolete expiration days, the expiration time refers to;
Expiration time = Create time of the next newer object in the versioning chain newest object version + Number of days indicated + Round Rounded up to the next midnight UTC.ISO 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 that is not a (i.e. non-delete marker in a the versioning enabled bucket means to create ) 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.
The Gateway gateway supports normal SCSP reads & writes of domain and bucket headers with those lifecycle policies specified. Additionally, the The Gateway S3 interface is modified to support GET, PUT, DELETE, and related permissions (GetLifecycleConfiguration and PutLifecycleConfiguration) for bucket lifecycle policies as specified defined in the S3 documentation (good to have a link). Gateway will validate such validates policies against the S3 specification. On PUT or DELETE , Gateway will translate permission, the gateway translates the client-supplied bucket policy specifications into the appropriate CAStor Swarm bucket headers. Aspects of the bucket lifecycle policies that are Bucket lifecycle policy features provided using S3 not supported by CAStor will be dropped during this translation, Swarm (such as storage class transitions) are dropped during this translation. On the bucket lifecycle policy GET reply, Gateway will performs reverse translate translation for any (Policy-Lifecycle
) headers on the bucket object for its S3 response.
UIC will provide appropriate editing methods for bucket lifecycle policies at the cluster, domain, and bucket levels.
...
into an S3-compatible format.
Swarm Content Portal provides a convenient method of managing policies. This information is provided for completeness.
Info |
---|
InfoSince lifecycle policies are part of the overall context-level policy framework. , GET and HEAD requests on contexts and name objects (with the verbose query argument) will return |