Json 内置Azure策略定义
以前有一个名为“requirespecifiedtag”的内置Azure策略定义,现在已经不存在了。是否有理由将其移除而不进行更换?是否有人拥有此旧策略定义的JSON代码Json 内置Azure策略定义,json,azure,azure-policy,Json,Azure,Azure Policy,以前有一个名为“requirespecifiedtag”的内置Azure策略定义,现在已经不存在了。是否有理由将其移除而不进行更换?是否有人拥有此旧策略定义的JSON代码 非常感谢。您是否正在寻找此政策: { "properties": { "displayName": "Require a tag on resources", "policyType": "BuiltIn", "mode": "Indexed", "description": "Enforc
非常感谢。您是否正在寻找此政策:
{
"properties": {
"displayName": "Require a tag on resources",
"policyType": "BuiltIn",
"mode": "Indexed",
"description": "Enforces existence of a tag. Does not apply to resource groups.",
"metadata": {
"version": "1.0.1",
"category": "Tags"
},
"parameters": {
"tagName": {
"type": "String",
"metadata": {
"displayName": "Tag Name",
"description": "Name of the tag, such as 'environment'"
}
}
},
"policyRule": {
"if": {
"field": "[concat('tags[', parameters('tagName'), ']')]",
"exists": "false"
},
"then": {
"effect": "deny"
}
}
},
"id": "/providers/Microsoft.Authorization/policyDefinitions/871b6d14-10aa-478d-b590-94f262ecfa99",
"type": "Microsoft.Authorization/policyDefinitions",
"name": "871b6d14-10aa-478d-b590-94f262ecfa99"
}
这些策略作为“需要标记”的内置策略提供
是的!这最终取代了不推荐使用的“需要特定标记”策略定义。谢谢。如果你觉得答案有用,请接受。谢谢我看不到这个选项。点击答案左侧的勾选按钮。单击它以接受它。