Microsoft Azure Keyvault Management Client Library for Python. It provides an interface to manage Azure Key Vault resources, such as creating, deleting, and updating vaults, and configuring access policies. Current version is 14.0.1. Releases follow the Azure SDK for Python's frequent cadence, often coinciding with new API versions or bug fixes.
pip install azure-mgmt-keyvault azure-identityVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to authenticate using `DefaultAzureCredential` and list all Key Vaults within a specified Azure subscription using `KeyVaultManagementClient`. It assumes `AZURE_SUBSCRIPTION_ID` is set as an environment variable and appropriate permissions are granted.
Remove explicit `api_version` keyword arguments from client method calls. If using older API versions explicitly, adjust model imports from `azure.mgmt.keyvault.vYYYY_MM_DD.models` to the new default `azure.mgmt.keyvault.models` or ensure you're using the correct namespace.
Always distinguish between management plane (managing the vault itself) and data plane (managing content within the vault). Choose the appropriate library based on your task.
For local development, ensure `AZURE_TENANT_ID`, `AZURE_CLIENT_ID`, `AZURE_CLIENT_SECRET` (for service principal) or `AZURE_USERNAME`, `AZURE_PASSWORD` (for interactive login) are set, or ensure you are logged in via `az login` (Azure CLI). Always verify the `AZURE_SUBSCRIPTION_ID` environment variable is correctly set.