azure-mgmt-containerregistry
Microsoft Azure Container Registry Client Library for Python
Description
Microsoft Azure SDK for Python
This is the Microsoft Azure Container Registry Client Library. This package has been tested with Python 3.9+. For a more complete view of Azure libraries, see the azure sdk python release.
Disclaimer
Azure SDK Python packages support for Python 2.7 has ended 01 January 2022. For more information and questions, please refer to https://github.com/Azure/azure-sdk-for-python/issues/20691
Getting started
Prerequisites
- Python 3.9+ is required to use this package.
- Azure subscription
Install the package
pip install azure-mgmt-containerregistry
pip install azure-identity
Authentication
By default, Azure Active Directory token authentication depends on correct configuration of the following environment variables.
AZURE_CLIENT_IDfor Azure client ID.AZURE_TENANT_IDfor Azure tenant ID.AZURE_CLIENT_SECRETfor Azure client secret.
In addition, Azure subscription ID can be configured via environment variable AZURE_SUBSCRIPTION_ID.
With above configuration, client can be authenticated by following code:
from azure.identity import DefaultAzureCredential
from azure.mgmt.containerregistry import ContainerRegistryManagementClient
import os
sub_id = os.getenv("AZURE_SUBSCRIPTION_ID")
client = ContainerRegistryManagementClient(credential=DefaultAzureCredential(), subscription_id=sub_id)
Examples
Code samples for this package can be found at:
- Search Container Registry on docs.microsoft.com
- Azure Python Mgmt SDK Samples Repo
Troubleshooting
Next steps
Provide Feedback
If you encounter any bugs or have suggestions, please file an issue in the Issues section of the project.
Release History
14.0.0 (2025-04-27)
Breaking Changes
- Model Policies no longer has parameter soft_delete_policy
- Model Registry no longer has parameter auto_generated_domain_name_label_scope
- Model Registry no longer has parameter metadata_search
- Model Registry no longer has parameter role_assignment_mode
- Model RegistryNameCheckRequest no longer has parameter auto_generated_domain_name_label_scope
- Model RegistryNameCheckRequest no longer has parameter resource_group_name
- Model RegistryNameStatus no longer has parameter available_login_server_name
- Model RegistryUpdateParameters no longer has parameter metadata_search
- Model RegistryUpdateParameters no longer has parameter role_assignment_mode
- Removed operation RegistriesOperations.get_build_source_upload_url
- Removed operation RegistriesOperations.schedule_run
13.0.0 (2025-04-21)
Features Added
- Added operation RegistriesOperations.get_build_source_upload_url
- Added operation RegistriesOperations.schedule_run
- Added operation RunsOperations.cancel
- Added operation RunsOperations.update
- Added operation TaskRunsOperations.delete
- Added operation TasksOperations.create
- Added operation TasksOperations.delete
- Added operation TasksOperations.update
- Model Registry has a new parameter role_assignment_mode
- Model RegistryUpdateParameters has a new parameter role_assignment_mode
- Model SourceRegistryCredentials has a new parameter identity
Breaking Changes
- Removed operation RunsOperations.begin_cancel
- Removed operation RunsOperations.begin_update
- Removed operation TaskRunsOperations.begin_delete
- Removed operation TasksOperations.begin_create
- Removed operation TasksOperations.begin_delete
- Removed operation TasksOperations.begin_update
12.0.0 (2025-02-24)
Breaking Changes
- Removed subfolders of some unused Api-Versions for smaller package size. If your application requires a specific and non-latest Api-Version, it's recommended to pin this package to the previous released version; If your application always only use latest Api-Version, please ignore this change.
11.0.0 (2024-02-19)
Features Added
- Model ConnectedRegistry has a new parameter garbage_collection
- Model ConnectedRegistryUpdateParameters has a new parameter garbage_collection
- Model Registry has a new parameter auto_generated_domain_name_label_scope
- Model RegistryNameCheckRequest has a new parameter auto_generated_domain_name_label_scope
- Model RegistryNameCheckRequest has a new parameter resource_group_name
- Model RegistryNameStatus has a new parameter available_login_server_name
Breaking Changes
- Removed operation group BuildStepsOperations
- Removed operation group BuildTasksOperations
- Removed operation group BuildsOperations
10.3.0 (2023-11-20)
Features Added
- Model Registry has a new parameter metadata_search
- Model RegistryUpdateParameters has a new parameter metadata_search
10.2.0 (2023-09-21)
Features Added
- Added operation group ArchiveVersionsOperations
- Added operation group ArchivesOperations
10.1.0 (2023-02-15)
Features Added
- Added operation group CacheRulesOperations
- Added operation group CredentialSetsOperations
10.0.0 (2022-05-26)
Features
- Model Policies has a new parameter azure_ad_authentication_as_arm_policy
- Model Policies has a new parameter soft_delete_policy
Breaking changes
- Model NetworkRuleSet no longer has parameter virtual_network_rules
9.1.0 (2022-03-03)
Features
- Added operation RegistriesOperations.begin_generate_credentials
- Model NetworkRuleSet has a new parameter virtual_network_rules
- Model Registry has a new parameter anonymous_pull_enabled
- Model RegistryUpdateParameters has a new parameter anonymous_pull_enabled
9.0.0 (2022-01-19)
Features
- Added operation RegistriesOperations.get_private_link_resource
Breaking changes
- Model NetworkRuleSet no longer has parameter virtual_network_rules
- Model Registry no longer has parameter anonymous_pull_enabled
- Model RegistryUpdateParameters no longer has parameter anonymous_pull_enabled
- Removed operation RegistriesOperations.begin_generate_credentials
8.2.0 (2021-10-26)
Features
- Model ConnectedRegistryUpdateParameters has a new parameter notifications_list
- Model ConnectedRegistry has a new parameter notifications_list
8.1.0 (2021-07-22)
Features
- Model Policies has a new parameter export_policy
- Model OperationDefinition has a new parameter is_data_action
8.0.0 (2021-05-25)
Features
- Model PipelineRun has a new parameter system_data
- Model TaskRunRequest has a new parameter log_template
- Model TaskUpdateParameters has a new parameter log_template
- Model Token has a new parameter system_data
- Model EncodedTaskRunRequest has a new parameter log_template
- Model ScopeMap has a new parameter system_data
- Model AgentPool has a new parameter system_data
- Model RegistryUpdateParameters has a new parameter anonymous_pull_enabled
- Model RegistryUpdateParameters has a new parameter network_rule_bypass_options
- Model ExportPipeline has a new parameter system_data
- Model KeyVaultProperties has a new parameter key_rotation_enabled
- Model KeyVaultProperties has a new parameter last_key_rotation_timestamp
- Model Run has a new parameter log_artifact
- Model Run has a new parameter system_data
- Model FileTaskRunRequest has a new parameter log_template
- Model RunRequest has a new parameter log_template
- Model OperationServiceSpecificationDefinition has a new parameter log_specifications
- Model Webhook has a new parameter system_data
- Model ProxyResource has a new parameter system_data
- Model TaskRun has a new parameter system_data
- Model DockerBuildRequest has a new parameter log_template
- Model Task has a new parameter is_system_task
- Model Task has a new parameter system_data
- Model Task has a new parameter log_template
- Model Registry has a new parameter zone_redundancy
- Model Registry has a new parameter anonymous_pull_enabled
- Model Registry has a new parameter system_data
- Model Registry has a new parameter network_rule_bypass_options
- Model ImportPipeline has a new parameter system_data
- Model Resource has a new parameter system_data
- Model PrivateEndpointConnection has a new parameter system_data
- Model Replication has a new parameter zone_redundancy
- Model Replication has a new parameter system_data
- Added operation group ConnectedRegistriesOperations
Breaking changes
- Parameter type of model QuickBuildRequest is now required
- Parameter type of model BuildStepProperties is now required
- Parameter type of model BuildStepPropertiesUpdateParameters is now required
- Parameter type of model QueueBuildRequest is now required
- Parameter type of model BuildTaskBuildRequest is now required
- Model TokenCredentialsProperties no longer has parameter active_directory_object
- Model Registry no longer has parameter storage_account
- Removed operation RegistriesOperations.get_build_source_upload_url
- Removed operation RegistriesOperations.begin_schedule_run
8.0.0b1 (2020-10-12)
This is beta preview version.
This version uses a next-generation code generator that introduces important breaking changes, but also important new features (like unified authentication and async programming).
General breaking changes
-
Credential system has been completly revamped:
azure.common.credentialsormsrestazure.azure_active_directoryinstances are no longer supported, use theazure-identityclasses instead: https://pypi.org/project/azure-identity/credentialsparameter has been renamedcredential
-
The
configattribute no longer exists on a cli