Table: azure_postgresql_flexible_server - Query Azure PostgreSQL Flexible Servers using SQL
Azure PostgreSQL Flexible Server is a fully managed relational database service, based on the open-source Postgres database engine. It provides capabilities for intelligent performance, high availability, and dynamic scalability, enabling you to focus on application development and business logic rather than database management tasks. This service helps you to securely manage, monitor, and scale your PostgreSQL databases in the cloud.
Table Usage Guide
The azure_postgresql_flexible_server
table provides insights into the configuration and status of Azure PostgreSQL Flexible Server instances. As a database administrator, you can leverage this table to explore server-specific details, including the server's state, version, location, and more. Utilize it to monitor and manage your PostgreSQL databases in Azure, ensuring optimal performance, security, and compliance.
Examples
Basic info
Uncover the details of your Azure PostgreSQL flexible servers including their names, IDs, and configurations. This information is essential for managing your cloud environment effectively and understanding where your servers are located.
select name, id, cloud_environment, flexible_server_configurations, locationfrom azure_postgresql_flexible_server;
select name, id, cloud_environment, flexible_server_configurations, locationfrom azure_postgresql_flexible_server;
List SKU details of the flexible servers
Identify the specific details of flexible servers, such as their unique identifiers and SKU details. This information can be beneficial in managing resources and understanding the tier level of each server.
select name, id, sku ->> 'name' as sku_name, sku ->> 'tier' as sku_tierfrom azure_postgresql_flexible_server;
select name, id, json_extract(sku, '$.name') as sku_name, json_extract(sku, '$.tier') as sku_tierfrom azure_postgresql_flexible_server;
List flexible servers that have geo-redundant backup enabled
Identify instances where flexible servers have geo-redundant backup enabled to ensure data redundancy and disaster recovery for your Azure PostgreSQL databases.
select name, id, cloud_environment, flexible_server_configurations, server_properties -> 'backup' ->> 'geoRedundantBackup', locationfrom azure_postgresql_flexible_serverwhere server_properties -> 'backup' ->> 'geoRedundantBackup' = 'Enabled';
select name, id, cloud_environment, flexible_server_configurations, json_extract( json_extract(server_properties, '$.backup'), '$.geoRedundantBackup' ) as geoRedundantBackup, locationfrom azure_postgresql_flexible_serverwhere json_extract( json_extract(server_properties, '$.backup'), '$.geoRedundantBackup' ) = 'Enabled';
List flexible servers configured in more than one availability zones
Determine the areas in which flexible servers are configured across multiple availability zones. This is useful for understanding the distribution and redundancy of your servers, which can impact service availability and disaster recovery strategies.
select name, id, cloud_environment, flexible_server_configurations, server_properties ->> 'availabilityZone', locationfrom azure_postgresql_flexible_serverwhere (server_properties ->> 'availabilityZone') :: int > 1;
select name, id, cloud_environment, flexible_server_configurations, json_extract(server_properties, '$.availabilityZone'), locationfrom azure_postgresql_flexible_serverwhere CAST( json_extract(server_properties, '$.availabilityZone') AS INTEGER ) > 1;
Schema for azure_postgresql_flexible_server
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form, e.g. connection_name. | |
akas | jsonb | Array of globally unique identifier strings (also known as) for the resource. | |
cloud_environment | text | The Azure Cloud Environment. | |
flexible_server_configurations | jsonb | The server configurations(parameters) details of the server. | |
id | text | Fully qualified resource ID for the resource. | |
location | text | The geo-location where the resource lives. | |
name | text | = | The name 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. |
server_properties | jsonb | Properties of the server. | |
sku | jsonb | The SKU (pricing tier) of the server. | |
subscription_id | text | The Azure Subscription ID in which the resource is located. | |
tags | jsonb | A map of tags for the resource. | |
title | text | Title of the resource. | |
type | text | The type of the resource. |
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_postgresql_flexible_server