turbot/alicloud_insights

Query: vpc_empty_status

Usage

powerpipe query alicloud_insights.query.vpc_empty_status

SQL

with by_empty as (
select
distinct vpc.vpc_id,
case
when s.vswitch_id is null then 'empty'
else 'non-empty'
end as status
from
alicloud_vpc as vpc
left join alicloud_vpc_vswitch as s on vpc.vpc_id = s.vpc_id
)
select
status,
count(*)
from
by_empty
group by
status;

Dashboards

The query is used in the dashboards: