lifecyclerule modify

Prev Next

This command modifies a lifecycle rule.

Usage

lifecyclerule modify --name NAME
                    [--enable|--disable]
                    [--prefix PREFIX]   
                    [--min-size SIZE]
                    [--max-size SIZE]
                    [--expiration-days DAYS]
                    [--enable-expired-obj-delete-marker|--disable-expired-obj-delete-marker]
                    [--noncurrent-days DAYS]
                    [--newer-noncurrent-versions VERSIONS]
                    [--abort-mpu-days-after-initiation DAYS]
                    [--object-age-attr MODIFICATION_TIME|ACCESS_TIME|CREATION_TIME]
                    [--tags TAGS]

Required Parameters

--name NAME

Identifies a rule to modify.

Options

--enable

Enables the rule.

--disable

Disables the rule.

--prefix PREFIX

Specifies a prefix common to limit the object scope by object prefix.

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 specify salessales/. This prefix will exclude the directory itself from the scope. If you were to specify sales that would include the directory as well as all the files under the directory. If you were to specify sales/j that would include all files under the directory with names that begin with 'j'.

For example: --prefix logs/

--min-size SIZE

Specifies a minimum element size to limit the scope by size.

Specify SIZE as an integer followed by MB, GB, TB, etc.

For example: --min-size 2GB

--max-size SIZE

Specifies a maximum element size to limit the scope by size.

Specify SIZE as an integer followed by MB, GB, TB, etc.

For example: --max-size 1TB

--expiration-days DAYS

Specifies a number of days after elements are created that they expire.

In a view that does not have a versioned S3 bucket, expiration means that the element is permanently removed.

In a versioned S3 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.

--enable-expired-obj-delete-marker

Relevant only for versioned S3 buckets.

Enables deletion of expired object delete markers when 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 parameter is mutually exclusive with --expiration-days DAYS, which deletes expired object delete markers when they satisfy the specified age criteria. If you want to expire objects using --expiration-days DAYS and also clean up expired object delete markers as soon as they are created as such, create two separate rules.

--disable-expired-obj-delete-marker

Relevant only for versioned S3 buckets.

Disables deletion of expired object delete markers when they become expired object delete markers.

--noncurrent-days DAYS

Relevant only for versioned S3 buckets. If provided, noncurrent versions of objects are deleted after the specified number of days, provided they are not the newest noncurrent versions up to the number set to be retained, if that number is provided with --newer-noncurrent-versions VERSIONS.

--newer-noncurrent-versions VERSIONS

Relevant only for versioned S3 buckets. Use this parameter to specify a number of noncurrent versions of objects to retain. The newest non current versions up to this number will not expire even if they exceed --noncurrent-days .

--abort-mpu-days-after-initiation DAYS

Specifies to remove incomplete S3 multipart uploads, which are not removed through --expiration-days. The value is the number of days after multipart uploads are started when they should be aborted and removed if they are incomplete.

--object-age-attr MODIFICATION_TIME|ACCESS_TIME|CREATION_TIME

Determines which timestamp to use as the time from which to count expiration days, if --expiration-days is set.  

Possible values:

  • MODIFICATION_TIME (default). The time the element was last modified.

  • ACCESS_TIME. The time the element content was last accessed.

  • CREATION_TIME. The time the element was created (or if different, the time the elemen's metadata was last modified.)

--tags TAGS

Notice

This feature is introduced in VAST Cluster 5.3.4.

Refines the rule's object scope using object tags. You can specify up to 40 tags, each with a unique key. For any object to be included in the scope of objects that is expired by the rule, the object must have all of the specified tags. A tag must have a key and can have a value. It can have an empty value, in which case the object must also have an empty value paired with the same key in a tag.

Specify TAGS as a comma separated list of key-value pairs, where each key-value pair is specified as <key>=<value>.

To specify an empty value, specify <key>=.

For example, this expression adds three tags. The third one has only a key ("project") and no value: --tags "owner=John,department=research,project="

Important

If you run the command with this option, the set of tags that you specify overrides the previous set. Therefore, be sure to include any pre-existing tags that you do not want to remove.

If you run the command without this option, any previously existing tags in the rule are unaffected.