public sealed class OSPolicy.Types.ResourceGroup : IMessage<OSPolicy.Types.ResourceGroup>, IEquatable<OSPolicy.Types.ResourceGroup>, IDeepCloneable<OSPolicy.Types.ResourceGroup>, IBufferMessage, IMessage
Reference documentation and code samples for the Google Cloud OS Config v1 API class OSPolicy.Types.ResourceGroup.
Resource groups provide a mechanism to group OS policy resources.
Resource groups enable OS policy authors to create a single OS policy
to be applied to VMs running different operating Systems.
When the OS policy is applied to a target VM, the appropriate resource
group within the OS policy is selected based on the OSFilter specified
within the resource group.
public RepeatedField<OSPolicy.Types.InventoryFilter> InventoryFilters { get; }
List of inventory filters for the resource group.
The resources in this resource group are applied to the target VM if it
satisfies at least one of the following inventory filters.
For example, to apply this resource group to VMs running either RHEL or
CentOS operating systems, specify 2 items for the list with following
values:
inventory_filters[0].os_short_name='rhel' and
inventory_filters[1].os_short_name='centos'
If the list is empty, this resource group will be applied to the target
VM unconditionally.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-12 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eOSPolicy.Types.ResourceGroup\u003c/code\u003e class in the Google Cloud OS Config v1 API allows for grouping OS policy resources.\u003c/p\u003e\n"],["\u003cp\u003eResource groups enable the creation of a single OS policy applicable to VMs running different operating systems.\u003c/p\u003e\n"],["\u003cp\u003eThe appropriate resource group within an OS policy is selected based on the \u003ccode\u003eOSFilter\u003c/code\u003e (now \u003ccode\u003eInventoryFilters\u003c/code\u003e) specified within it when the policy is applied to a target VM.\u003c/p\u003e\n"],["\u003cp\u003eThe latest version of this resource is \u003ccode\u003e2.4.0\u003c/code\u003e, and versions are provided back to version \u003ccode\u003e1.3.0\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eInventoryFilters\u003c/code\u003e property within the \u003ccode\u003eOSPolicy.Types.ResourceGroup\u003c/code\u003e class allows for defining filters to specify which target VMs should receive the configuration of a certain resource group, and the \u003ccode\u003eResources\u003c/code\u003e property specifies which resources are to be applied in the group.\u003c/p\u003e\n"]]],[],null,["# Google Cloud OS Config v1 API - Class OSPolicy.Types.ResourceGroup (2.5.0)\n\nVersion latestkeyboard_arrow_down\n\n- [2.5.0 (latest)](/dotnet/docs/reference/Google.Cloud.OsConfig.V1/latest/Google.Cloud.OsConfig.V1.OSPolicy.Types.ResourceGroup)\n- [2.4.0](/dotnet/docs/reference/Google.Cloud.OsConfig.V1/2.4.0/Google.Cloud.OsConfig.V1.OSPolicy.Types.ResourceGroup)\n- [2.3.0](/dotnet/docs/reference/Google.Cloud.OsConfig.V1/2.3.0/Google.Cloud.OsConfig.V1.OSPolicy.Types.ResourceGroup)\n- [2.2.0](/dotnet/docs/reference/Google.Cloud.OsConfig.V1/2.2.0/Google.Cloud.OsConfig.V1.OSPolicy.Types.ResourceGroup)\n- [2.1.0](/dotnet/docs/reference/Google.Cloud.OsConfig.V1/2.1.0/Google.Cloud.OsConfig.V1.OSPolicy.Types.ResourceGroup)\n- [2.0.0](/dotnet/docs/reference/Google.Cloud.OsConfig.V1/2.0.0/Google.Cloud.OsConfig.V1.OSPolicy.Types.ResourceGroup)\n- [1.8.0](/dotnet/docs/reference/Google.Cloud.OsConfig.V1/1.8.0/Google.Cloud.OsConfig.V1.OSPolicy.Types.ResourceGroup)\n- [1.7.0](/dotnet/docs/reference/Google.Cloud.OsConfig.V1/1.7.0/Google.Cloud.OsConfig.V1.OSPolicy.Types.ResourceGroup)\n- [1.6.0](/dotnet/docs/reference/Google.Cloud.OsConfig.V1/1.6.0/Google.Cloud.OsConfig.V1.OSPolicy.Types.ResourceGroup)\n- [1.5.0](/dotnet/docs/reference/Google.Cloud.OsConfig.V1/1.5.0/Google.Cloud.OsConfig.V1.OSPolicy.Types.ResourceGroup)\n- [1.4.0](/dotnet/docs/reference/Google.Cloud.OsConfig.V1/1.4.0/Google.Cloud.OsConfig.V1.OSPolicy.Types.ResourceGroup)\n- [1.3.0](/dotnet/docs/reference/Google.Cloud.OsConfig.V1/1.3.0/Google.Cloud.OsConfig.V1.OSPolicy.Types.ResourceGroup) \n\n public sealed class OSPolicy.Types.ResourceGroup : IMessage\u003cOSPolicy.Types.ResourceGroup\u003e, IEquatable\u003cOSPolicy.Types.ResourceGroup\u003e, IDeepCloneable\u003cOSPolicy.Types.ResourceGroup\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Google Cloud OS Config v1 API class OSPolicy.Types.ResourceGroup.\n\nResource groups provide a mechanism to group OS policy resources.\n\nResource groups enable OS policy authors to create a single OS policy\nto be applied to VMs running different operating Systems.\n\nWhen the OS policy is applied to a target VM, the appropriate resource\ngroup within the OS policy is selected based on the `OSFilter` specified\nwithin the resource group. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e OSPolicy.Types.ResourceGroup \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[OSPolicy](/dotnet/docs/reference/Google.Cloud.OsConfig.V1/latest/Google.Cloud.OsConfig.V1.OSPolicy)[Types](/dotnet/docs/reference/Google.Cloud.OsConfig.V1/latest/Google.Cloud.OsConfig.V1.OSPolicy.Types)[ResourceGroup](/dotnet/docs/reference/Google.Cloud.OsConfig.V1/latest/Google.Cloud.OsConfig.V1.OSPolicy.Types.ResourceGroup), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[OSPolicy](/dotnet/docs/reference/Google.Cloud.OsConfig.V1/latest/Google.Cloud.OsConfig.V1.OSPolicy)[Types](/dotnet/docs/reference/Google.Cloud.OsConfig.V1/latest/Google.Cloud.OsConfig.V1.OSPolicy.Types)[ResourceGroup](/dotnet/docs/reference/Google.Cloud.OsConfig.V1/latest/Google.Cloud.OsConfig.V1.OSPolicy.Types.ResourceGroup), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[OSPolicy](/dotnet/docs/reference/Google.Cloud.OsConfig.V1/latest/Google.Cloud.OsConfig.V1.OSPolicy)[Types](/dotnet/docs/reference/Google.Cloud.OsConfig.V1/latest/Google.Cloud.OsConfig.V1.OSPolicy.Types)[ResourceGroup](/dotnet/docs/reference/Google.Cloud.OsConfig.V1/latest/Google.Cloud.OsConfig.V1.OSPolicy.Types.ResourceGroup), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html) \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.OsConfig.V1](/dotnet/docs/reference/Google.Cloud.OsConfig.V1/latest/Google.Cloud.OsConfig.V1)\n\nAssembly\n--------\n\nGoogle.Cloud.OsConfig.V1.dll\n\nConstructors\n------------\n\n### ResourceGroup()\n\n public ResourceGroup()\n\n### ResourceGroup(ResourceGroup)\n\n public ResourceGroup(OSPolicy.Types.ResourceGroup other)\n\nProperties\n----------\n\n### InventoryFilters\n\n public RepeatedField\u003cOSPolicy.Types.InventoryFilter\u003e InventoryFilters { get; }\n\nList of inventory filters for the resource group.\n\nThe resources in this resource group are applied to the target VM if it\nsatisfies at least one of the following inventory filters.\n\nFor example, to apply this resource group to VMs running either `RHEL` or\n`CentOS` operating systems, specify 2 items for the list with following\nvalues:\ninventory_filters\\[0\\].os_short_name='rhel' and\ninventory_filters\\[1\\].os_short_name='centos'\n\nIf the list is empty, this resource group will be applied to the target\nVM unconditionally.\n\n### Resources\n\n public RepeatedField\u003cOSPolicy.Types.Resource\u003e Resources { get; }\n\nRequired. List of resources configured for this resource group.\nThe resources are executed in the exact order specified here."]]