- [HTTP request](https://docs.cloud.google.com/compute/docs/reference/rest/beta/zoneVmExtensionPolicies/get#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/compute/docs/reference/rest/beta/zoneVmExtensionPolicies/get#body.PATH_PARAMETERS)
- [Request body](https://docs.cloud.google.com/compute/docs/reference/rest/beta/zoneVmExtensionPolicies/get#body.request_body)
- [Response body](https://docs.cloud.google.com/compute/docs/reference/rest/beta/zoneVmExtensionPolicies/get#body.response_body)
  - [JSON representation](https://docs.cloud.google.com/compute/docs/reference/rest/beta/zoneVmExtensionPolicies/get#body.VmExtensionPolicy.SCHEMA_REPRESENTATION)
    - [JSON representation](https://docs.cloud.google.com/compute/docs/reference/rest/beta/zoneVmExtensionPolicies/get#body.VmExtensionPolicy.SCHEMA_REPRESENTATION.instance_selectors.SCHEMA_REPRESENTATION)
- [Authorization scopes](https://docs.cloud.google.com/compute/docs/reference/rest/beta/zoneVmExtensionPolicies/get#body.aspect)
- [IAM Permissions](https://docs.cloud.google.com/compute/docs/reference/rest/beta/zoneVmExtensionPolicies/get#body.aspect_1)
- [Try it!](https://docs.cloud.google.com/compute/docs/reference/rest/beta/zoneVmExtensionPolicies/get#try-it)

Retrieves details of a specific zone VM extension policy within a project.

### HTTP request

Choose an endpoint:
global africa-south1 asia-east1 asia-east2 asia-northeast1 asia-northeast2 asia-northeast3 asia-south1 asia-south2 asia-southeast1 asia-southeast2 asia-southeast3 australia-southeast1 australia-southeast2 europe-central2 europe-north1 europe-north2 europe-southwest1 europe-west1 europe-west10 europe-west12 europe-west2 europe-west3 europe-west4 europe-west6 europe-west8 europe-west9 me-central1 me-central2 me-west1 northamerica-northeast1 northamerica-northeast2 northamerica-south1 southamerica-east1 southamerica-west1 us-central1 us-east1 us-east4 us-east5 us-south1 us-west1 us-west2 us-west3 us-west4   
`GET https://compute.googleapis.com/compute/beta/projects/{project}/zones/{zone}/vmExtensionPolicies/{vmExtensionPolicy}`

<br />

The URLs use [gRPC Transcoding](https://google.aip.dev/127) syntax.

### 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. Always `compute#vmExtensionPolicy`. |
| `id` | `string (https://developers.google.com/discovery/v1/type-format format)` Output only. The unique identifier for the resource. This identifier is defined by the server. |
| `creationTimestamp` | `string` Output only. Creation timestamp in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. |
| `updateTimestamp` | `string` Output only. zoneVmExtensionPolicies.update timestamp in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) 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 with [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). 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 (for example, "ops-agent") 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 match *any* 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 the `inclusionLabels` 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 most 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 the [Authentication Overview](https://docs.cloud.google.com/docs/authentication#authorization-gcp).

### IAM Permissions

In addition to any permissions specified on the fields above, authorization requires one or more of the following [IAM](https://cloud.google.com/iam/docs/) permissions:

- `compute.vmExtensionPolicies.get`

To find predefined roles that contain those permissions, see [Compute Engine IAM Roles](https://docs.cloud.google.com/compute/docs/access/iam).