turbot/alicloud_compliance

Query: ram_user_unused_90

Usage

powerpipe query alicloud_compliance.query.ram_user_unused_90

Steampipe Tables

SQL

select
'acs:ram::' || account_id || ':user/' || name as resource,
case
when last_login_date < current_date - interval '90 days' or last_login_date is null then 'alarm'
else 'ok'
end as status,
case
when last_login_date is null then name || ' never logged in.'
else name || ' logged in '|| extract(day from current_date - last_login_date) || ' days ago.'
end as reason
, account_id as account_id
from
alicloud_ram_user;

Controls

The query is being used by the following controls: