$ mc ilm expiry show myminio/bucket
Expiry rules:
ID Prefixes Enabled Days/Date
fgh "" ✓ 10 May 2019
gop "temporary_uploads/" ✓ 7 days
vez "2019-uploads/" ✓ 2021-01-01
ID is a GUID in fact, but mc shows only the shortest possible length, mc will automatically understand it from full GUID really stored in bucket lifecycle configuration.
Notice: show command will also set random GUID for rules which have empty IDs (when lifecycle configuration is stored using other means other than mc, such as aws cli, etc..
$ mc ilm expiry enable myminio/bucket --id fgh
$ mc ilm expiry disable myminio/bucket --id gop
$ mc ilm expiry remove myminio/bucket --id vez
$ mc ilm expiry set --days 7 --prefix "" myminio/bucket
Objects uploaded under `myminio/bucket/` will be automatically deleted after 7 days!
$ mc ilm expiry set --date "oct 7, 2020" --prefix "uploads/" myminio/bucket
All objects under `myminio/bucket/uploads/` will be automatically deleted on 2020-10-07 00:00:00 +0000 MST
Parsing a date, very generic https://github.com/araddon/dateparse