Reputation: 11
I had tried to find the remaining time/date of an object and the google cloud bucket from the mentioned below gsutil command but there i can see only Time created and Update time. please click on the below link to see the screen shot.
[root@INPUNPCLX323410 ~]# gsutil ls -l -L -b gs://lokestar-us-central1/creating-pod.yaml
gs://lokestar-us-central1/creating-pod.yaml:
Creation time: Sun, 25 Nov 2018 08:08:02 GMT
Update time: Sun, 25 Nov 2018 08:08:02 GMT
Storage class: REGIONAL
Content-Length: 167
Content-Type: application/octet-stream
Hash (crc32c): KXa/hg==
Hash (md5): 0aZAtaws0WX4EEHtBN8pAQ==
ETag: CI+ysrmL794CEAE=
Generation: 1543133282998543
Metageneration: 1
ACL: [
Upvotes: 0
Views: 1364
Reputation: 1554
You only can assign a lifecycle management configuration to a entire bucket, not objects. The configuration contains a set of rules which apply to current and future objects in the bucket. So, in order to get the lifecycle of all the objects inside your bucket you can run this command:
gsutil lifecycle get gs://<YOUR_BUCKET>
Upvotes: 1