[英]How to modify image tag on azure container registry via rest API?
Probably I am not able to follow the azure docs quickly, every single time when I try to implement something from azure API, it is always frustrating me.可能我无法快速遵循 azure 文档,每次尝试从 azure API 实现某些东西时,总是让我感到沮丧。 I feel like an idiot.
我觉得自己像个白痴。 This feeling I have every time when read azure docs.
每次阅读 azure docs 时都会有这种感觉。 Ie I want to modify or add a new tag azure container registry and here is the docs .
即我想修改或添加一个新的标签天蓝色容器注册表,这里是文档。 Could someone understand what is the new tag or what will be modified?
有人能理解什么是新标签或将修改什么吗?
curl -SsLf -XPATCH -H "Authorization:Basic $TOKEN" "https://my.azurecr.io/acr/v1/myrepo/_tags/latest"
I am trying to retag the latest
tag as 123456789
.我正在尝试将
latest
标签重新标记为123456789
。 Any idea how can I handle this?知道我该如何处理吗?
The response:响应:
HTTP/1.1 400 Bad Request
For Workround you can use this API to update the tag of container registry(Make sure to pass the existing tag and new tag as well which you are going to update else it will overwrite with new tag).对于 Workround,您可以使用此 API 更新容器注册表的标签(确保传递现有标签和新标签以及您将要更新的标签,否则它将被新标签覆盖)。
PATCH https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}?api-version=2019-05-01
Same you test out using this Microsoft Document : https://docs.microsoft.com/en-us/rest/api/containerregistry/registries/update#code-try-0同样,您使用此 Microsoft 文档进行测试: https ://docs.microsoft.com/en-us/rest/api/containerregistry/registries/update#code-try-0
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.