Section | Parameter | Description |
Basic Settings | Status | Specify the status of the lifecycle rule. You can select Start or Disabled. After a lifecycle rule is enabled, the storage class of objects is converted or objects are deleted based on the lifecycle rule. After you disable a lifecycle rule, the lifecycle tasks of the lifecycle rule are interrupted.
|
Applied To | Specify the objects for which you want the lifecycle rule to take effect. You can select Object Prefix or Whole Bucket. Note If you select Objects with Specified Prefix, you must specify a full prefix. For example, if you want to apply the lifecycle rule to objects whose names contain the src/dir1 prefix, enter src/dir1. If you enter only dir1, the lifecycle rule does not produce the effect that you want. |
Allow Overlapped Prefixes | Specify whether to allow prefixes that overlap. By default, OSS checks whether the prefixes of each lifecycle rule overlap. For example, if the bucket has an existing lifecycle rule (Rule 1) and you want to configure another lifecycle rule (Rule 2) that contains an overlapping prefix: Rule 1 Delete all objects whose names contain the dir1/ prefix in the bucket 180 days after the objects are last modified. Rule 2 Convert the storage class of all objects whose names contain the dir1/dir2/ prefix in the bucket to IA 30 days after the objects are last modified and delete the objects 60 days after they are last modified.
If you do not select this check box, OSS detects that objects in the dir1/dir2/ directory match two lifecycle rules, rejects the creation of Rule 2, and returns the Overlap for same action type Expiration. error message. If you select this check box, Rule 2 is created to convert the storage class of the objects in the dir1/dir2/ directory to IA 30 days after the objects are last modified and delete them 60 days after they are last modified. Other objects in the dir1/ directory are deleted 180 days after the objects are last modified. Note If a bucket has multiple lifecycle rules, one of which applies to the whole bucket, the lifecycle rules have overlapping prefixes. |
Prefix | Specify the prefix in the names of objects for which you want the lifecycle rule to take effect. If you set the prefix to img, all objects whose names contain the img prefix, such as imgtest.png and img/example.jpg, match the lifecycle rule. If you set the prefix to img/, all objects whose names contain the img/ prefix, such as img/example.jpg and img/test.jpg, match the lifecycle rule.
|
Tag | Specify tags. The rule takes effect only for objects that have the specified tags. For example, if you specify a tag in a lifecycle rule and does not specify a prefix in the lifecycle rule, the lifecycle rule applies to all objects who have the tag in the bucket. If you specify the a=1 tag and the img prefix in a lifecycle rule, the lifecycle rule applies to all objects that have the img prefix in their object names and have the a=1 tag in the bucket.
For more information, see Add tags to an object. |
NOT | Specify that the lifecycle rule does not take effect for the objects that have the specified name prefix and tag. Important If you turn on NOT, at least one of the Prefix and Tag parameters must be specified for the lifecycle rule. The key of the tag specified for the NOT parameter cannot be the same as the key specified for the Tag parameter. If you turn on NOT, you cannot include a part policy in the lifecycle rule.
|
Object Size | Specify the size of objects for which the lifecycle rule takes effect. Minimum Size: Specify that the lifecycle rule takes effect only for objects whose sizes are greater than the specified size. You can specify a minimum object size that is greater than 0 B and less than 5 TB. Maximum Size: Specify that the lifecycle rule takes effect only for objects whose sizes are smaller than the specified size. You can specify a maximum object size that is greater than 0 B and less than or equal to 5 TB.
Important If you specify a minimum object size and a maximum object size in the same lifecycle rule, take note of the following items: The maximum object size must be greater than the minimum object size. You cannot include a part policy in the lifecycle rule. You cannot include a policy to remove delete markers.
|
Policy for Objects | Object Lifecycle | Specify an object expiration policy. You can select Validity Period (Days), Expiration Date, or Disabled. If you select Disabled, no object expiration policy is configured. |
Lifecycle-based Rules | Configure the lifecycle rule to convert the storage class of objects or delete expired objects. You can select IA, Archive, Cold Archive, Deep Cold Archive, or Delete Objects. For example, you select Expiration Date for Object Lifecycle, specify September 24, 2023 as the expiration date, and specify Delete Objects (Cannot Be Recovered). In this case, objects that are last modified before September 24, 2023 are automatically deleted and cannot be recovered. |
Policy for Parts | Part Lifecycle | Specify a part policy. If you configure the Tag parameter, this parameter is unavailable. You can select Validity Period (Days), Expiration Date, or Disabled. If you select Disabled, no part policy is configured. Important A lifecycle rule must contain at least one of the object expiration policies and part expiration policies. |
Rules for Parts | Specify when parts expire. You can specify a validity period or expiration date. Expired parts are automatically deleted and cannot be recovered. |