The latest version of azure-mgmt-containerregistry uses old API and doesn`t return properties.anonymousPullEnabled field
- Package Name: azure-mgmt-containerregistry
- Package Version: 10.3.0
- Operating System: Any
- Python Version: Any
Describe the bug The latest version of azure-mgmt-containerregistry uses old API and doesn`t return properties.anonymousPullEnabled field. When I try to list all container registries, it returns json without properties.anonymousPullEnabled field. It blocks us in our development goals.
Expected behavior { "sku": { "name": "Standard", "tier": "Standard" }, "type": "Microsoft.ContainerRegistry/registries", "id": "/subscriptions/1111111111111111111111111111/resourceGroups/resource-group/providers/Microsoft.ContainerRegistry/registries/acr354green", "name": "name", "location": "eastus", "tags": {}, "systemData": { "createdBy": "[email protected]", "createdByType": "User", "createdAt": "2024-08-27T20:51:40.4164262+00:00", "lastModifiedBy": "[email protected]", "lastModifiedByType": "User", "lastModifiedAt": "2024-08-27T20:51:40.4164262+00:00" }, "properties": { "loginServer": "server.azurecr.io", "creationDate": "2024-08-27T20:51:40.4164262Z", "provisioningState": "Succeeded", "adminUserEnabled": false, "policies": { "quarantinePolicy": { "status": "disabled" }, "trustPolicy": { "type": "Notary", "status": "disabled" }, "retentionPolicy": { "days": 7, "lastUpdatedTime": "2024-08-27T20:51:47.6966832+00:00", "status": "disabled" }, "exportPolicy": { "status": "enabled" }, "azureADAuthenticationAsArmPolicy": { "status": "enabled" }, "softDeletePolicy": { "retentionDays": 7, "lastUpdatedTime": "2024-08-27T20:51:47.6967294+00:00", "status": "disabled" } }, "encryption": { "status": "disabled" }, "dataEndpointEnabled": false, "dataEndpointHostNames": [], "privateEndpointConnections": [], "publicNetworkAccess": "Enabled", "networkRuleBypassOptions": "AzureServices", "zoneRedundancy": "Disabled", "anonymousPullEnabled": false, "metadataSearch": "Disabled" } }
Actual behavior { "id": "/subscriptions/1111111111111111111111111111/resourceGroups/resource-group/providers/Microsoft.ContainerRegistry/registries/acr354green", "name": "name", "type": "Microsoft.ContainerRegistry/registries", "location": "eastus", "tags": {}, "systemData": { "createdBy": "[email protected]", "createdByType": "User", "createdAt": "2024-08-27T20:51:40.416426Z", "lastModifiedBy": "[email protected]", "lastModifiedByType": "User", "lastModifiedAt": "2024-08-27T20:51:40.416426Z" }, "sku": { "name": "Standard", "tier": "Standard" }, "properties": { "loginServer": "server.azurecr.io", "creationDate": "2024-08-27T20:51:40.416426Z", "provisioningState": "Succeeded", "adminUserEnabled": false, "policies": { "quarantinePolicy": { "status": "disabled" }, "trustPolicy": { "type": "Notary", "status": "disabled" }, "retentionPolicy": { "days": 7, "lastUpdatedTime": "2024-08-27T20:51:47.696683Z", "status": "disabled" }, "exportPolicy": { "status": "enabled" } }, "encryption": { "status": "disabled" }, "dataEndpointEnabled": false, "dataEndpointHostNames": [], "privateEndpointConnections": [], "publicNetworkAccess": "Enabled", "networkRuleBypassOptions": "AzureServices", "zoneRedundancy": "Disabled" }, "resourceGroup": "resource-group",
}
Screenshots If applicable, add screenshots to help explain your problem.
Additional context Please add properties.anonymousPullEnabled field.
Thanks for your issue, we'll take a look and get back to you as soon as possible.
@ChenxiJiang333 Please help on this issue.
got it
Hi @vit-corp, the latest api version was a preview version, please specify to use it by updating the code to:
client = ContainerRegistryManagementClient(
credential=DefaultAzureCredential(),
subscription_id={subscription_id},
api_version="2023-11-01-preview",
)
Hi @ChenxiJiang333 What latest azure-mgmt-containerregistry sdk uses api version? Is it obligatory to specify "2023-11-01-preview"?
Hi @ChenxiJiang333 What latest azure-mgmt-containerregistry sdk uses api version? Is it obligatory to specify "2023-11-01-preview"?
It uses stable api version 2023-07-01 by default, which is considered old. If you want to use the latest one, to specify 2023-11-01-preview is necessary.
Hi @vit-corp. Thank you for opening this issue and giving us the opportunity to assist. We believe that this has been addressed. If you feel that further discussion is needed, please add a comment with the text "/unresolve" to remove the "issue-addressed" label and continue the conversation.
Hi @vit-corp, since you haven’t asked that we /unresolve the issue, we’ll close this out. If you believe further discussion is needed, please add a comment /unresolve to reopen the issue.