Method: projects.zones.instances.lookupEffectiveGuestPolicy

Lookup the effective guest policy that applies to a VM instance. This lookup merges all policies that are assigned to the instance ancestry.

HTTP request

POST https://osconfig.googleapis.com/v1beta/{instance=projects/*/zones/*/instances/*}:lookupEffectiveGuestPolicy

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
instance

string

Required. The VM instance whose policies are being looked up.

Request body

The request body contains data with the following structure:

JSON representation
{
  "osShortName": string,
  "osVersion": string,
  "osArchitecture": string
}
Fields
osShortName

string

Short name of the OS running on the instance. The OS Config agent only provides this field for targeting if OS Inventory is enabled for that instance.

osVersion

string

Version of the OS running on the instance. The OS Config agent only provides this field for targeting if OS Inventory is enabled for that VM instance.

osArchitecture

string

Architecture of OS running on the instance. The OS Config agent only provides this field for targeting if OS Inventory is enabled for that instance.

Response body

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

The effective guest policy that applies to a VM instance.

JSON representation
{
  "packages": [
    {
      object (SourcedPackage)
    }
  ],
  "packageRepositories": [
    {
      object (SourcedPackageRepository)
    }
  ],
  "softwareRecipes": [
    {
      object (SourcedSoftwareRecipe)
    }
  ]
}
Fields
packages[]

object (SourcedPackage)

List of package configurations assigned to the VM instance.

packageRepositories[]

object (SourcedPackageRepository)

List of package repository configurations assigned to the VM instance.

softwareRecipes[]

object (SourcedSoftwareRecipe)

List of recipes assigned to the VM instance.

Authorization Scopes

Requires the following OAuth scope:

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

For more information, see the Authentication Overview.

SourcedPackage

A guest policy package including its source.

JSON representation
{
  "source": string,
  "package": {
    object (Package)
  }
}
Fields
source

string

Name of the guest policy providing this config.

package

object (Package)

A software package to configure on the VM instance.

SourcedPackageRepository

A guest policy package repository including its source.

JSON representation
{
  "source": string,
  "packageRepository": {
    object (PackageRepository)
  }
}
Fields
source

string

Name of the guest policy providing this config.

packageRepository

object (PackageRepository)

A software package repository to configure on the VM instance.

SourcedSoftwareRecipe

A guest policy recipe including its source.

JSON representation
{
  "source": string,
  "softwareRecipe": {
    object (SoftwareRecipe)
  }
}
Fields
source

string

Name of the guest policy providing this config.

softwareRecipe

object (SoftwareRecipe)

A software recipe to configure on the VM instance.