turbot/azure_insights

Query: child_cosmosdb_account_for_cosmosdb_account

Usage

powerpipe query azure_insights.query.child_cosmosdb_account_for_cosmosdb_account

SQL

with child_rda as (
select
lower(ra.id) as id
from
azure_cosmosdb_restorable_database_account ra,
azure_cosmosdb_account a
where
ra.account_name = a.name
and ra.subscription_id = a.subscription_id
and lower(a.id) = $1
)
select
lower(a.id) as account_id
from
azure_cosmosdb_account a,
child_rda ra
where
ra.id = lower(a.restore_parameters ->> 'restoreSource');