turbot/alicloud_insights

Query: ecs_autoscaling_groups_for_rds_instance

Usage

powerpipe query alicloud_insights.query.ecs_autoscaling_groups_for_rds_instance

SQL

select
asg.scaling_group_id as autoscaling_group_id
from
alicloud_rds_instance as rdi,
alicloud_ecs_autoscaling_group as asg,
jsonb_array_elements_text(asg.db_instance_ids) as id
where
rdi.arn = $1
and rdi.account_id = split_part($1,':',5)
and rdi.region = split_part($1,':',4)
and rdi.db_instance_id = id;