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)

Base level operating system information for the VM.

items

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

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. A 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)
  },
  "windowsApplication": {
    object (WindowsApplication)
  }
  // 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.

windowsApplication

object (WindowsApplication)

Details of Windows Application.

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 taken from Windows Update API IUpdate Interface: https://docs.microsoft.com/en-us/windows/win32/api/_wua/ Descriptive fields like title, and description are localized based on the locale of the VM being updated.

JSON representation
{
  "title": string,
  "description": string,
  "categories": [
    {
      object (WindowsUpdateCategory)
    }
  ],
  "kbArticleIds": [
    string
  ],
  "supportUrl": string,
  "moreInfoUrls": [
    string
  ],
  "updateId": string,
  "revisionNumber": integer,
  "lastDeploymentChangeTime": string
}
Fields
title

string

The localized title of the update package.

description

string

The localized description of the update package.

categories[]

object (WindowsUpdateCategory)

The categories that are associated with this update package.

kbArticleIds[]

string

A collection of Microsoft Knowledge Base article IDs that are associated with the update package.

supportUrl

string

A hyperlink to the language-specific support information for the update.

moreInfoUrls[]

string

A collection of URLs that provide more information about the update package.

updateId

string

Gets the identifier of an update package. Stays the same across revisions.

revisionNumber

integer

The revision number of this update package.

lastDeploymentChangeTime

string (Timestamp format)

The last published date of the update, in (UTC) date and time.

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".

WindowsUpdateCategory

Categories specified by the Windows Update.

JSON representation
{
  "id": string,
  "name": string
}
Fields
id

string

The identifier of the windows update category.

name

string

The name of the windows update category.

WindowsQuickFixEngineeringPackage

Information related to a Quick Fix Engineering package. Fields are taken from Windows QuickFixEngineering Interface and match the source names: https://docs.microsoft.com/en-us/windows/win32/cimwin32prov/win32-quickfixengineering

JSON representation
{
  "caption": string,
  "description": string,
  "hotFixId": string,
  "installTime": string
}
Fields
caption

string

A short textual description of the QFE update.

description

string

A textual description of the QFE update.

hotFixId

string

Unique identifier associated with a particular QFE update.

installTime

string (Timestamp format)

Date that the QFE update was installed. Mapped from installed_on field.

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".

WindowsApplication

Contains information about a Windows application that is retrieved from the Windows Registry. For more information about these fields, see: https://docs.microsoft.com/en-us/windows/win32/msi/uninstall-registry-key

JSON representation
{
  "displayName": string,
  "displayVersion": string,
  "publisher": string,
  "installDate": {
    object (Date)
  },
  "helpLink": string
}
Fields
displayName

string

The name of the application or product.

displayVersion

string

The version of the product or application in string format.

publisher

string

The name of the manufacturer for the product or application.

installDate

object (Date)

The last time this product received service. The value of this property is replaced each time a patch is applied or removed from the product or the command-line option is used to repair the product.

Methods

get

Get inventory data for the specified VM instance.

list

List inventory data for all VM instances in the specified zone.