puppetlabs-toy-chest / wash

Wide Area SHell: a cloud-native shell for bringing remote infrastructure to your terminal.
https://puppetlabs.github.io/wash
Apache License 2.0
180 stars 29 forks source link

Include bucket size metrics in bucket metadata #622

Closed MikaelSmith closed 4 years ago

MikaelSmith commented 4 years ago

Gets bucket size metrics from CloudWatch (AWS) and Stackdriver (GCP) when requesting bucket metadata.

For example

$ wash -c 'meta aws/eso/resources/s3/my-bucket'
AverageSize: 99954524987
Crtime: "2019-06-21T18:03:13Z"
HumanSize: 100 GB
MaximumSize: 99954524987
MinimumSize: 99954524987
Region: us-west-2
TagSet: null

Resolves #621.

Signed-off-by: Michael Smith michael.smith@puppet.com

MikaelSmith commented 4 years ago

Google Storage has a similar thing in Stack Driver: https://cloud.google.com/storage/docs/getting-bucket-information.