Use the Compute Engine alpha API

This document explains how to enable your project to send HTTP requests to alphaCompute Engine API URIs. If you're new to the Compute Engine API, then seePrerequisites.

By default, your project can't send HTTP requests to the following alphaCompute Engine API URI:

https://compute.googleapis.com/compute/alpha/...

Google Cloud manages access to alpha URIs for specific Compute Enginefeatures. You must first allow your organization, folder, or project to accessand use alpha features. After this step, you can view which features areavailable, and then enable a project to send HTTP requests to their alpha URIs.Use Compute Engine alpha features to test and develop with early-stagefeatures before they're available inPreview.

Caution: Compute Engine alpha features are experimental. Using themmight result in breaking changes. For more information, see thePre-GA offering service terms.

Before you begin

Required roles

To get the permissions that you need to enable or disable projects to send HTTP requests to alpha Compute Engine API URIs, ask your administrator to grant you the following IAM roles:

For more information about granting roles, seeManage access to projects, folders, and organizations.

These predefined roles contain the permissions required to enable or disable projects to send HTTP requests to alpha Compute Engine API URIs. To see the exact permissions that are required, expand theRequired permissions section:

Required permissions

The following permissions are required to enable or disable projects to send HTTP requests to alpha Compute Engine API URIs:

  • To edit organization policies: orgpolicy.policy.set on the organization, folder, or project
  • To enable or disable access to an alpha Compute Engine API URI for a project: compute.previewFeatures.update on the project
  • To view available alpha features: compute.previewFeatures.get on the project

You might also be able to get these permissions withcustom roles or otherpredefined roles.

Allow access to alpha features

Before you can use Compute Engine alpha features with REST, you mustenable theBlock Compute Engine preview features(compute.managed.blockPreviewFeatures) policy in your organization, folder, orproject. This policy change allows your project, or the projects within yourorganization or folder, to access and use alpha features.

To allow your organization, folder, or project to access alpha features withREST, select one of the following options:

Console

  1. In the Google Cloud console, go to theOrganization policies page.

    Go to Organization policies

  2. If you haven't already, from the project picker, select theorganization, folder, or project where you want to edit the policy.

  3. In theName column, clickBlock Compute Engine preview features. ThePolicy details page appears.

  4. ClickManage policy. TheEdit policy page appears.

  5. In thePolicy source section, selectOverride parent's policy.

  6. In theRules section, clickAdd rule, and then do the following:

    1. In theEnforcement section, selectOn.

    2. In the row containing theallowedPreviewFeatures parameter,clickEdit. TheEdit parameter values pane appears.

    3. In theValue type section, selectUser-defined.

    4. In theUser-defined values section, enteralpha-api-access.

    5. ClickSave.

  7. ClickSet policy. Then, in the dialog that appears, clickSet policy again.

The policy change can take up to 15 minutes to propagate.

gcloud

  1. To download thecompute.managed.blockPreviewFeatures policy as a filenamedpolicy.yaml, use thegcloud org-policies describe commandwith one of the following flags:

    • To enable the policy in your organization, include the--organization flag:

      gcloud org-policies describe compute.managed.blockPreviewFeatures --organization=ORGANIZATION_ID > policy.yaml
    • To enable the policy in your folder, include the--folder flag:

      gcloud org-policies describe compute.managed.blockPreviewFeatures --folder=FOLDER_ID > policy.yaml
    • To enable the policy in your project, include the--project flag:

      gcloud org-policies describe compute.managed.blockPreviewFeatures --project=PROJECT_ID > policy.yaml

    Replace the following:

  2. Open thepolicy.yaml file using a text editor. In the file, after therules field, add theenforce field set totrue. For example, ifyou're enabling the policy in your organization, yourpolicy.yamlentry is as follows:

    name:organizations/ORGANIZATION_ID/policies/compute.managed.blockPreviewFeaturesspec:rules:-enforce:true
  3. Save thepolicy.yaml file, and then close the text editor.

  4. To update the policy for your organization, folder, or project, use thegcloud org-policies set-policy command:

    gcloud org-policies set-policy policy.yaml
  5. Optional: To delete thepolicy.yaml file, do one of the following:

    • If you're using the Linux or macOS terminal, then use the followingcommand:

      rm policy.yaml
    • If you're using the Windows terminal, then use the followingcommand:

      del policy.yaml

The policy change can take up to 15 minutes to propagate.

For more information about managing organization policies, seeUsing constraintsin the Resource Manager documentation.

Use alpha features in your project

After you allow your organization, folder, or project access toCompute Engine alpha features, you can enable a project to use thosefeatures by completing the following steps:

  1. View available alpha features

  2. Enable an alpha feature

  3. Optional:View enabled alpha features

View available alpha features

To view which Compute Engine features are available in alpha, select oneof the following options:

Console

In the Google Cloud console, go to thePreview features page.

Go to Preview features

In the table that appears, you can view a list of available alpha features.

gcloud

To view the Compute Engine features available in alpha, use thegcloud compute preview-features list command.

Execute the following command:

Linux, macOS, or Cloud Shell

gcloudcomputepreview-featureslist

Windows (PowerShell)

gcloudcomputepreview-featureslist

Windows (cmd.exe)

gcloudcomputepreview-featureslist

You should receive a response similar to the following:

NAME              STATUSalpha-feature-1   DISABLEDalpha-feature-2   DISABLED

REST

To view the Compute Engine features available in alpha, make aGETrequest to thepreviewFeatures.list method.

Before using any of the request data, make the following replacements:

  • PROJECT_ID: the ID of your project

HTTP method and URL:

GET https://compute.googleapis.com/compute/projects/PROJECT_ID/global/previewFeatures

To send your request, expand one of these options:

curl (Linux, macOS, or Cloud Shell)

Note: The following command assumes that you have logged in to thegcloud CLI with your user account by runninggcloud init orgcloud auth login , or by usingCloud Shell, which automatically logs you into thegcloud CLI . You can check the currently active account by runninggcloud auth list.

Execute the following command:

curl -X GET \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
"https://compute.googleapis.com/compute/projects/PROJECT_ID/global/previewFeatures"

PowerShell (Windows)

Note: The following command assumes that you have logged in to thegcloud CLI with your user account by runninggcloud init orgcloud auth login . You can check the currently active account by runninggcloud auth list.

Execute the following command:

$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }

Invoke-WebRequest `
-Method GET `
-Headers $headers `
-Uri "https://compute.googleapis.com/compute/projects/PROJECT_ID/global/previewFeatures" | Select-Object -Expand Content

You should receive a JSON response similar to the following:

{   "previewFeatures": [    {      "activationStatus": "DISABLED",      "creationTimestamp": "2025-03-01T00:00:00Z",      "description": "Please see status.description for details.",      "id": "560966157",      "name": "alphaFeature1",      "status": {        "description": "Enables access to alpha APIs.",        "helpLink": "some-link",        "releaseStatus": {          "stage": "GA",          "updateDate": {            "day": 1,            "month": 3,            "year": 2025          }        }      }    },    ...  ]}

Enable an alpha feature

To enable your project to send HTTP requests to the alpha URI of aCompute Engine feature, select one of the following options:

Console

  1. In the Google Cloud console, go to thePreview features page.

    Go to Preview features

  2. ClickEnable next to the preview feature you want to enable. Then, in the dialog that appears, clickEnable again.

gcloud

To enable your project to send HTTP requests to the alpha URI of aCompute Engine feature, use thegcloud compute preview-features update commandwith the--activation-status flag set toenabled.

Before using any of the command data below, make the following replacements:

  • FEATURE_NAME: the name of the feature that you want to start using.

Execute the following command:

Linux, macOS, or Cloud Shell

gcloudcomputepreview-featuresupdateFEATURE_NAME\--activation-status=enabled\--rollout-plan=fast-rollout

Windows (PowerShell)

gcloudcomputepreview-featuresupdateFEATURE_NAME`--activation-status=enabled`--rollout-plan=fast-rollout

Windows (cmd.exe)

gcloudcomputepreview-featuresupdateFEATURE_NAME^--activation-status=enabled^--rollout-plan=fast-rollout

You should receive a response similar to the following:

status: DONE

REST

To enable your project to send HTTP requests to the alpha URI of aCompute Engine feature, make aPATCH request to thepreviewFeatures.update method.

Before using any of the request data, make the following replacements:

  • PROJECT_ID: the ID of your project.
  • FEATURE_NAME: the name of the feature that you want to start using.

HTTP method and URL:

PATCH https://compute.googleapis.com/compute/projects/PROJECT_ID/global/previewFeatures/FEATURE_NAME

Request JSON body:

{  "activationStatus": "ENABLED",  "rolloutOperation": {    "rolloutInput": {      "predefinedRolloutPlan": "ROLLOUT_PLAN_FAST_ROLLOUT"    }  }}

To send your request, expand one of these options:

curl (Linux, macOS, or Cloud Shell)

Note: The following command assumes that you have logged in to thegcloud CLI with your user account by runninggcloud init orgcloud auth login , or by usingCloud Shell, which automatically logs you into thegcloud CLI . You can check the currently active account by runninggcloud auth list.

Save the request body in a file namedrequest.json, and execute the following command:

curl -X PATCH \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json; charset=utf-8" \
-d @request.json \
"https://compute.googleapis.com/compute/projects/PROJECT_ID/global/previewFeatures/FEATURE_NAME"

PowerShell (Windows)

Note: The following command assumes that you have logged in to thegcloud CLI with your user account by runninggcloud init orgcloud auth login . You can check the currently active account by runninggcloud auth list.

Save the request body in a file namedrequest.json, and execute the following command:

$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }

Invoke-WebRequest `
-Method PATCH `
-Headers $headers `
-ContentType: "application/json; charset=utf-8" `
-InFile request.json `
-Uri "https://compute.googleapis.com/compute/projects/PROJECT_ID/global/previewFeatures/FEATURE_NAME" | Select-Object -Expand Content

You should receive a JSON response similar to the following:

{  "kind": "compute#operation",  "status": "DONE"}

Terraform

To enable your project to send HTTP requests to the alpha URI of aCompute Engine feature, use thegoogle_compute_preview_feature Terraform resource.

For example, to enable access to all Compute Engine alpha features,use the following resource:

resource "google_compute_preview_feature" "default" {  name              = "alpha-api-access"  activation_status = "ENABLED"  rollout_operation {    rollout_input {      predefined_rollout_plan = "ROLLOUT_PLAN_FAST_ROLLOUT"    }  }}

For more information about using Terraform with Google Cloud, see theTerraform on Google Cloud documentation.

View enabled alpha features

To view a list of enabled Compute Engine alpha features in your project,select one of the following options:

Console

  1. In the Google Cloud console, go to thePreview features page.

    Go to Preview features

  2. In the table that appears, you can view the enabled features byverifying whether a green check mark appears next to a feature name.

gcloud

To view a list of enabled alpha features, use thegcloud compute preview-features list commandwith the--filter flag set toactivationStatus=ENABLED.

Execute the following command:

Linux, macOS, or Cloud Shell

gcloudcomputepreview-featureslist--filter=activationStatus=ENABLED

Windows (PowerShell)

gcloudcomputepreview-featureslist--filter=activationStatus=ENABLED

Windows (cmd.exe)

gcloudcomputepreview-featureslist--filter=activationStatus=ENABLED

You should receive a response similar to the following:

NAME              STATUSalpha-feature-1   ENABLEDalpha-feature-2   ENABLED

REST

To view a list of enabled alpha features, make aGET request to thepreviewFeatures.list method.In the request URL, set thefilter query parameter toitems.activationStatus=ENABLED.

Before using any of the request data, make the following replacements:

  • PROJECT_ID: the ID of your project

HTTP method and URL:

GET https://compute.googleapis.com/compute/projects/PROJECT_ID/global/previewFeatures?filter=activationStatus=ENABLED

To send your request, expand one of these options:

curl (Linux, macOS, or Cloud Shell)

Note: The following command assumes that you have logged in to thegcloud CLI with your user account by runninggcloud init orgcloud auth login , or by usingCloud Shell, which automatically logs you into thegcloud CLI . You can check the currently active account by runninggcloud auth list.

Execute the following command:

curl -X GET \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
"https://compute.googleapis.com/compute/projects/PROJECT_ID/global/previewFeatures?filter=activationStatus=ENABLED"

PowerShell (Windows)

Note: The following command assumes that you have logged in to thegcloud CLI with your user account by runninggcloud init orgcloud auth login . You can check the currently active account by runninggcloud auth list.

Execute the following command:

$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }

Invoke-WebRequest `
-Method GET `
-Headers $headers `
-Uri "https://compute.googleapis.com/compute/projects/PROJECT_ID/global/previewFeatures?filter=activationStatus=ENABLED" | Select-Object -Expand Content

You should receive a JSON response similar to the following:

{   "etag": "Ehx4OkkYX3CUXGRWAE8lvEn0ZDE=/rEhZfPEilwjblfZuwOYpO1nHC2c=",  "id": "projects/example-project",  "previewFeatures": [    {      "activationStatus": "ENABLED",      "creationTimestamp": "2025-03-01T00:00:00Z",      "description": "Please see status.description for details.",      "id": "560966157",      "name": "alphaFeature1",      "status": {        "description": "Enables access to alpha APIs.",        "helpLink": "some-link",        "releaseStatus": {          "stage": "GA",          "updateDate": {            "day": 1,            "month": 3,            "year": 2025          }        }      }    },    ...  ],  "selfLink": "https://www.googleapis.com/compute/projects/example-project"}

Disable an alpha feature

If you no longer need to use a Compute Engine alpha feature, then youcan disable your project access to it.

To disable your project from sending HTTP requests to the alpha URI of aCompute Engine feature, select one of the following options:

Console

  1. In the Google Cloud console, go to thePreview features page.

    Go to Preview features

  2. ClickDisable next to the preview feature you want to disable. Then, in the dialog that appears, clickDisable again.

gcloud

To disable your project from sending HTTP requests to the alpha URI of aCompute Engine feature, use thegcloud compute preview-features update commandwith the--activation-status flag set tounspecified.

Before using any of the command data below, make the following replacements:

  • FEATURE_NAME: the name of the feature that you want to stop using.

Execute the following command:

Linux, macOS, or Cloud Shell

gcloudcomputepreview-featuresupdateFEATURE_NAME\--activation-status=unspecified\--rollout-plan=fast-rollout

Windows (PowerShell)

gcloudcomputepreview-featuresupdateFEATURE_NAME`--activation-status=unspecified`--rollout-plan=fast-rollout

Windows (cmd.exe)

gcloudcomputepreview-featuresupdateFEATURE_NAME^--activation-status=unspecified^--rollout-plan=fast-rollout

You should receive a response similar to the following:

status: DONE

REST

To disable your project from sending HTTP requests to the alpha URI of aCompute Engine feature, make aPATCH request to thepreviewFeatures.update method.

Before using any of the request data, make the following replacements:

  • PROJECT_ID: the ID of your project.
  • FEATURE_NAME: the name of the feature that you want to stop using.

HTTP method and URL:

PATCH https://compute.googleapis.com/compute/projects/PROJECT_ID/global/previewFeatures/FEATURE_NAME

Request JSON body:

{  "activationStatus": "ACTIVATION_STATUS_UNSPECIFIED",  "rolloutOperation": {    "rolloutInput": {      "predefinedRolloutPlan": "ROLLOUT_PLAN_FAST_ROLLOUT"    }  }}

To send your request, expand one of these options:

curl (Linux, macOS, or Cloud Shell)

Note: The following command assumes that you have logged in to thegcloud CLI with your user account by runninggcloud init orgcloud auth login , or by usingCloud Shell, which automatically logs you into thegcloud CLI . You can check the currently active account by runninggcloud auth list.

Save the request body in a file namedrequest.json, and execute the following command:

curl -X PATCH \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json; charset=utf-8" \
-d @request.json \
"https://compute.googleapis.com/compute/projects/PROJECT_ID/global/previewFeatures/FEATURE_NAME"

PowerShell (Windows)

Note: The following command assumes that you have logged in to thegcloud CLI with your user account by runninggcloud init orgcloud auth login . You can check the currently active account by runninggcloud auth list.

Save the request body in a file namedrequest.json, and execute the following command:

$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }

Invoke-WebRequest `
-Method PATCH `
-Headers $headers `
-ContentType: "application/json; charset=utf-8" `
-InFile request.json `
-Uri "https://compute.googleapis.com/compute/projects/PROJECT_ID/global/previewFeatures/FEATURE_NAME" | Select-Object -Expand Content

You should receive a JSON response similar to the following:

{  "kind": "compute#operation",  "status": "DONE"}

Terraform

To disable your project from sending HTTP requests to the alpha URI of aCompute Engine feature, use thegoogle_compute_preview_feature Terraform resource.

For example, to disable access to all Compute Engine alpha features,use the following resource:

resource "google_compute_preview_feature" "default" {  name              = "alpha-api-access"  activation_status = "ACTIVATION_STATE_UNSPECIFIED"  rollout_operation {    rollout_input {      predefined_rollout_plan = "ROLLOUT_PLAN_FAST_ROLLOUT"    }  }}

For more information about using Terraform with Google Cloud, see theTerraform on Google Cloud documentation.

What's next

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 2026-02-19 UTC.