turbot/alicloud_insights

Query: ram_groups_for_ram_user

Usage

powerpipe query alicloud_insights.query.ram_groups_for_ram_user

SQL

select
g.arn as group_arn
from
alicloud_ram_user as u,
alicloud_ram_group as g,
jsonb_array_elements(u.groups) as ugrp
where
u.arn = $1
and u.account_id = g.account_id
and g.title = ugrp ->> 'GroupName';