turbot/azure_insights

Query: cosmosdb_mongo_database_collection_details

Usage

powerpipe query azure_insights.query.cosmosdb_mongo_database_collection_details

SQL

select
c.name as "Name",
c.account_name as "Account Name",
c.analytical_storage_ttl as "Analytical Storage TTL",
c.throughput_settings ->> 'Throughput' as "Throughput - (RU/s)",
c.shard_key as "Shard Key",
c.id as "ID"
from
azure_cosmosdb_mongo_database as d
join azure_cosmosdb_mongo_collection as c on d.name = c.database_name
where
lower(d.id) = $1
and d.subscription_id = split_part($1, '/', 3)
and c.account_name in (select account_name from azure_cosmosdb_mongo_database where lower(id) = $1);

Dashboards

The query is used in the dashboards: