turbot/azure_insights

Query: sql_database_retention

Usage

powerpipe query azure_insights.query.sql_database_retention

Steampipe Tables

SQL

select
retention_policy_name as "Retention Policy Name",
retention_policy_property ->> 'monthlyRetention' as "Monthly Retention",
retention_policy_property ->> 'weekOfYear' as "Week Of Year",
retention_policy_property ->> 'weeklyRetention' as "Weekly Retention",
retention_policy_property ->> 'Yearly Retention' as "Yearly Retention",
retention_policy_id as "Retention Policy ID"
from
azure_sql_database
where
lower(id) = $1
and subscription_id = split_part($1, '/', 3);

Dashboards

The query is used in the dashboards: