turbot/alicloud_insights

Query: ram_users_for_ram_group

Usage

powerpipe query alicloud_insights.query.ram_users_for_ram_group

SQL

select
u.arn as user_arn
from
alicloud_ram_user as u,
alicloud_ram_group as g,
jsonb_array_elements(users) as member
where
g.arn = $1
and member ->> 'UserName' = u.name
and u.account_id = g.account_id;