turbot/alicloud_insights

Query: ecs_launch_templates_for_ecs_snapshot

Usage

powerpipe query alicloud_insights.query.ecs_launch_templates_for_ecs_snapshot

SQL

select
launch_template_id as launch_template_id
from
alicloud_ecs_snapshot as s,
alicloud_ecs_launch_template,
jsonb_array_elements(
latest_version_details -> 'LaunchTemplateData' -> 'DataDisks' -> 'DataDisk'
) as disk_config
where
s.arn = $1
and disk_config ->> 'SnapshotId' is not null
and disk_config ->> 'SnapshotId' = s.snapshot_id;