Skip to content

Commit e488c6b

Browse files
Merge pull request #273116 from tejaswikolli-web/anonymouspulls
query parameter.
2 parents 797781c + 75feeca commit e488c6b

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

articles/container-registry/anonymous-pull-access.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,11 @@ By default, access to pull or push content from an Azure container registry is o
2828
> [!WARNING]
2929
> Anonymous pull access currently applies to all repositories in the registry. If you manage repository access using [repository-scoped tokens](container-registry-repository-scoped-permissions.md), all users may pull from those repositories in a registry enabled for anonymous pull. We recommend deleting tokens when anonymous pull access is enabled.
3030
31+
3132
## Configure anonymous pull access
3233

34+
Users can enable, disable and query the status of anonymous pull access using the Azure CLI. The following examples demonstrate how to enable, disable, and query the status of anonymous pull access.
35+
3336
### Enable anonymous pull access
3437

3538
Update a registry using the [az acr update](/cli/azure/acr#az-acr-update) command and pass the `--anonymous-pull-enabled` parameter. By default, anonymous pull is disabled in the registry.
@@ -59,7 +62,20 @@ Disable anonymous pull access by setting `--anonymous-pull-enabled` to `false`.
5962
az acr update --name myregistry --anonymous-pull-enabled false
6063
```
6164

65+
### Query the status of anonymous pull access
66+
67+
Users can query the status of "anonymous-pull" using the [az acr show command][az-acr-show] with the --query parameter. Here's an example:
68+
69+
```azurecli-interactive
70+
az acr show -n <registry_name> --query anonymousPullEnabled
71+
```
72+
73+
The command will return a boolean value indicating whether "Anonymous Pull" is enabled (true) or disabled (false). This will streamline the process for users to verify the status of features within ACR.
74+
6275
## Next steps
6376

6477
* Learn about using [repository-scoped tokens](container-registry-repository-scoped-permissions.md).
6578
* Learn about options to [authenticate](container-registry-authentication.md) to an Azure container registry.
79+
80+
81+
[az-acr-show]: /cli/azure/acr#az-acr-show

0 commit comments

Comments
 (0)