turbot/alicloud_insights

Query: ram_policies_for_ram_group

Usage

powerpipe query alicloud_insights.query.ram_policies_for_ram_group

SQL

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