Lifecycle Configuration Elements
The following uses an example to describe the elements of a lifecycle rule.
Elements of a lifecycle rule
A complete lifecycle rule consists of a range of elements that fall into metadata, filters, and actions (execution time included).
Metadata
Rule metadata describes the rule ID and rule status.
Element |
Description |
|
---|---|---|
Metadata |
ID |
Definition: Rule ID, which uniquely identifies a rule. Value range: The value is a string ranging from 0 (exclusive) to 255 characters. It can contain only uppercase or lowercase letters, digits, periods (.), underscores (_), and hyphens (-). Default value: If the ID element is not used or is left blank, OBS automatically assigns a unique ID to the rule. |
Status |
Definition: It indicates whether the rule is enabled or disabled. If the rule is disabled, OBS does not perform any actions defined in the rule. Value range:
Default value: N/A |
Filters
The object filter criteria of a rule describe the objects to which a lifecycle rule is applied.
Element |
Description |
|
---|---|---|
Filter |
Prefix |
Definition: Object name prefix, which identifies the objects to which the lifecycle rule applies If you leave the Prefix element blank, the rule applies to all objects in the bucket. Value range: The value is a string ranging from 0 (exclusive) to 1024 characters. Default value: If this element is not specified, it is left blank by default. |
Actions
The following table describes actions that will be performed on objects and when the actions will be performed.
Element |
Description |
Sub-elements |
Description |
---|---|---|---|
Expiration |
Used to delete objects
NOTE:
The Expiration action does not delete unassembled multipart uploads. |
Days (Use only one of the Days, Date, and ExpiredObjectDeleteMarker elements.) |
Definition: The number of days since the last object update, after which eligible objects will be expired and then deleted Constraints:
Value range: A positive integer, in days Default value: N/A |
Date (Use only one of the Days, Date, and ExpiredObjectDeleteMarker elements.) |
Definition: The date, before which objects were last modified will be expired and then deleted Constraints:
Default value: N/A |
||
Used to remove expired delete markers |
ExpiredObjectDeleteMarker (Use only one of the Days, Date, and ExpiredObjectDeleteMarker elements.) |
Definition: Whether to remove expired delete markers Value range:
Default value: N/A |
|
Transition |
Used to transition objects between storage classes |
Days (Use either Days or Date.) |
Definition: The number of days since the last object update, after which eligible objects will be transitioned to another storage class Constraints: Days applies only to the current version of an object. Value range: Unit: day
Default value: N/A |
Date (Use either Days or Date.) |
Definition: The date, before which objects were last modified will be transitioned to another storage class Constraints:
Default value: N/A |
||
StorageClass |
Definition: New storage class eligible objects will be transitioned to Value range:
Default value: N/A |
||
AbortIncompleteMultipartUpload |
Used to delete fragments |
DaysAfterInitiation |
Definition: The number of days since fragment generation, after which fragments will be expired and then deleted Value range: A positive integer, in days Default value: N/A |
NoncurrentVersionExpiration |
Used to delete historical object versions |
NoncurrentDays |
Definition: The number of days since the objects became noncurrent, after which noncurrent object versions will be deleted Constraints:
Value range: A positive integer, in days Default value: N/A |
NoncurrentVersionTransition |
Used to transition noncurrent versions |
NoncurrentDays |
Definition: The number of days since the objects became noncurrent, after which noncurrent object versions will be transitioned to another storage class Constraints:
Value range: Unit: day
Default value: N/A |
StorageClass |
Definition: New storage class eligible historical object versions will be transitioned to Value range:
Default value: N/A |
In the same lifecycle rule, Days or Date must be consistently used. If you use Days for Expiration, you must also use Days (rather than Date) for Transition, and vice versa.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot