Method: zoneVmExtensionPolicies.get

Retrieves details of a specific zone VM extension policy.

HTTP request

GET https://compute.googleapis.com/compute/beta/projects/{project}/zones/{zone}/vmExtensionPolicies/{vmExtensionPolicy}

The URL usesgRPC Transcoding syntax. To know more about valid error responses that can be thrown by this HTTP request, please refer to theservice error catalog

Path parameters

Parameters
project

string

Project ID for this request.

zone

string

Name of the zone for this request.

vmExtensionPolicy

string

Name of the VM extension policy resource to return.

Request body

The request body must be empty.

Response body

Represents a VM extension policy.

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

JSON representation
{"kind":string,"id":string,"creationTimestamp":string,"updateTimestamp":string,"name":string,"description":string,"selfLink":string,"selfLinkWithId":string,"extensionPolicies":{string:{"stringConfig":string,"pinnedVersion":string},...},"instanceSelectors":[{"labelSelector":{"inclusionLabels":{string:string,...}}}],"priority":integer,"managedByGlobal":boolean,"globalResourceLink":string,"state":enum}
Fields
kind

string

[Output Only] Type of the resource. Alwayscompute#vmExtensionPolicy.

id

string (uint64 format)

[Output Only] The unique identifier for the resource. This identifier is defined by the server.

creationTimestamp

string

[Output Only] Creation timestamp inRFC3339 text format.

updateTimestamp

string

[Output Only] zoneVmExtensionPolicies.update timestamp inRFC3339 text format.

name

string

Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression[a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.

description

string

An optional description of this resource.

selfLink

string

[Output Only] Server-defined fully-qualified URL for this resource.

selfLinkWithId

string

[Output Only] Server-defined URL for this resource's resource id.

extensionPolicies[]

map (key: string, value: object)

Required. A map of extension names (e.g., "cloudops") to their corresponding policy configurations.

extensionPolicies[].stringConfig

string

Optional. String-based configuration data for the extension.

extensionPolicies[].pinnedVersion

string

Optional. The specific version of the extension to install. If not set, the latest version is used.

instanceSelectors[]

object

Optional. Selectors to target VMs for this policy. VMs are selected if they matchany of the provided selectors (logical OR). If this list is empty, the policy applies to all VMs.

instanceSelectors[].labelSelector

object

Optional. LabelSelector selects VMs based on their labels.

instanceSelectors[].labelSelector.inclusionLabels

map (key: string, value: string)

Optional. A map of key-value pairs representing VM labels. VMs must have all of the labels specified in this map to be selected (logical AND).

e.g. If theinclusionLabels are {("key1", "value1"), ("key2", "value2")}, the VM labels must contain both ("key1", "value1") and ("key2", "value2") to be selected. If the VM labels are ("key1", "value1") and ("something", "else"), it will not be selected.

If the map is empty, it's considered a match.

priority

integer

Optional. Priority of this policy. Used to resolve conflicts when multiple policies apply to the same extension. The policy priority is an integer from 0 to 65535, inclusive. Lower integers indicate higher priorities. If you do not specify a priority when creating a rule, it is assigned a priority of 1000. If priorities are equal, the policy with the more recent creation timestamp takes precedence.

managedByGlobal

boolean

Optional. [Output Only] Indicates if this policy is managed by a global policy.

globalResourceLink

string

Optional. [Output Only] Link to the global policy that manages this zone policy, if applicable.

state

enum

Optional. [Output Only] Current state of the policy: ACTIVE or DELETING.

Authorization scopes

Requires one of the following OAuth scopes:

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

For more information, see theAuthentication Overview.

IAM Permissions

In addition to any permissions specified on the fields above, authorization requires one or more of the followingIAM permissions:

  • compute.vmExtensionPolicies.get

To find predefined roles that contain those permissions, seeCompute Engine IAM Roles.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-10-30 UTC.