turbot/azure_insights

Query: compute_snapshot_source_details

Usage

powerpipe query azure_insights.query.compute_snapshot_source_details

SQL

-- Compute Disk
select
d.name as "Name",
d.type as "Type",
lower(d.id) as "ID",
'/azure_insights.dashboard.compute_disk_detail?input.disk_id=' || lower(d.id) as link
from
azure_compute_snapshot as s
left join azure_compute_disk as d on lower(d.id) = lower(s.source_resource_id)
where
d.id is not null
and lower(s.id) = $1
and s.subscription_id = split_part($1, '/', 3)
-- Compute Snapshot
union
select
d.name as "Name",
d.type as "Type",
lower(d.id) as "ID",
null as link
from
azure_compute_snapshot as d
left join azure_compute_snapshot as s on lower(d.id) = lower(s.source_resource_id)
where
d.id is not null
and lower(s.id) = $1
and s.subscription_id = split_part($1, '/', 3);

Dashboards

The query is used in the dashboards: