vw_managed_instance_long_term_retention_policies
Creates, updates, deletes, gets or lists a vw_managed_instance_long_term_retention_policies
resource.
Overview
Name | vw_managed_instance_long_term_retention_policies |
Type | View |
Id | azure.sql.vw_managed_instance_long_term_retention_policies |
Fields
See the SQL Definition (view DDL) for fields returned by this view.
SQL Definition
- Sqlite3
- Postgres
SELECT
JSON_EXTRACT(properties, '$.weeklyRetention') as "weekly_retention",
JSON_EXTRACT(properties, '$.monthlyRetention') as "monthly_retention",
JSON_EXTRACT(properties, '$.yearlyRetention') as "yearly_retention",
JSON_EXTRACT(properties, '$.weekOfYear') as "week_of_year",
subscriptionId,
resourceGroupName,
managedInstanceName,
databaseName,
policyName
FROM azure.sql.managed_instance_long_term_retention_policies
WHERE subscriptionId = 'replace-me' AND resourceGroupName = 'replace-me' AND managedInstanceName = 'replace-me' AND databaseName = 'replace-me';
SELECT
json_extract_path_text(properties, '$.weeklyRetention') as "weekly_retention",
json_extract_path_text(properties, '$.monthlyRetention') as "monthly_retention",
json_extract_path_text(properties, '$.yearlyRetention') as "yearly_retention",
json_extract_path_text(properties, '$.weekOfYear') as "week_of_year",
subscriptionId,
resourceGroupName,
managedInstanceName,
databaseName,
policyName
FROM azure.sql.managed_instance_long_term_retention_policies
WHERE subscriptionId = 'replace-me' AND resourceGroupName = 'replace-me' AND managedInstanceName = 'replace-me' AND databaseName = 'replace-me';