vserver object-store-server bucket lifecycle-management-rule create
Create a lifecycle management rule
Availability: This command is available to cluster and Vserver administrators at the admin privilege level.
Description
The vserver object-store-server bucket lifecycle-management-rule create command creates a lifecycle management rule for the object store server bucket.
Parameters
-vserver <Vserver Name>- Vserver Name- 
This parameter specifies the name of the Vserver on which the bucket lifecycle management rule needs to be created for the object store server bucket.
 -bucket <TextNoCase>- Object Store Server Bucket Name- 
This parameter specifies the name of the object store server bucket for which the lifecycle management rule needs to be created. The object store server bucket must already exist.
 -rule-id <text>- Lifecycle Management Rule Identifier- 
This parameter specifies the rule identifier of the lifecycle management rule to be applied on the object store server bucket.
 [-index <integer>]- Lifecycle Management Rule Index- 
This parameter specifies the index of the lifecycle management rule to be applied on the object store server bucket.
 [-is-enabled {true|false}]- Is This Rule Enabled?- 
This parameter specifies whether the configured lifecycle management rule is enabled or disabled on the object store server bucket. If you do not specify this parameter, the default is
true. [-prefix <text>]- Prefix to be Matched with Object Names- 
Use this parameter to specify a prefix that is matched against object-names within a bucket.
 [-tags <text>,…]- Tags in Format <tag> or <tag=value>- 
Use this parameter to specify a list of key-value paired tags.
 [-obj-size-greater-than {<integer>[KB|MB|GB|TB|PB]}]- Min Size of the Object- 
Use this parameter to specify the minimum size of the object for which the corresponding lifecycle rule is to be applied.
 [-obj-size-less-than {<integer>[KB|MB|GB|TB|PB]}]- Max Size of the Object- 
Use this parameter to specify the maximum size of the object for which the corresponding lifecycle rule is to be applied.
 -action {Expiration|NoncurrentVersionExpiration|AbortIncompleteMultipartUpload}- Lifecycle Management Action- 
Use this parameter to specify lifecycle management actions. The set of actions that the object store server supports are
Expiration,NoncurrentVersionExpirationandAbortIncompleteMultipartUpload. - { 
[-obj-age-days <integer>]- Number of Days since Creation, After Which Current Version of Objects Can be Deleted - 
Minimum lifetime in number of days since creation, after which objects can be deleted. This parameter is available for expiration actions only.
 [-obj-exp-date <MM/DD/YYYY HH:MM:SS>]- Specific Date When the Objects Should Expire- 
Expiration date of an object. This parameter is available for expiration actions only.
 [-expired-obj-del-marker {true|false}]- Cleanup Object Delete Markers- 
When set to
true, an object with a delete marker will be deleted. This parameter is available for expiration actions only. - | 
[-new-non-curr-versions <integer>]- Number of Latest Non-current Versions to Be Retained - 
This parameter specifies the number of latest non-current versions to be retained. This parameter is available for non-current version expiration actions only.
 [-non-curr-days <integer>]- Number of Days after Which Non-current Versions will Be Deleted- 
This parameter specifies the number of days after which non-current versions can be deleted. This parameter is available for non-current version expiration actions only.
 - | 
[-after-initiation-days <integer>]- Number of Days of Initiation, After Which Upload Can Be Aborted } - 
This parameter specifies the number of days of initiation, after which uploads can be aborted. This parameter is required for abort-incomplete multipart upload actions only.
 
Examples
The following example creates an object store server bucket lifecycle management rule for Vserver vs1 and bucket1 which specifies an expiration action on a set of objects.
cluster1::> vserver object-store-server bucket lifecycle-management-rule create -vserver vs1 -bucket bucket1 -rule-id rule1 -prefix obj1/ -action Expiration -obj-age-days 100"