-
On the Lifecycle Rules tab of the Element Store page, click Create Lifecycle Rule.
-
Enter a name for the new rule in the Rule name field.
-
In the Tenant field, enter the tenant for which the rule applies.
-
Enter the name of a view in the View field. Every rule applies within a specified view.
-
Toggle Enabled on or off to specify whether you want this rule to be enabled immediately or at a later time:
-
If set to on, the rule will be effective immediately on all objects that currently meet the scope and age criteria that you defined for object expiration.
-
If set to off, the rule will be created, but not activated. You can enable the rule at a later stage.
-
-
Under Rule scope, use either or both of the following filters to select objects to which the rule apply:
-
In the Prefix filter field, enter a object prefix that is common to all objects for which the rule applies.
Note
In S3 terms, this is a prefix that may be common to multiple object keys (names). Specifying a prefix defines a scope of objects to which the rule applies. For example, if you specify sales/jan, all objects in the view that have object keys that begin with sales/jan will fall into the scope.
In terms of file and directory nomenclature, a prefix is a file and/or directory path within the view that can include part of the file or directory name. It can be common to multiple items in order to catch them all within the scope.
For example, if you want to specify all files under a directory called sales that resides under the view, you can enter sales/. This prefix will exclude the directory itself from the scope. If you were to enter sales that would include the directory as well as all the files under the directory. If you were to enter sales/j that would include all files under the directory with names that begin with 'j'.
-
In the Minimum object size and/or Maximum object size fields, enter a minimum and/or a maximum size of objects to which the rule apply. You can select the size units from the dropdowns provided.
-
-
Under Expire current versions of object, define object expiration conditions:
Days after object creation
Enter a number of days after objects are created that you want them to expire. When the rule is created and enabled, all objects that match the defined scope will be expired when they are this number of days old.
In a non versioned bucket view, expiration means that the object is permanently removed.
In a versioned bucket view, where the objects are versioned:
-
If the current version is not a delete marker, a delete marker is created and that becomes the current version. The existing current version is retained as a non current version. When the delete marker reaches this same number of days, it is deleted.
-
If there are one or more object versions and the delete marker is the current version, no action is taken.
-
If the current object version is the only object version and it is also a delete marker, it is removed. That is, all object versions were deleted and there is only a delete marker remaining. This is called an expired object delete marker and it is removed.
Delete expired object delete markers
Check this box to delete expired object delete markers as soon as they become expired object delete markers. An expired object delete marker is an object version that is the only version of an object and is also a delete marker.
This checkbox is mutually exclusive with Days after object creation, which deletes expired object delete markers when they satisfy the specified age criteria. If you want to expire objects using Days after object creation and also clean up expired object delete markers as soon as they are created as such, create two separate rules.
-
-
Under Delete incomplete multipart uploads, use the Days after the start of upload field to remove incomplete multipart uploads, which are not removed through Days after object creation. Specify the number of days after multipart uploads are started when they should be aborted and removed if they are incomplete.
-
For versioned buckets only:
-
Under Permanently delete noncurrent versions of objects, specify the number of days in the Days from becoming a Previous version field. If set, noncurrent versions of objects are deleted after the specified number of days, provided they are not the newest non-current versions up to the number set to be retained, if that number is set as Number of versions to retain.
-
Under Number of newer versions to retain, optionally specify a number of noncurrent versions of objects to retain in the Number of versions field. The newest non current versions up to this number will not expire even if they exceed Days from becoming a Previous version.
-
-
Click Create.
The rule is created and its properties are displayed in the Lifecycle Rules list.
To create a lifecycle rule, use the lifecyclerule create command.
Comments
0 comments
Article is closed for comments.