Table: azure_maintenance_configuration - Query Azure Maintenance Configurations using SQL
Azure Maintenance Configurations provide a mechanism to manage and control maintenance operations for Azure resources. These configurations offer insights into the scheduled maintenance windows, allowing for better planning and minimal disruption to services.
Table Usage Guide
The azure_maintenance_configuration
table allows system administrators, DevOps engineers, and Azure resource managers to delve into maintenance configurations within their Azure environments. It offers a detailed view of maintenance schedules, scope, and metadata associated with each configuration. This table can be particularly useful for planning maintenance windows and understanding the impact on resources.
Examples
Basic info
Retrieve essential information about maintenance configurations, including IDs, names, and the scope of maintenance. This query is useful for getting an overview of maintenance activities and their reach within your Azure environment.
select id, name, created_at, created_by, created_by_type, last_modified_at, last_modified_by, last_modified_by_type, visibilityfrom azure_maintenance_configuration;
select id, name, created_at, created_by, created_by_type, last_modified_at, last_modified_by, last_modified_by_type, visibilityfrom azure_maintenance_configuration;
List configurations that are publicly visible
Understanding which maintenance configurations are public can help in assessing security and compliance postures. Organizations often need to ensure that only the appropriate configurations are public to prevent unintentional exposure of sensitive operational details.
select id, name, created_at, created_by, created_by_type, visibilityfrom azure_maintenance_configurationwhere visibility = 'VisibilityPublic';
select id, name, created_at, created_by, created_by_type, visibilityfrom azure_maintenance_configurationwhere visibility = 'VisibilityPublic';
Maintenance window specifics
Understand specific maintenance windows, including their schedules and any custom properties defined. This query helps in precise planning and adjustments to minimize impact.
select name, window ->> 'StartDateTime' as start_date_time, window ->> 'ExpirationDateTime' as expiration_date_time, window ->> 'Duration' as duration, window ->> 'TimeZone' as time_zone, window ->> 'RecurEvery' as recur_everyfrom azure_maintenance_configuration;
select name, json_extract(window, '$.StartDateTime') as start_date_time, json_extract(window, '$.ExpirationDateTime') as expiration_date_time, json_extract(window, '$.Duration') as duration, json_extract(window, '$.TimeZone') as time_zone, json_extract(window, '$.RecurEvery') as recur_everyfrom azure_maintenance_configuration;
Schema for azure_maintenance_configuration
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
akas | jsonb | Array of globally unique identifier strings (also known as) for the resource. | |
cloud_environment | text | The Azure Cloud Environment. | |
created_at | timestamp with time zone | The timestamp of resource creation (UTC). | |
created_by | text | The identity that created the resource. | |
created_by_type | text | The type of identity that created the resource. Possible values include: 'CreatedByTypeUser', 'CreatedByTypeApplication', 'CreatedByTypeManagedIdentity', 'CreatedByTypeKey'. | |
extension_properties | jsonb | Gets or sets extensionProperties of the maintenanceConfiguration. | |
id | text | Fully qualified identifier of the resource. | |
last_modified_at | timestamp with time zone | The timestamp of resource last modification (UTC). | |
last_modified_by | text | The identity that last modified the resource. | |
last_modified_by_type | text | The type of identity that last modified the resource. Possible values include: 'CreatedByTypeUser', 'CreatedByTypeApplication', 'CreatedByTypeManagedIdentity', 'CreatedByTypeKey'. | |
maintenance_scope | text | The maintenanceScope of the configuration. Possible values include: 'ScopeHost', 'ScopeOSImage', 'ScopeExtension', 'ScopeInGuestPatch', 'ScopeSQLDB', 'ScopeSQLManagedInstance'. | |
name | text | = | Name of the resource. |
namespace | text | Gets or sets namespace of the resource. | |
region | text | The Azure region/location in which the resource is located. | |
resource_group | text | = | The resource group which holds this resource. |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
subscription_id | text | =, !=, ~~, ~~*, !~~, !~~* | The Azure Subscription ID in which the resource is located. |
system_data | jsonb | Azure Resource Manager metadata containing createdBy and modifiedBy information. | |
tags | jsonb | A map of tags for the resource. | |
title | text | Title of the resource. | |
type | text | The type of the resource. | |
visibility | text | The visibility of the configuration. The default value is 'Custom'. Possible values include: 'VisibilityCustom', 'VisibilityPublic'. | |
window | jsonb | Definition of a MaintenanceWindow. |
Export
This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.
You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh
script:
/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- azure
You can pass the configuration to the command with the --config
argument:
steampipe_export_azure --config '<your_config>' azure_maintenance_configuration