Reference documentation and code samples for the Google Cloud OsConfig V1 Client class GetInventoryRequest.
A request message for getting inventory data for the specified VM.
Generated from protobuf messagegoogle.cloud.osconfig.v1.GetInventoryRequest
Namespace
Google \ Cloud \ OsConfig \ V1
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ name
string
Required. API resource name for inventory resource. Format:projects/{project}/locations/{location}/instances/{instance}/inventoryFor{project}, eitherproject-numberorproject-idcan be provided. For{instance}, either Compute Engineinstance-idorinstance-namecan be provided.
↳ view
int
Inventory view indicating what information should be included in the inventory resource. If unspecified, the default view is BASIC.
getName
Required. API resource name for inventory resource.
Format:projects/{project}/locations/{location}/instances/{instance}/inventoryFor{project}, eitherproject-numberorproject-idcan be provided.
For{instance}, either Compute Engineinstance-idorinstance-namecan be provided.
Returns
Type
Description
string
setName
Required. API resource name for inventory resource.
Format:projects/{project}/locations/{location}/instances/{instance}/inventoryFor{project}, eitherproject-numberorproject-idcan be provided.
For{instance}, either Compute Engineinstance-idorinstance-namecan be provided.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getView
Inventory view indicating what information should be included in the
inventory resource. If unspecified, the default view is BASIC.
Returns
Type
Description
int
setView
Inventory view indicating what information should be included in the
inventory resource. If unspecified, the default view is BASIC.
Parameter
Name
Description
var
int
Returns
Type
Description
$this
static::build
Parameter
Name
Description
name
string
Required. API resource name for inventory resource.
For{project}, eitherproject-numberorproject-idcan be provided.
For{instance}, either Compute Engineinstance-idorinstance-namecan be provided. Please seeOsConfigZonalServiceClient::inventoryName()for help formatting this field.
[[["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 GetInventoryRequest (2.1.0)\n\nVersion latestkeyboard_arrow_down\n\n- [2.1.0 (latest)](/php/docs/reference/cloud-osconfig/latest/V1.GetInventoryRequest)\n- [2.0.5](/php/docs/reference/cloud-osconfig/2.0.5/V1.GetInventoryRequest)\n- [1.3.5](/php/docs/reference/cloud-osconfig/1.3.5/V1.GetInventoryRequest)\n- [1.2.2](/php/docs/reference/cloud-osconfig/1.2.2/V1.GetInventoryRequest)\n- [1.1.1](/php/docs/reference/cloud-osconfig/1.1.1/V1.GetInventoryRequest)\n- [1.0.5](/php/docs/reference/cloud-osconfig/1.0.5/V1.GetInventoryRequest) \nReference documentation and code samples for the Google Cloud OsConfig V1 Client class GetInventoryRequest.\n\nA request message for getting inventory data for the specified VM.\n\nGenerated from protobuf message `google.cloud.osconfig.v1.GetInventoryRequest`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ OsConfig \\\\ V1\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getName\n\nRequired. API resource name for inventory resource.\n\nFormat:\n`projects/{project}/locations/{location}/instances/{instance}/inventory`\nFor `{project}`, either `project-number` or `project-id` can be provided.\nFor `{instance}`, either Compute Engine `instance-id` or `instance-name`\ncan be provided.\n\n### setName\n\nRequired. API resource name for inventory resource.\n\nFormat:\n`projects/{project}/locations/{location}/instances/{instance}/inventory`\nFor `{project}`, either `project-number` or `project-id` can be provided.\nFor `{instance}`, either Compute Engine `instance-id` or `instance-name`\ncan be provided.\n\n### getView\n\nInventory view indicating what information should be included in the\ninventory resource. If unspecified, the default view is BASIC.\n\n### setView\n\nInventory view indicating what information should be included in the\ninventory resource. If unspecified, the default view is BASIC.\n\n### static::build"]]