turbot/steampipe-mod-alicloud-compliance

Query: log_store_retention_period_365_days

Usage

powerpipe query alicloud_compliance.query.log_store_retention_period_365_days

Steampipe Tables

SQL

select
'acs:sls:' || region || ':' || project || ':logstore/' || name as resource,
case
when ttl = -1 then 'ok'
when ttl >= 365 then 'ok'
else 'alarm'
end as status,
case
when ttl = -1 then title || ' has permanent storage enabled.'
when ttl is null then title || ' data retention period not configured.'
when ttl >= 365 then title || ' data retention period set to ' || ttl || ' days.'
else title || ' data retention period set to ' || coalesce(ttl::text, 'unknown') || ' days, which is less than the recommended 365 days.'
end as reason
, account_id as account_id, region as region
from
alicloud_log_store;

Controls

The query is being used by the following controls: