{"id":1934,"library":"azure-mgmt-redhatopenshift","title":"Azure Red Hat OpenShift Management Client Library for Python","description":"The Microsoft Azure Red Hat OpenShift Management Client Library for Python (azure-mgmt-redhatopenshift) provides an interface to programmatically manage Azure Red Hat OpenShift resources. Currently at version 3.0.0, this library is part of the larger Azure SDK for Python ecosystem and is actively maintained with regular updates, often aligning with new OpenShift minor versions. It requires Python 3.9 or higher for operation.","status":"active","version":"3.0.0","language":"en","source_language":"en","source_url":"https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/redhatopenshift/azure-mgmt-redhatopenshift","tags":["Azure","Cloud","Red Hat OpenShift","OpenShift","Kubernetes","Management","Microsoft"],"install":[{"cmd":"pip install azure-mgmt-redhatopenshift azure-identity","lang":"bash","label":"Install with pip"}],"dependencies":[{"reason":"Required for Azure Active Directory token authentication.","package":"azure-identity","optional":false},{"reason":"Requires Python 3.9 or higher.","package":"Python","optional":false}],"imports":[{"symbol":"AzureRedHatOpenShiftClient","correct":"from azure.mgmt.redhatopenshift import AzureRedHatOpenShiftClient"},{"symbol":"DefaultAzureCredential","correct":"from azure.identity import DefaultAzureCredential"}],"quickstart":{"code":"import os\nfrom azure.identity import DefaultAzureCredential\nfrom azure.mgmt.redhatopenshift import AzureRedHatOpenShiftClient\n\n# Ensure environment variables are set for authentication:\n# AZURE_CLIENT_ID, AZURE_TENANT_ID, AZURE_CLIENT_SECRET\n# AZURE_SUBSCRIPTION_ID\n\n# For demonstration, using os.getenv with a placeholder subscription ID.\n# In a production environment, ensure these are securely configured.\nsubscription_id = os.getenv(\"AZURE_SUBSCRIPTION_ID\", \"00000000-0000-0000-0000-000000000000\")\n\n# Authenticate using DefaultAzureCredential\n# This attempts to authenticate via environment variables, managed identity, etc.\ncredential = DefaultAzureCredential()\n\n# Create a client\nclient = AzureRedHatOpenShiftClient(credential=credential, subscription_id=subscription_id)\n\nprint(f\"AzureRedHatOpenShiftClient initialized for subscription: {subscription_id}\")\n\n# Example: List OpenShift clusters in the subscription (requires existing clusters and permissions)\n# try:\n#     for cluster in client.open_shift_clusters.list():\n#         print(f\"Found cluster: {cluster.name} in resource group: {cluster.resource_group_name}\")\n# except Exception as e:\n#     print(f\"Could not list clusters: {e}\")\n\nprint(\"To list clusters, ensure you have the necessary permissions and uncomment the example code.\")","lang":"python","description":"This quickstart demonstrates how to initialize the `AzureRedHatOpenShiftClient` using `DefaultAzureCredential` for authentication. It assumes necessary Azure environment variables (AZURE_CLIENT_ID, AZURE_TENANT_ID, AZURE_CLIENT_SECRET, AZURE_SUBSCRIPTION_ID) are configured. The client can then be used to interact with Azure Red Hat OpenShift resources. An example to list clusters is commented out as it requires specific Azure resources and permissions to run successfully."},"warnings":[{"fix":"If your application relies on a specific older API version, pin the `azure-mgmt-redhatopenshift` package to a version prior to 1.5.0. Otherwise, ensure your code is compatible with the latest API version.","message":"Starting with version 1.5.0, this package exclusively targets the latest Azure API-Version, removing APIs for older versions. Applications requiring a specific, non-latest API-Version should pin to an earlier package version.","severity":"breaking","affected_versions":">=1.5.0"},{"fix":"Migrate your authentication to use classes from the `azure-identity` library (e.g., `DefaultAzureCredential`). Update client instantiation to use the `credential` parameter instead of `credentials`.","message":"The credential system was completely revamped. Old `azure.common.credentials` or `msrestazure.azure_active_directory` instances are no longer supported. The `credentials` parameter was renamed to `credential`.","severity":"breaking","affected_versions":">=1.0.0b1 (fully effective in 1.x.x GA)"},{"fix":"Adjust method calls to use the `begin_` prefix for long-running operations and expect `azure.core.polling.LROPoller` as the return type.","message":"Operations that previously returned `msrest.polling.LROPoller` now return `azure.core.polling.LROPoller` and are prefixed with `begin_` (e.g., `create_or_update` becomes `begin_create_or_update`).","severity":"breaking","affected_versions":">=1.0.0b1 (fully effective in 1.x.x GA)"},{"fix":"Before creating an ARO cluster, request an increase in your Azure subscription's vCPU quota for the relevant VM families (e.g., Standard DSv3/DSv5/Dxv6) through the Azure portal support request.","message":"Azure Red Hat OpenShift cluster creation typically requires a minimum of 44 vCPUs (or 40 cores in some older documentation) across various VM families. Default Azure subscription quotas are often lower, leading to deployment failures if not increased.","severity":"gotcha","affected_versions":"All"},{"fix":"Ensure your development and deployment environments are running Python 3.9 or a newer supported version.","message":"This library (and the broader Azure SDK for Python) requires Python 3.9+. Support for Python 2.7 officially ended on January 01, 2022.","severity":"gotcha","affected_versions":"All"},{"fix":"Always access operation groups through the client object, e.g., `client.open_shift_clusters.list()` instead of `OpenShiftClustersOperations().list()`.","message":"Certain operation groups (e.g., `OpenShiftClustersOperations`, `OpenShiftVersionsOperations`) should not be instantiated directly. Instead, they are accessed as attributes of the `AzureRedHatOpenShiftClient` instance.","severity":"gotcha","affected_versions":"All"}],"env_vars":null,"last_verified":"2026-04-09T00:00:00.000Z","next_check":"2026-07-08T00:00:00.000Z"}