Reference documentation and code samples for the Google Cloud OsConfig V1 Client class 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 theOSFilterspecified
within the resource group.
Generated from protobuf messagegoogle.cloud.osconfig.v1.OSPolicy.ResourceGroup
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 eitherRHELorCentOSoperating 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.
Required. List of resources configured for this resource group. The resources are executed in the exact order specified here.
getInventoryFilters
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 eitherRHELorCentOSoperating 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.
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 eitherRHELorCentOSoperating 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"]],[["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-09-04 UTC."],[],[],null,["# Google Cloud OsConfig V1 Client - Class ResourceGroup (2.1.0)\n\nVersion latestkeyboard_arrow_down\n\n- [2.1.0 (latest)](/php/docs/reference/cloud-osconfig/latest/V1.OSPolicy.ResourceGroup)\n- [2.0.5](/php/docs/reference/cloud-osconfig/2.0.5/V1.OSPolicy.ResourceGroup)\n- [1.3.5](/php/docs/reference/cloud-osconfig/1.3.5/V1.OSPolicy.ResourceGroup)\n- [1.2.2](/php/docs/reference/cloud-osconfig/1.2.2/V1.OSPolicy.ResourceGroup)\n- [1.1.1](/php/docs/reference/cloud-osconfig/1.1.1/V1.OSPolicy.ResourceGroup)\n- [1.0.5](/php/docs/reference/cloud-osconfig/1.0.5/V1.OSPolicy.ResourceGroup) \nReference documentation and code samples for the Google Cloud OsConfig V1 Client class 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.\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\nGenerated from protobuf message `google.cloud.osconfig.v1.OSPolicy.ResourceGroup`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ OsConfig \\\\ V1 \\\\ OSPolicy\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getInventoryFilters\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.\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'\nIf the list is empty, this resource group will be applied to the target\nVM unconditionally.\n\n### setInventoryFilters\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.\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'\nIf the list is empty, this resource group will be applied to the target\nVM unconditionally.\n\n### getResources\n\nRequired. List of resources configured for this resource group.\n\nThe resources are executed in the exact order specified here.\n\n### setResources\n\nRequired. List of resources configured for this resource group.\n\nThe resources are executed in the exact order specified here."]]