Skip to content

Commit 911c632

Browse files
authored
Merge pull request #205218 from TimShererWithAquent/us1970076e
Updates to Azure CLI: az acr manifest list-metadata
2 parents 5aafa28 + 8ef6229 commit 911c632

10 files changed

+35
-35
lines changed

articles/container-registry/container-registry-concepts.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,16 +86,16 @@ A basic manifest for a Linux `hello-world` image looks similar to the following:
8686
}
8787
```
8888

89-
You can list the manifests for a repository with the Azure CLI command [az acr repository show-manifests][az-acr-repository-show-manifests]:
89+
You can list the manifests for a repository with the Azure CLI command [az acr manifest list-metadata][az-acr-manifest-list-metadata]:
9090

9191
```azurecli
92-
az acr repository show-manifests --name <acrName> --repository <repositoryName>
92+
az acr manifest list-metadata --name <repositoryName> --registry <acrName>
9393
```
9494

9595
For example, list the manifests for the "acr-helloworld" repository:
9696

9797
```azurecli
98-
az acr repository show-manifests --name myregistry --repository acr-helloworld
98+
az acr manifest list-metadata --name acr-helloworld --registry myregistry
9999
```
100100

101101
```output
@@ -179,4 +179,4 @@ Learn more about [registry storage](container-registry-storage.md) and [supporte
179179
Learn how to [push and pull images](container-registry-get-started-docker-cli.md) from Azure Container Registry.
180180

181181
<!-- LINKS - Internal -->
182-
[az-acr-repository-show-manifests]: /cli/azure/acr/repository#az_acr_repository_show_manifests
182+
[az-acr-manifest-list-metadata]: /cli/azure/acr/manifest#az-acr-manifest-list-metadata

articles/container-registry/container-registry-delete.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ A [manifest digest](container-registry-concepts.md#manifest-digest) can be assoc
5757
To delete by digest, first list the manifest digests for the repository containing the images you wish to delete. For example:
5858

5959
```azurecli
60-
az acr repository show-manifests --name myregistry --repository acr-helloworld
60+
az acr manifest list-metadata --name acr-helloworld --registry myregistry
6161
```
6262

6363
```output
@@ -106,8 +106,8 @@ To maintain the size of a repository or registry, you might need to periodically
106106
The following Azure CLI command lists all manifest digests in a repository older than a specified timestamp, in ascending order. Replace `<acrName>` and `<repositoryName>` with values appropriate for your environment. The timestamp could be a full date-time expression or a date, as in this example.
107107

108108
```azurecli
109-
az acr repository show-manifests --name <acrName> --repository <repositoryName> \
110-
--orderby time_asc -o tsv --query "[?timestamp < '2019-04-05'].[digest, timestamp]"
109+
az acr manifest list-metadata --name <repositoryName> --registry <acrName> <repositoryName> \
110+
--orderby time_asc -o tsv --query "[?timestamp < '2019-04-05'].[digest, timestamp]"
111111
```
112112

113113
After identifying stale manifest digests, you can run the following Bash script to delete manifest digests older than a specified timestamp. It requires the Azure CLI and **xargs**. By default, the script performs no deletion. Change the `ENABLE_DELETE` value to `true` to enable image deletion.
@@ -135,13 +135,13 @@ TIMESTAMP=2019-04-05
135135
136136
if [ "$ENABLE_DELETE" = true ]
137137
then
138-
az acr repository show-manifests --name $REGISTRY --repository $REPOSITORY \
138+
az acr manifest list-metadata --name $REPOSITORY --registry $REGISTRY \
139139
--orderby time_asc --query "[?timestamp < '$TIMESTAMP'].digest" -o tsv \
140140
| xargs -I% az acr repository delete --name $REGISTRY --image $REPOSITORY@% --yes
141141
else
142142
echo "No data deleted."
143143
echo "Set ENABLE_DELETE=true to enable deletion of these images in $REPOSITORY:"
144-
az acr repository show-manifests --name $REGISTRY --repository $REPOSITORY \
144+
az acr manifest list-metadata --name $REPOSITORY --repository $REGISTRY \
145145
--orderby time_asc --query "[?timestamp < '$TIMESTAMP'].[digest, timestamp]" -o tsv
146146
fi
147147
```
@@ -154,7 +154,7 @@ As mentioned in the [Manifest digest](container-registry-concepts.md#manifest-di
154154
1. Check manifests for repository *acr-helloworld*:
155155

156156
```azurecli
157-
az acr repository show-manifests --name myregistry --repository acr-helloworld
157+
az acr manifest list-metadata --name acr-helloworld --registry myregistry
158158
159159
```
160160

@@ -175,7 +175,7 @@ As mentioned in the [Manifest digest](container-registry-concepts.md#manifest-di
175175
1. Check manifests for repository *acr-helloworld*:
176176

177177
```azurecli
178-
az acr repository show-manifests --name myregistry --repository acr-helloworld
178+
az acr manifest list-metadata --name myregistry --repository acr-helloworld
179179
```
180180

181181
```output

articles/container-registry/container-registry-faq.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,13 +108,13 @@ sections:
108108
If you are on bash:
109109
110110
```azurecli
111-
az acr repository show-manifests -n myRegistry --repository myRepository --query "[?tags[0]==null].digest" -o tsv | xargs -I% az acr repository delete -n myRegistry -t myRepository@%
111+
az acr manifest list-metadata --name myRepository --registry myRegistry --query "[?tags[0]==null].digest" --output tsv | xargs -I% az acr repository delete --name myRegistry ---image myRepository@%
112112
```
113113
114114
For PowerShell:
115115
116116
```azurecli
117-
az acr repository show-manifests -n myRegistry --repository myRepository --query "[?tags[0]==null].digest" -o tsv | %{ az acr repository delete -n myRegistry -t myRepository@$_ }
117+
az acr manifest list-metadata --name myRepository --repository myRegistry --query "[?tags[0]==null].digest" --output tsv | %{ az acr repository delete --name myRegistry --image myRepository@$_ }
118118
```
119119
120120
> [!NOTE]

articles/container-registry/container-registry-helm-repos.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ Output is similar to:
213213
}
214214
```
215215

216-
Run the [az acr repository show-manifests][az-acr-repository-show-manifests] command to see details of the chart stored in the repository. For example:
216+
Run the [az acr manifest list-metadata][az-acr-manifest-list-metadata] command to see details of the chart stored in the repository. For example:
217217

218218
```azurecli
219219
az acr manifest list-metadata \
@@ -383,5 +383,5 @@ helm repo remove $ACR_NAME
383383
[az-acr-repository]: /cli/azure/acr/repository
384384
[az-acr-repository-show]: /cli/azure/acr/repository#az_acr_repository_show
385385
[az-acr-repository-delete]: /cli/azure/acr/repository#az_acr_repository_delete
386-
[az-acr-repository-show-manifests]: /cli/azure/acr/repository#az_acr_repository_show_manifests
386+
[az-acr-manifest-list-metadata]: /cli/azure/acr/manifest#az-acr-manifest-list-metadata
387387
[acr-tasks]: container-registry-tasks-overview.md

articles/container-registry/container-registry-image-lock.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ az acr repository update \
6464

6565
### Lock an image by manifest digest
6666

67-
To lock a *myimage* image identified by manifest digest (SHA-256 hash, represented as `sha256:...`), run the following command. (To find the manifest digest associated with one or more image tags, run the [az acr repository show-manifests][az-acr-repository-show-manifests] command.)
67+
To lock a *myimage* image identified by manifest digest (SHA-256 hash, represented as `sha256:...`), run the following command. (To find the manifest digest associated with one or more image tags, run the [az acr manifest list-metadata][az-acr-manifest-list-metadata] command.)
6868

6969
```azurecli
7070
az acr repository update \
@@ -149,8 +149,8 @@ To see the attributes set for an image version or repository, use the [az acr re
149149
For details about delete operations, see [Delete container images in Azure Container Registry][container-registry-delete].
150150

151151
<!-- LINKS - Internal -->
152+
[az-acr-manifest-list-metadata]: /cli/azure/acr/manifest#az-acr-manifest-list-metadata
152153
[az-acr-repository-update]: /cli/azure/acr/repository#az_acr_repository_update
153154
[az-acr-repository-show]: /cli/azure/acr/repository#az_acr_repository_show
154-
[az-acr-repository-show-manifests]: /cli/azure/acr/repository#az_acr_repository_show_manifests
155155
[azure-cli]: /cli/azure/install-azure-cli
156156
[container-registry-delete]: container-registry-delete.md

articles/container-registry/container-registry-import-images.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,12 @@ az acr import \
8080
--image hello-world:latest
8181
```
8282

83-
You can verify that multiple manifests are associated with this image by running the `az acr repository show-manifests` command:
83+
You can verify that multiple manifests are associated with this image by running the [az acr manifest list-metadata](/cli/azure/acr/manifest#az-acr-manifest-list-metadata) command:
8484

8585
```azurecli
86-
az acr repository show-manifests \
87-
--name myregistry \
88-
--repository hello-world
86+
az acr manifest list-metadata \
87+
--name hello-world \
88+
--registry myregistry
8989
```
9090

9191
To import an artifact by digest without adding a tag:

articles/container-registry/container-registry-oras-artifacts.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -313,10 +313,10 @@ az acr repository show-tags \
313313
A repository can have a list of manifests that are both tagged and untagged
314314

315315
```azurecli
316-
az acr repository show-manifests \
317-
-n $ACR_NAME \
318-
--repository $REPO \
319-
--detail -o jsonc
316+
az acr manifest list-metadata \
317+
--name $REPO \
318+
--repository $ACR_NAME \
319+
--output jsonc
320320
```
321321

322322
Note the container image manifests have `"tags":`
@@ -373,9 +373,9 @@ az acr repository delete \
373373
### View the remaining manifests
374374

375375
```azurecli
376-
az acr repository show-manifests \
377-
-n $ACR_NAME \
378-
--repository $REPO \
376+
az acr manifest list-metadata \
377+
--name $REPO \
378+
--registry $ACR_NAME \
379379
--detail -o jsonc
380380
```
381381

articles/container-registry/container-registry-repository-scoped-permissions.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ The authentication method depends on the configured action or actions associated
187187
|`content/delete` | `az acr repository delete` in Azure CLI<br/><br/>Example: `az acr repository delete --name myregistry --repository myrepo --username MyToken --password xxxxxxxxxx`|
188188
|`content/read` | `docker login`<br/><br/>`az acr login` in Azure CLI<br/><br/>Example: `az acr login --name myregistry --username MyToken --password xxxxxxxxxx` |
189189
|`content/write` | `docker login`<br/><br/>`az acr login` in Azure CLI |
190-
|`metadata/read` | `az acr repository show`<br/><br/>`az acr repository show-tags`<br/><br/>`az acr repository show-manifests` in Azure CLI |
190+
|`metadata/read` | `az acr repository show`<br/><br/>`az acr repository show-tags`<br/><br/>`az acr manifest list-metadata` in Azure CLI |
191191
|`metadata/write` | `az acr repository untag`<br/><br/>`az acr repository update` in Azure CLI |
192192

193193
## Examples: Use token
@@ -317,7 +317,7 @@ az acr scope-map update \
317317

318318
To update the scope map using the portal, see the [previous section](#update-token-permissions).
319319

320-
To read metadata in the `samples/hello-world` repository, run the [az acr repository show-manifests][az-acr-repository-show-manifests] or [az acr repository show-tags][az-acr-repository-show-tags] command.
320+
To read metadata in the `samples/hello-world` repository, run the [az acr manifest list-metadata][az-acr-manifest-list-metadata] or [az acr repository show-tags][az-acr-repository-show-tags] command.
321321

322322
To read metadata, pass the token's name and password to either command. The following example uses the environment variables created earlier in the article:
323323

@@ -432,9 +432,9 @@ In the portal, select the token in the **Tokens (Preview)** screen, and select *
432432

433433
<!-- LINKS - Internal -->
434434
[az-acr-login]: /cli/azure/acr#az_acr_login
435+
[az-acr-manifest-list-metadata]: /cli/azure/acr/manifest#az-acr-manifest-list-metadata
435436
[az-acr-repository]: /cli/azure/acr/repository/
436437
[az-acr-repository-show-tags]: /cli/azure/acr/repository/#az_acr_repository_show_tags
437-
[az-acr-repository-show-manifests]: /cli/azure/acr/repository/#az_acr_repository_show_manifests
438438
[az-acr-repository-delete]: /cli/azure/acr/repository/#az_acr_repository_delete
439439
[az-acr-scope-map]: /cli/azure/acr/scope-map/
440440
[az-acr-scope-map-create]: /cli/azure/acr/scope-map/#az_acr_scope_map_create

articles/container-registry/container-registry-retention-policy.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ If you enable the preceding policy with a retention period of 0 days, you can qu
5959
az acr repository untag \
6060
--name myregistry --image hello-world:latest
6161
```
62-
1. Within a few seconds, the untagged manifest is deleted. You can verify the deletion by listing manifests in the repository, for example, using the [az acr repository show-manifests][az-acr-repository-show-manifests] command. If the test image was the only one in the repository, the repository itself is deleted.
62+
1. Within a few seconds, the untagged manifest is deleted. You can verify the deletion by listing manifests in the repository, for example, using the [az acr manifest list-metadata][az-acr-manifest-list-metadata] command. If the test image was the only one in the repository, the repository itself is deleted.
6363
6464
### Manage a retention policy
6565
@@ -110,5 +110,5 @@ You can also set a registry's retention policy in the [Azure portal](https://por
110110
[azure-cli]: /cli/azure/install-azure-cli
111111
[az-acr-config-retention-update]: /cli/azure/acr/config/retention#az_acr_config_retention_update
112112
[az-acr-config-retention-show]: /cli/azure/acr/config/retention#az_acr_config_retention_show
113+
[az-acr-manifest-list-metadata]: /cli/azure/acr/manifest#az-acr-manifest-list-metadata
113114
[az-acr-repository-untag]: /cli/azure/acr/repository#az_acr_repository_untag
114-
[az-acr-repository-show-manifests]: /cli/azure/acr/repository#az_acr_repository_show_manifests

articles/container-registry/push-multi-architecture-images.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ A basic manifest for a Linux `hello-world` image looks similar to the following:
4141
}
4242
```
4343

44-
You can view a manifest in Azure Container Registry using the Azure portal or tools such as the [az acr repository show-manifests](/cli/azure/acr/repository#az-acr-repository-show-manifests) command in the Azure CLI.
44+
You can view a manifest in Azure Container Registry using the Azure portal or tools such as the [az acr manifest list-metadata](/cli/azure/acr/manifest#az-acr-manifest-list-metadata) command in the Azure CLI.
4545

4646
### Manifest list
4747

@@ -90,7 +90,7 @@ You can view a manifest list using the `docker manifest inspect` command. The fo
9090
}
9191
```
9292

93-
When a multi-arch manifest list is stored in Azure Container Registry, you can also view the manifest list using the Azure portal or with tools such as the [az acr repository show-manifests](/cli/azure/acr/repository#az-acr-repository-how-manifests) command.
93+
When a multi-arch manifest list is stored in Azure Container Registry, you can also view the manifest list using the Azure portal or with tools such as the [az acr manifest list-metadata](/cli/azure/acr/manifest#az-acr-manifest-list-metadata) command.
9494

9595
## Import a multi-arch image
9696

0 commit comments

Comments
 (0)