Method: projects.locations.instances.inventories.list

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

HTTP request

GET https://osconfig.googleapis.com/v1/{parent=projects/*/locations/*/instances/*}/inventories

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
parent

string

Required. The parent resource name.

Format: projects/{project}/locations/{location}/instances/-

For {project}, either project-number or project-id can be provided.

Query parameters

Parameters
view

enum (InventoryView)

Inventory view indicating what information should be included in the inventory resource. If unspecified, the default view is BASIC.

pageSize

integer

The maximum number of results to return.

pageToken

string

A pagination token returned from a previous call to inventories.list that indicates where this listing should continue from.

filter

string

If provided, this field specifies the criteria that must be met by a Inventory API resource to be included in the response.

Request body

The request body must be empty.

Response body

A response message for listing inventory data for all VMs in a specified location.

If successful, the response body contains data with the following structure:

JSON representation
{
  "inventories": [
    {
      object (Inventory)
    }
  ],
  "nextPageToken": string
}
Fields
inventories[]

object (Inventory)

List of inventory objects.

nextPageToken

string

The pagination token to retrieve the next page of inventory objects.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

IAM Permissions

Requires the following IAM permission on the parent resource:

  • osconfig.inventories.list

For more information, see the IAM documentation.