gpt4 book ai didi

Azure 订阅标签 : How to delete an empty tag value?

转载 作者:行者123 更新时间:2023-12-02 07:08:11 25 4
gpt4 key购买 nike

Azure 门户允许我们为任何资源/资源组创建一个包含空值的标签(如所附屏幕截图所示,“测试”标签是使用空值创建的)。

enter image description here

如果我想删除标签值,即空值,则无法从 Azure REST API 中删除该值。 ,它显示此错误消息。

{
"message":"No HTTP resource was found that matches the request URI
'https://management.azure.com/subscriptions/{subscription-id}/tagNames/test/tagValues/?api-version=2017-05-10'."
}

假设我在一个资源中创建一个标签名称为“department”和标签值“finance”的标签:

{
'department': 'finance'
}

对于其他资源,我创建一个具有相同标签名称和空值的标签:

{
'department': ''
}

现在我想删除这个空标签值。在这种情况下我不能使用 Tags - Delete方法,因为我无法在此处删除标签名称,因为此标签名称与其他资源关联。那么是否可以删除空标签值呢?

最佳答案

您正在寻找错误的方法。尝试使用Tags - Delete这只需要您使用 tagName

Tags - Delete Value您提到的确实需要 tagValuetagName

因此,在您的情况下,REST 请求将是:

DELETE 
https://management.azure.com/subscriptions/{subscriptionId}/tagNames/test?api-version=2018-02-01

关于Azure 订阅标签 : How to delete an empty tag value?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51210270/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com