turbot/aws_insights

Query: iam_role_direct_attached_policy_count_for_role

Usage

powerpipe query aws_insights.query.iam_role_direct_attached_policy_count_for_role

Steampipe Tables

SQL

select
case
when attached_policy_arns is null then 0
else jsonb_array_length(attached_policy_arns)
end as value,
'Attached Policies' as label,
case
when attached_policy_arns is null
or jsonb_array_length(attached_policy_arns) = 0 then 'alert'
else 'ok'
end as type
from
aws_iam_role
where
arn = $1

Dashboards

The query is used in the dashboards: