mc ilm rule ls
The mc ilm rule ls
command summarizes all configured object lifecycle management rules on an AIStor bucket in a tabular format.
The mc ilm rule list
command has equivalent functionality to mc ilm rule ls
.
Syntax
Parameters
ALIAS
Required
The alias and full path to the bucket on the AIStor deployment for which to list the object lifecycle management rules. For example:
mc ilm rule ls myminio/mydata
--expiry
Optional
mc ilm rule ls
returns only fields related to lifecycle rule expiration.
Mutually exclusive with --transition
.
--transition
Optional
mc ilm rule ls
returns only fields related to lifecycle rule transition.
Mutually exclusive with --expiry
.
Global Flags
This command supports any of the global flags.
Examples
List Bucket Lifecycle Management Rules
Use mc ilm rule ls
to list a bucket’s lifecycle management rules:
mc ilm rule ls ALIAS/PATH
- Replace
ALIAS
with thealias
of the S3-compatible host. - Replace
PATH
with the path to the bucket on the S3-compatible host.
Show Policy Modification Time
Use mc ilm rule ls
with :option::–json <mc.–json> to show the time the policy for a bucket was last updated.
mc ilm rule ls ALIAS/PATH --json
- Replace
ALIAS
with thealias
of the S3-compatible host. - Replace
PATH
with the path to the bucket on the S3-compatible host.
The updateAt
property in the JSON output contains the date and time the policy was updated.
The output resembles the following:
{
"status": "success",
"target": "myminio/mybucket",
"config": {
"Rules": [
{
"Expiration": {
"Days": 30
},
"ID": "ci1o2mg0sko6f1r3krv0",
"Status": "Enabled"
}
]
},
"updatedAt": "2023-06-09T19:45:30Z"
}
Required Permissions
For permissions required to list rules, refer to the required permissions on the parent command.
Behavior
S3 Compatibility
The mc
commandline tool is built for compatibility with the AWS S3 API and is tested with AIStor and AWS S3 for expected functionality and behavior.
AIStor provides no guarantees for other S3-compatible services, As their S3 API implementation is unknown and therefore unsupported.
While mc
commands may work as documented, any such usage is at your own risk.