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 v1alpha 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-07 UTC."],[[["\u003cp\u003e\u003ccode\u003eOSPolicy.Types.ResourceGroup\u003c/code\u003e is a class within the Google Cloud OS Config v1alpha API that allows grouping of OS policy resources.\u003c/p\u003e\n"],["\u003cp\u003eResource groups enable the creation of a single OS policy that can be applied to VMs with different operating systems.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eInventoryFilters\u003c/code\u003e property determines which VMs receive a specific resource group, and if empty, the resource group will apply unconditionally.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eResources\u003c/code\u003e property within a resource group defines a list of resources that are executed in a specific order.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eOSFilter\u003c/code\u003e property is now deprecated, and \u003ccode\u003eInventoryFilters\u003c/code\u003e should be used in its stead.\u003c/p\u003e\n"]]],[],null,["# Google Cloud OS Config v1alpha API - Class OSPolicy.Types.ResourceGroup (2.0.0-alpha06)\n\nVersion latestkeyboard_arrow_down\n\n- [2.0.0-alpha06 (latest)](/dotnet/docs/reference/Google.Cloud.OsConfig.V1Alpha/latest/Google.Cloud.OsConfig.V1Alpha.OSPolicy.Types.ResourceGroup)\n- [2.0.0-alpha05](/dotnet/docs/reference/Google.Cloud.OsConfig.V1Alpha/2.0.0-alpha05/Google.Cloud.OsConfig.V1Alpha.OSPolicy.Types.ResourceGroup)\n- [1.0.0-alpha04](/dotnet/docs/reference/Google.Cloud.OsConfig.V1Alpha/1.0.0-alpha04/Google.Cloud.OsConfig.V1Alpha.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 v1alpha 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.V1Alpha/latest/Google.Cloud.OsConfig.V1Alpha.OSPolicy)[Types](/dotnet/docs/reference/Google.Cloud.OsConfig.V1Alpha/latest/Google.Cloud.OsConfig.V1Alpha.OSPolicy.Types)[ResourceGroup](/dotnet/docs/reference/Google.Cloud.OsConfig.V1Alpha/latest/Google.Cloud.OsConfig.V1Alpha.OSPolicy.Types.ResourceGroup), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[OSPolicy](/dotnet/docs/reference/Google.Cloud.OsConfig.V1Alpha/latest/Google.Cloud.OsConfig.V1Alpha.OSPolicy)[Types](/dotnet/docs/reference/Google.Cloud.OsConfig.V1Alpha/latest/Google.Cloud.OsConfig.V1Alpha.OSPolicy.Types)[ResourceGroup](/dotnet/docs/reference/Google.Cloud.OsConfig.V1Alpha/latest/Google.Cloud.OsConfig.V1Alpha.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.V1Alpha/latest/Google.Cloud.OsConfig.V1Alpha.OSPolicy)[Types](/dotnet/docs/reference/Google.Cloud.OsConfig.V1Alpha/latest/Google.Cloud.OsConfig.V1Alpha.OSPolicy.Types)[ResourceGroup](/dotnet/docs/reference/Google.Cloud.OsConfig.V1Alpha/latest/Google.Cloud.OsConfig.V1Alpha.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.V1Alpha](/dotnet/docs/reference/Google.Cloud.OsConfig.V1Alpha/latest/Google.Cloud.OsConfig.V1Alpha)\n\nAssembly\n--------\n\nGoogle.Cloud.OsConfig.V1Alpha.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### OsFilter\n\n [Obsolete]\n public OSPolicy.Types.OSFilter OsFilter { get; set; }\n\nDeprecated. Use the `inventory_filters` field instead.\nUsed to specify the OS filter for a resource group\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."]]