Loading controls...
Control: OSS buckets should have lifecycle policies
Description
Buckets should have a lifecycle policy associated for data retention.
Usage
Run the control in your terminal:
steampipe check alicloud_thrifty.control.oss_bucket_without_lifecycle_policy
Snapshot and share results via Steampipe Cloud:
steampipe loginsteampipe check --share alicloud_thrifty.control.oss_bucket_without_lifecycle_policy
Plugins & Tables
SQL
select arn as resource, case when lifecycle_rules is null then 'alarm' when lifecycle_rules @> '[{"Status":"Enabled"}]' then 'ok' else 'alarm' end as status, case when lifecycle_rules is null then title || ' has no lifecycle policy.' when lifecycle_rules @> '[{"Status":"Enabled"}]' then title || ' has lifecycle policy.' else title || ' has disabled lifecycle policy.' end as reason, region, account_idfrom alicloud_oss_bucket;