turbot/alicloud_insights

Query: ram_user_manage_policies_hierarchy

Usage

powerpipe query alicloud_insights.query.ram_user_manage_policies_hierarchy

Steampipe Tables

SQL

select
r.name as id,
r.name as title,
'role' as category,
null as from_id
from
alicloud_ram_role as r
where
r.arn = $1
-- Policies (attached to groups)
union select
policy ->> 'PolicyName' as id,
policy ->> 'PolicyName' as title,
'managed_policy' as category,
r.name as from_id
from
alicloud_ram_role as r,
jsonb_array_elements(r.attached_policy) as policy
where
r.arn = $1;

Dashboards

The query is used in the dashboards: