public bool AllowNoResourceGroupMatch { get; set; }
This flag determines the OS policy compliance status when none of the
resource groups within the policy are applicable for a VM. Set this value
to true if the policy needs to be reported as compliant even if the
policy has nothing to validate or enforce.
public RepeatedField<OSPolicy.Types.ResourceGroup> ResourceGroups { get; }
Required. List of resource groups for the policy.
For a particular VM, resource groups are evaluated in the order specified
and the first resource group that is applicable is selected and the rest
are ignored.
If none of the resource groups are applicable for a VM, the VM is
considered to be non-compliant w.r.t this policy. This behavior can be
toggled by the flag allow_no_resource_group_match
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThe latest version of the \u003ccode\u003eOSPolicy\u003c/code\u003e class is \u003ccode\u003e2.0.0-alpha06\u003c/code\u003e within the \u003ccode\u003eGoogle.Cloud.OsConfig.V1Alpha\u003c/code\u003e API.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eOSPolicy\u003c/code\u003e class defines the desired state configuration for a virtual machine (VM).\u003c/p\u003e\n"],["\u003cp\u003eAn \u003ccode\u003eOSPolicy\u003c/code\u003e includes properties such as \u003ccode\u003eId\u003c/code\u003e, \u003ccode\u003eMode\u003c/code\u003e, \u003ccode\u003eDescription\u003c/code\u003e, and \u003ccode\u003eResourceGroups\u003c/code\u003e, all of which are required or play important roles for defining a policy.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eResourceGroups\u003c/code\u003e property within \u003ccode\u003eOSPolicy\u003c/code\u003e evaluates applicable groups in order and a VM is considered non-compliant if no resource groups are applicable, unless \u003ccode\u003eAllowNoResourceGroupMatch\u003c/code\u003e is true.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eOSPolicy\u003c/code\u003e is derived from the base \u003ccode\u003eobject\u003c/code\u003e class and also implements several interfaces, such as \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, and \u003ccode\u003eIDeepCloneable\u003c/code\u003e, which provide various functionalities for message handling, comparison, and deep cloning.\u003c/p\u003e\n"]]],[],null,[]]