REST Resource: projects.locations.instances.inventories

Resource: Inventory

This API resource represents the available inventory data for a Compute Engine virtual machine (VM) instance at a given point in time.

You can use this API resource to determine the inventory data of your VM.

For more information, see Information provided by OS inventory management.

JSON representation
{
  "name": string,
  "osInfo": {
    object (OsInfo)
  },
  "items": {
    string: {
      object (Item)
    },
    ...
  },
  "updateTime": string
}
Fields
name

string

Output only. The Inventory API resource name.

Format: projects/{project_number}/locations/{location}/instances/{instance_id}/inventory

osInfo

object (OsInfo)

Output only. Base level operating system information for the VM.

items

map (key: string, value: object (Item))

Output only. Inventory items related to the VM keyed by an opaque unique identifier for each inventory item. The identifier is unique to each distinct and addressable inventory item and will change, when there is a new package version.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

updateTime

string (Timestamp format)

Output only. Timestamp of the last reported inventory for the VM.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

OsInfo

Operating system information for the VM.

JSON representation
{
  "hostname": string,
  "longName": string,
  "shortName": string,
  "version": string,
  "architecture": string,
  "kernelVersion": string,
  "kernelRelease": string,
  "osconfigAgentVersion": string
}
Fields
hostname

string

The VM hostname.

longName

string

The operating system long name. For example 'Debian GNU/Linux 9' or 'Microsoft Window Server 2019 Datacenter'.

shortName

string

The operating system short name. For example, 'windows' or 'debian'.

version

string

The version of the operating system.

architecture

string

The system architecture of the operating system.

kernelVersion

string

The kernel version of the operating system.

kernelRelease

string

The kernel release of the operating system.

osconfigAgentVersion

string

The current version of the OS Config agent running on the VM.

Item

A single piece of inventory on a VM.

JSON representation
{
  "id": string,
  "originType": enum (OriginType),
  "createTime": string,
  "updateTime": string,
  "type": enum (Type),

  // Union field details can be only one of the following:
  "installedPackage": {
    object (SoftwarePackage)
  },
  "availablePackage": {
    object (SoftwarePackage)
  }
  // End of list of possible types for union field details.
}
Fields
id

string

Identifier for this item, unique across items for this VM.

originType

enum (OriginType)

The origin of this inventory item.

createTime

string (Timestamp format)

When this inventory item was first detected.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

updateTime

string (Timestamp format)

When this inventory item was last modified.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

type

enum (Type)

The specific type of inventory, correlating to its specific details.

Union field details. Specific details of this inventory item based on its type. details can be only one of the following:
installedPackage

object (SoftwarePackage)

Software package present on the VM instance.

availablePackage

object (SoftwarePackage)

Software package available to be installed on the VM instance.

OriginType

The origin of a specific inventory item.

Enums
ORIGIN_TYPE_UNSPECIFIED Invalid. An origin type must be specified.
INVENTORY_REPORT This inventory item was discovered as the result of the agent reporting inventory via the reporting API.

Type

The different types of inventory that are tracked on a VM.

Enums
TYPE_UNSPECIFIED Invalid. An type must be specified.
INSTALLED_PACKAGE This represents a package that is installed on the VM.
AVAILABLE_PACKAGE This represents an update that is available for a package.

SoftwarePackage

Software package information of the operating system.

JSON representation
{

  // Union field details can be only one of the following:
  "yumPackage": {
    object (VersionedPackage)
  },
  "aptPackage": {
    object (VersionedPackage)
  },
  "zypperPackage": {
    object (VersionedPackage)
  },
  "googetPackage": {
    object (VersionedPackage)
  },
  "zypperPatch": {
    object (ZypperPatch)
  },
  "wuaPackage": {
    object (WindowsUpdatePackage)
  },
  "qfePackage": {
    object (WindowsQuickFixEngineeringPackage)
  },
  "cosPackage": {
    object (VersionedPackage)
  }
  // End of list of possible types for union field details.
}
Fields
Union field details. Information about the different types of software packages. details can be only one of the following:
yumPackage

object (VersionedPackage)

Yum package info. For details about the yum package manager, see https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/deployment_guide/ch-yum.

aptPackage

object (VersionedPackage)

Details of an APT package. For details about the apt package manager, see https://wiki.debian.org/Apt.

zypperPackage

object (VersionedPackage)

Details of a Zypper package. For details about the Zypper package manager, see https://en.opensuse.org/SDB:Zypper_manual.

googetPackage

object (VersionedPackage)

Details of a Googet package. For details about the googet package manager, see https://github.com/google/googet.

zypperPatch

object (ZypperPatch)

Details of a Zypper patch. For details about the Zypper package manager, see https://en.opensuse.org/SDB:Zypper_manual.

wuaPackage

object (WindowsUpdatePackage)

Details of a Windows Update package. See https://docs.microsoft.com/en-us/windows/win32/api/_wua/ for information about Windows Update.

qfePackage

object (WindowsQuickFixEngineeringPackage)

Details of a Windows Quick Fix engineering package. See https://docs.microsoft.com/en-us/windows/win32/cimwin32prov/win32-quickfixengineering for info in Windows Quick Fix Engineering.

cosPackage

object (VersionedPackage)

Details of a COS package.

VersionedPackage

Information related to the a standard versioned package. This includes package info for APT, Yum, Zypper, and Googet package managers.

JSON representation
{
  "packageName": string,
  "architecture": string,
  "version": string
}
Fields
packageName

string

The name of the package.

architecture

string

The system architecture this package is intended for.

version

string

The version of the package.

ZypperPatch

Details related to a Zypper Patch.

JSON representation
{
  "patchName": string,
  "category": string,
  "severity": string,
  "summary": string
}
Fields
patchName

string

The name of the patch.

category

string

The category of the patch.

severity

string

The severity specified for this patch

summary

string

Any summary information provided about this patch.

WindowsUpdatePackage

Details related to a Windows Update package. Field data and names are