turbot/alicloud_insights

Query: ram_policies_for_ram_user

Usage

powerpipe query alicloud_insights.query.ram_policies_for_ram_user

SQL

select
p.policy_name
from
alicloud_ram_user as u,
alicloud_ram_policy as p,
jsonb_array_elements(u.attached_policy) as policy
where
u.arn = $1
and u.account_id = p.account_id
and policy ->> 'PolicyName' = p.policy_name;