steampipe plugin install azure

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,
visibility
from
azure_maintenance_configuration;
select
id,
name,
created_at,
created_by,
created_by_type,
last_modified_at,
last_modified_by,
last_modified_by_type,
visibility
from
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,
visibility
from
azure_maintenance_configuration
where
visibility = 'VisibilityPublic';
select
id,
name,
created_at,
created_by,
created_by_type,
visibility
from
azure_maintenance_configuration
where
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_every
from
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_every
from
azure_maintenance_configuration;

Schema for azure_maintenance_configuration

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form.
akasjsonbArray of globally unique identifier strings (also known as) for the resource.
cloud_environmenttextThe Azure Cloud Environment.
created_attimestamp with time zoneThe timestamp of resource creation (UTC).
created_bytextThe identity that created the resource.
created_by_typetextThe type of identity that created the resource. Possible values include: 'CreatedByTypeUser', 'CreatedByTypeApplication', 'CreatedByTypeManagedIdentity', 'CreatedByTypeKey'.
extension_propertiesjsonbGets or sets extensionProperties of the maintenanceConfiguration.
idtextFully qualified identifier of the resource.
last_modified_attimestamp with time zoneThe timestamp of resource last modification (UTC).
last_modified_bytextThe identity that last modified the resource.
last_modified_by_typetextThe type of identity that last modified the resource. Possible values include: 'CreatedByTypeUser', 'CreatedByTypeApplication', 'CreatedByTypeManagedIdentity', 'CreatedByTypeKey'.
maintenance_scopetextThe maintenanceScope of the configuration. Possible values include: 'ScopeHost', 'ScopeOSImage', 'ScopeExtension', 'ScopeInGuestPatch', 'ScopeSQLDB', 'ScopeSQLManagedInstance'.
nametext=Name of the resource.
namespacetextGets or sets namespace of the resource.
regiontextThe Azure region/location in which the resource is located.
resource_grouptext=The resource group which holds this resource.
sp_connection_nametext=, !=, ~~, ~~*, !~~, !~~*Steampipe connection name.
sp_ctxjsonbSteampipe context in JSON form.
subscription_idtext=, !=, ~~, ~~*, !~~, !~~*The Azure Subscription ID in which the resource is located.
system_datajsonbAzure Resource Manager metadata containing createdBy and modifiedBy information.
tagsjsonbA map of tags for the resource.
titletextTitle of the resource.
typetextThe type of the resource.
visibilitytextThe visibility of the configuration. The default value is 'Custom'. Possible values include: 'VisibilityCustom', 'VisibilityPublic'.
windowjsonbDefinition 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