I am trying to create a Business Dimension for tag compliance from the API. Do I have to validate the existence of the tag first and then its compliance, or the various operators will return false if the tag does not exist?
Basically, should I do this:
{
"defaultValue": "Compliant",
"statement": [
{
"matchExpression": "!(TAG['Tag1'] IN ('value1', 'value2'))",
"valueExpression": "Non-compliant"
},
{
"matchExpression": "!(TAG['Tag2'] FIND /^c[a-z][0-9]{6}$/)",
"valueExpression": "Non-compliant"
}
]
}
Or that:
{
"defaultValue": "Compliant",
"statement": [
{
"matchExpression": "!EXIST TAG['Tag1']",
"valueExpression": "Non-compliant"
},
{
"matchExpression": "!(TAG['Tag1'] IN ('value1', 'value2'))",
"valueExpression": "Non-compliant"
},
{
"matchExpression": "!EXIST TAG['Tag2']",
"valueExpression": "Non-compliant"
},
{
"matchExpression": "!(TAG['Tag2'] FIND /^c[a-z][0-9]{6}$/)",
"valueExpression": "Non-compliant"
}
]
}
#Cloudability