Reference documentation and code samples for the Google Cloud OsConfig V1 Client class InventoryFilter.
Filtering criteria to select VMs based on inventory details.
Generated from protobuf messagegoogle.cloud.osconfig.v1.OSPolicy.InventoryFilter
Namespace
Google \ Cloud \ OsConfig \ V1 \ OSPolicy
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ os_short_name
string
Required. The OS short name
↳ os_version
string
The OS version Prefix matches are supported if asterisk() is provided as the last character. For example, to match all versions with a major version of7, specify the following value for this field `7.` An empty string matches all OS versions.
getOsShortName
Required. The OS short name
Returns
Type
Description
string
setOsShortName
Required. The OS short name
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getOsVersion
The OS version
Prefix matches are supported if asterisk() is provided as the
last character. For example, to match all versions with a major
version of7, specify the following value for this field `7.`
An empty string matches all OS versions.
Returns
Type
Description
string
setOsVersion
The OS version
Prefix matches are supported if asterisk() is provided as the
last character. For example, to match all versions with a major
version of7, specify the following value for this field `7.`
An empty string matches all OS versions.
[[["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 InventoryFilter (2.1.0)\n\nVersion latestkeyboard_arrow_down\n\n- [2.1.0 (latest)](/php/docs/reference/cloud-osconfig/latest/V1.OSPolicy.InventoryFilter)\n- [2.0.5](/php/docs/reference/cloud-osconfig/2.0.5/V1.OSPolicy.InventoryFilter)\n- [1.3.5](/php/docs/reference/cloud-osconfig/1.3.5/V1.OSPolicy.InventoryFilter)\n- [1.2.2](/php/docs/reference/cloud-osconfig/1.2.2/V1.OSPolicy.InventoryFilter)\n- [1.1.1](/php/docs/reference/cloud-osconfig/1.1.1/V1.OSPolicy.InventoryFilter)\n- [1.0.5](/php/docs/reference/cloud-osconfig/1.0.5/V1.OSPolicy.InventoryFilter) \nReference documentation and code samples for the Google Cloud OsConfig V1 Client class InventoryFilter.\n\nFiltering criteria to select VMs based on inventory details.\n\nGenerated from protobuf message `google.cloud.osconfig.v1.OSPolicy.InventoryFilter`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ OsConfig \\\\ V1 \\\\ OSPolicy\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getOsShortName\n\nRequired. The OS short name\n\n### setOsShortName\n\nRequired. The OS short name\n\n### getOsVersion\n\nThe OS version\nPrefix matches are supported if asterisk(*) is provided as the\nlast character. For example, to match all versions with a major\nversion of `7`, specify the following value for this field \\`7.*\\`\nAn empty string matches all OS versions.\n\n### setOsVersion\n\nThe OS version\nPrefix matches are supported if asterisk(*) is provided as the\nlast character. For example, to match all versions with a major\nversion of `7`, specify the following value for this field \\`7.*\\`\nAn empty string matches all OS versions."]]