Registry / azure / azure-mgmt-rdbms

azure-mgmt-rdbms

JSON →
library10.1.1pypypi✓ verified 25d ago

The `azure-mgmt-rdbms` library provides Python client APIs for managing Azure Relational Database services (PostgreSQL, MySQL, MariaDB). It allows for programmatic creation, configuration, and deletion of database servers, databases, and related resources. The current version is `10.1.1` and it follows the Azure SDK release cadence, with frequent updates to align with new Azure API features and bug fixes.

pip install azure-mgmt-rdbms azure-identity
INSTALL
IMPORT
SIG · AZURE-MGMT-RDBMS
A
azure-mgmt-rdbms
azurepythonv10.1.1
Install
4.5s avg
Import
576ms
Disk
53MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v10.1.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.604s · 53.4MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 4.5s · import 0.548s · 54MB
53MB installed
● package 53MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

PostgreSQLManagementClient
from azure.mgmt.rdbms.postgresql import PostgreSQLManagementClient
from azure.mgmt.rdbms import PostgreSQLManagementClient
The specific RDBMS clients (PostgreSQL, MySQL, MariaDB) reside in their respective sub-packages, not directly under `azure.mgmt.rdbms`.
MySQLManagementClient
from azure.mgmt.rdbms.mysql import MySQLManagementClient
MariaDBManagementClient
from azure.mgmt.rdbms.mariadb import MariaDBManagementClient
DefaultAzureCredential
from azure.identity import DefaultAzureCredential

This quickstart demonstrates how to authenticate with Azure using `DefaultAzureCredential` and then list all Azure PostgreSQL servers within a specified subscription. It requires `AZURE_SUBSCRIPTION_ID` to be set as an environment variable or replaced in the code, and appropriate Azure credentials (e.g., via `az login` or service principal environment variables) for authentication.

import os from azure.identity import DefaultAzureCredential from azure.mgmt.rdbms.postgresql import PostgreSQLManagementClient # Set your Azure Subscription ID and Resource Group name as environment variables # or replace with actual values. Ensure AZURE_TENANT_ID, AZURE_CLIENT_ID, # AZURE_CLIENT_SECRET are also set for service principal authentication, # or be logged in via 'az login' for user authentication. SUBSCRIPTION_ID = os.environ.get('AZURE_SUBSCRIPTION_ID', 'YOUR_SUBSCRIPTION_ID') if SUBSCRIPTION_ID == 'YOUR_SUBSCRIPTION_ID': print("Warning: Please set the AZURE_SUBSCRIPTION_ID environment variable or replace 'YOUR_SUBSCRIPTION_ID'.") exit() def list_postgresql_servers(): try: # Authenticate with Azure credential = DefaultAzureCredential() # Create a PostgreSQL management client pg_client = PostgreSQLManagementClient(credential, SUBSCRIPTION_ID) print(f"Listing PostgreSQL servers in subscription {SUBSCRIPTION_ID}:") for server in pg_client.servers.list(): print(f" - Name: {server.name}, Resource Group: {server.id.split('/resourceGroups/')[1].split('/')[0]}, Location: {server.location}, State: {server.user_visible_state}") except Exception as e: print(f"An error occurred: {e}") if __name__ == "__main__": list_postgresql_servers()
Debug
Known issues
gotchaThe `azure-mgmt-rdbms` package acts as a meta-package. You cannot instantiate a generic `RdbmsManagementClient` directly from `azure.mgmt.rdbms`. Instead, you must import and use specific clients for each RDBMS type (e.g., `PostgreSQLManagementClient`, `MySQLManagementClient`, `MariaDBManagementClient`) from their respective sub-packages (e.g., `azure.mgmt.rdbms.postgresql`).
fix
Always import clients from their specific sub-packages: `from azure.mgmt.rdbms.<rdbms_type> import <RdbmsType>ManagementClient`.
affects: All versions
breakingMajor version updates of `azure-mgmt-rdbms` (e.g., from 9.x to 10.x) typically align with updates to the underlying Azure REST API versions. These updates can introduce breaking changes in client constructors, method signatures, parameter names, or resource model schemas. Always review the official migration guides or changelogs when upgrading to a new major version.
fix
Consult the official Azure SDK for Python documentation and GitHub release notes for migration guidance before upgrading. Test your application thoroughly after an upgrade.
affects: Major version changes (e.g., 9.x to 10.x)
gotchaAuthentication issues are common. `DefaultAzureCredential` relies on a cascade of authentication methods (environment variables, managed identity, Azure CLI, etc.). If not configured correctly, you'll encounter `ClientAuthenticationError` or similar credential errors.
fix
Ensure `AZURE_TENANT_ID`, `AZURE_CLIENT_ID`, `AZURE_CLIENT_SECRET` (for service principal) are correctly set, or that you are logged in via `az login` for developer authentication. Verify your service principal/user has the necessary RBAC permissions on the target Azure resources.
affects: All versions
gotchaOperations with Azure management clients require a subscription ID. If the `AZURE_SUBSCRIPTION_ID` environment variable is not set, or the subscription ID is not explicitly passed during client instantiation (e.g., `RdbmsManagementClient(credential, subscription_id)`), you will encounter errors indicating a missing subscription ID when performing resource management operations.
fix
Ensure the `AZURE_SUBSCRIPTION_ID` environment variable is correctly set, or explicitly pass the subscription ID to the client constructor or relevant method calls.
affects: All versions
gotchaMany Azure SDK for Python management clients require the Azure subscription ID to be provided, either through an environment variable (AZURE_SUBSCRIPTION_ID) or as a parameter to the client constructor or method calls. Failure to provide it will result in warnings or errors indicating a missing subscription ID.
fix
Ensure the AZURE_SUBSCRIPTION_ID environment variable is set or pass the subscription ID directly when instantiating clients or making resource management calls.
affects: All versions
Upgrade
Version history
10.1.1latest on PyPI · released Nov 25, 2025
Audit
Dependencies
azure-identityrequiredRequired for authentication with Azure services. It provides `DefaultAzureCredential` to handle various authentication flows.
Agent activity
20 hits · last 30 days
node
16
OpenAI (training)
1
Resources
azure-mgmt-rdbms — pip install azure-mgmt-rdbms · libregistry