PolicyRule
A compute policy rule that defines the criteria against which the policy will be evaluated for a VM. A PolicyRule can contain either a workloadPolicyRule or a list of nested PolicyRules combined with a boolean operator. The nested rules in the 'rules' field are evaluated using the boolean operation specified in the 'operator' field. The workloadPolicyRule is always AND'd together with the results of the nested rules.
{
"operator": "string",
"rules": [
"PolicyRule Object"
],
"workloadPolicyRule": {
"guestOsRule": {
"operator": "string",
"value": "string"
},
"guestOsFamilyRule": {
"operator": "string",
"value": "string"
},
"labelSelectorRules": [
{
"operator": "string",
"ruleKey": "string",
"values": [
"string"
]
}
]
}
}
The boolean operation used to evaluate the elements from the rules field. This field does not apply to the workloadPolicyRule field. The workloadPolicyRule is always AND'd together with the results of the rules field. If unset, defaults to AND.
A list of additional PolicyRules that are evaluated using the boolean operation specified in the operator field. If unset, no additional matching is performed.
A workload policy rule that defines the criteria for matching workloads. The workload policy rule is a composite rule that is used to match workloads based on the guest OS, guest OS family, and label selectors. All provided rules must match for the workload to be matched.