This document explains how to enable your project to send HTTP requests to alpha
Compute Engine API URIs. If you're new to the Compute Engine API, then see
[Prerequisites](https://docs.cloud.google.com/compute/docs/api/prereqs).

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

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

Google Cloud manages access to alpha URIs for specific Compute Engine
features. You must first allow your organization, folder, or project to access
and use alpha features. After this step, you can view which features are
available, and then enable a project to send HTTP requests to their alpha URIs.
Use Compute Engine alpha features to test and develop with early-stage
features before they're available in
[Preview](https://cloud.google.com/products#product-launch-stages).

> [!CAUTION]
> **Caution:** Compute Engine alpha features are experimental. Using them might result in breaking changes. For more information, see the [Pre-GA offering service terms](https://cloud.google.com/terms/service-terms).

## Before you begin

- You can only enable a project to send HTTP requests to an alpha URI if the project is part of an organization. If not, then [migrate the project to an
  organization](https://docs.cloud.google.com/resource-manager/docs/project-migration).
- If you haven't already, set up [authentication](https://docs.cloud.google.com/compute/docs/authentication). Authentication verifies your identity for access to Google Cloud services and APIs. To run code or samples from a local development environment, you can authenticate to Compute Engine by selecting one of the following options:

  Select the tab for how you plan to use the samples on this page:

  ### Console


  When you use the Google Cloud console to access Google Cloud services and
  APIs, you don't need to set up authentication.

  ### gcloud

  1.
     [Install](https://docs.cloud.google.com/sdk/docs/install) the Google Cloud CLI.

     After installation,
     [initialize](https://docs.cloud.google.com/sdk/docs/initializing) the Google Cloud CLI by running the following command:

     ```bash
     gcloud init
     ```


     If you're using an external identity provider (IdP), you must first
     [sign in to the gcloud CLI with your federated identity](https://docs.cloud.google.com/iam/docs/workforce-log-in-gcloud).

     > [!NOTE]
     > **Note:** If you installed the gcloud CLI previously, make sure you have the latest version by running `gcloud components update`.

  2. [Set a default region and zone](https://docs.cloud.google.com/compute/docs/gcloud-compute#set_default_zone_and_region_in_your_local_client).

  ### Terraform


  To use the Terraform samples on this page in a local development environment, install and
  initialize the gcloud CLI, and then set up Application Default Credentials with
  your user credentials.
  1.
     [Install](https://docs.cloud.google.com/sdk/docs/install) the Google Cloud CLI.

  2. If you're using an external identity provider (IdP), you must first
     [sign in to the gcloud CLI with your federated identity](https://docs.cloud.google.com/iam/docs/workforce-log-in-gcloud).

  3.

     If you're using a local shell, then create local authentication credentials for your user
     account:

     ```bash
     gcloud auth application-default login
     ```

     You don't need to do this if you're using Cloud Shell.


     If an authentication error is returned, and you are using an external identity provider
     (IdP), confirm that you have
     [signed in to the gcloud CLI with your federated identity](https://docs.cloud.google.com/iam/docs/workforce-log-in-gcloud).


  For more information, see
  [Set up authentication for a local development environment](https://docs.cloud.google.com/compute/docs/authentication#local-development).

  ### REST


  To use the REST API samples on this page in a local development environment, you use the
  credentials you provide to the gcloud CLI.
  1. [Install](https://docs.cloud.google.com/sdk/docs/install) the Google Cloud CLI.
  2. If you're using an external identity provider (IdP), you must first [sign in to the gcloud CLI with your federated identity](https://docs.cloud.google.com/iam/docs/workforce-log-in-gcloud).


  For more information, see
  [Authenticate for using REST](https://docs.cloud.google.com/docs/authentication/rest)
  in the Google Cloud authentication documentation.

### 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:

- To enable an organization policy: [Organization Policy Administrator](https://docs.cloud.google.com/iam/docs/roles-permissions/orgpolicy#orgpolicy.policyAdmin) (`roles/orgpolicy.policyAdmin`) on the organization
- To view, enable, or disable alpha features: [Compute Admin](https://docs.cloud.google.com/iam/docs/roles-permissions/compute#compute.admin) (`roles/compute.admin`) on the project


For more information about granting roles, see [Manage access to projects, folders, and organizations](https://docs.cloud.google.com/iam/docs/granting-changing-revoking-access).


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 the **Required 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
with [custom roles](https://docs.cloud.google.com/iam/docs/creating-custom-roles) or
other [predefined roles](https://docs.cloud.google.com/iam/docs/roles-overview#predefined).

## Allow access to alpha features

Configure the **Block Compute Engine preview features** (`compute.managed.blockPreviewFeatures`)
organization policy. By default, this policy blocks all preview features.

To allow access to alpha features, you must either explicitly allow specific features
(recommended) or disable the policy (optional).

### Method 1: Explicitly allow specific features (Recommended)

To allow specific preview features while keeping the policy enforced, select one of the following options:

### Console

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

   [Go to Organization policies](https://console.cloud.google.com/iam-admin/orgpolicies)
2. If you haven't already, from the project picker, select the
   organization, folder, or project where you want to edit the policy.

3. In the **Name** column, click
   **Block Compute Engine preview features** . The
   **Policy details** page appears.

4. Click **Manage policy** . The
   **Edit policy** page appears.

5. In the **Policy source** section, select **Override parent's policy**.

6. In the **Rules** section, click **Add rule**, and then do the following:

   1. In the **Enforcement** section, select **On**.

   2. In the row containing the **allowedPreviewFeatures** parameter,
      click **Edit** . The
      **Edit parameter values** pane appears.

   3. In the **Value type** section, select **User-defined**.

   4. In the **User-defined values** section, enter the feature name (for example, `alpha-api-access`).

   5. Click **Save**.

7. Click **Set policy** . Then, in the dialog that appears, click
   **Set policy** again.

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

### gcloud

1. To download the `compute.managed.blockPreviewFeatures` policy as a file
   named `policy.yaml`, use the
   [`gcloud org-policies describe` command](https://docs.cloud.google.com/sdk/gcloud/reference/org-policies/describe)
   with one of the following flags:

   - To configure the policy in your organization, include the
     `--organization` flag:

         gcloud org-policies describe compute.managed.blockPreviewFeatures --organization=ORGANIZATION_ID > policy.yaml

   - To configure the policy in your folder, include the `--folder` flag:

         gcloud org-policies describe compute.managed.blockPreviewFeatures --folder=FOLDER_ID > policy.yaml

   - To configure the policy in your project, include the `--project` flag:

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

   Replace the following:
   - `ORGANIZATION_ID`: the
     [ID of your organization](https://docs.cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id)

   - `FOLDER_ID`: the
     [ID of your folder](https://docs.cloud.google.com/resource-manager/docs/creating-managing-folders#viewing_or_listing_folders_and_projects)

   - `PROJECT_ID`: the ID of your project

2. Open the `policy.yaml` file using a text editor. In the file, after the
   `rules` field, configure it to enforce the policy and list the allowed features under the `parameters` field.
   For example, if you're configuring the policy in your organization, your `policy.yaml`
   entry is as follows:

       name: organizations/ORGANIZATION_ID/policies/compute.managed.blockPreviewFeatures
       spec:
         rules:
         - enforce: true
       parameters:
       allowedPreviewFeatures:
       - alpha-api-access

3. Save the `policy.yaml` file, and then close the text editor.

4. To update the policy for your organization, folder, or project, use the
   [`gcloud org-policies set-policy` command](https://docs.cloud.google.com/sdk/gcloud/reference/org-policies/set-policy):

       gcloud org-policies set-policy policy.yaml

### Method 2: Disable the policy (Optional)

If you want to allow access to all preview features without listing them individually, you can disable the policy.

### Console

1. Follow steps 1-5 from Method 1.

2. In the **Rules** section, click **Add rule** , and in the **Enforcement** section, select **Off**.

3. Click **Set policy** . Then, in the dialog that appears, click
   **Set policy** again.

### gcloud

1. Download the policy as described in Method 1.

2. Open the `policy.yaml` file using a text editor. In the file, after the
   `rules` field, add the `enforce` field set to `false`. For example, if
   you're disabling the policy in your organization, your `policy.yaml`
   entry is as follows:

       name: organizations/ORGANIZATION_ID/policies/compute.managed.blockPreviewFeatures
       spec:
         rules:
         - enforce: false

3. Save the `policy.yaml` file, and then close the text editor.

4. To update the policy for your organization, folder, or project, use the
   [`gcloud org-policies set-policy` command](https://docs.cloud.google.com/sdk/gcloud/reference/org-policies/set-policy):

       gcloud org-policies set-policy policy.yaml

5. Optional: To delete the `policy.yaml` file, do one of the following:

   - If you're using the Linux or macOS terminal, then use the following
     command:

         rm policy.yaml

   - If you're using the Windows terminal, then use the following
     command:

         del policy.yaml

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

For more information about managing organization policies, see
[Using constraints](https://docs.cloud.google.com/resource-manager/docs/organization-policy/using-constraints)
in the Resource Manager documentation.

## Use alpha features in your project

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

1. [View available alpha features](https://docs.cloud.google.com/compute/docs/reference/rest/alpha#view-features)

2. [Enable an alpha feature](https://docs.cloud.google.com/compute/docs/reference/rest/alpha#enable)

3. Optional: [View enabled alpha features](https://docs.cloud.google.com/compute/docs/reference/rest/alpha#verify-resources)

### View available alpha features

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

### Console

In the Google Cloud console, go to the **Preview features** page.

[Go to Preview features](https://console.cloud.google.com/compute/previewFeatures)

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 the
[`gcloud compute preview-features list` command](https://docs.cloud.google.com/sdk/gcloud/reference/compute/preview-features/list).


Execute the

following

command:

#### Linux, macOS, or Cloud Shell

```bash
gcloud compute preview-features list 
```

#### Windows (PowerShell)

```bash
gcloud compute preview-features list 
```

#### Windows (cmd.exe)

```bash
gcloud compute preview-features list 
```

You should receive a response similar to the following:

```
NAME              STATUS
alpha-feature-1   DISABLED
alpha-feature-2   DISABLED
```

<br />

### REST

To view the Compute Engine features available in alpha, make a `GET`
request to the
[`previewFeatures.list` method](https://docs.cloud.google.com/compute/docs/reference/rest/v1/previewFeatures/list).


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

- <var class="edit" scope="PROJECT_ID" translate="no">PROJECT_ID</var>: 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]
> **Note:** The following command assumes that you have logged in to the `gcloud` CLI with your user account by running [`gcloud init`](https://docs.cloud.google.com/sdk/gcloud/reference/init) or [`gcloud auth login`](https://docs.cloud.google.com/sdk/gcloud/reference/auth/login) , or by using [Cloud Shell](https://docs.cloud.google.com/shell/docs), which automatically logs you into the `gcloud` CLI . You can check the currently active account by running [`gcloud auth list`](https://docs.cloud.google.com/sdk/gcloud/reference/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]
> **Note:** The following command assumes that you have logged in to the `gcloud` CLI with your user account by running [`gcloud init`](https://docs.cloud.google.com/sdk/gcloud/reference/init) or [`gcloud auth login`](https://docs.cloud.google.com/sdk/gcloud/reference/auth/login) . You can check the currently active account by running [`gcloud auth list`](https://docs.cloud.google.com/sdk/gcloud/reference/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
          }
        }
      }
    },
    ...
  ]
}
```

<br />

### Enable an alpha feature

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

### Console

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

   [Go to Preview features](https://console.cloud.google.com/compute/previewFeatures)
2. Click **Enable** next to the preview feature you want to enable. Then, in the dialog that appears, click **Enable** again.

### gcloud

To enable your project to send HTTP requests to the alpha URI of a
Compute Engine feature, use the
[`gcloud compute preview-features update` command](https://docs.cloud.google.com/sdk/gcloud/reference/compute/preview-features/update)
with the `--activation-status` flag set to `enabled`.


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

- <var class="edit" scope="FEATURE_NAME" translate="no">FEATURE_NAME</var>: the name of the feature that you want to start using.


Execute the

following

command:

#### Linux, macOS, or Cloud Shell

```bash
gcloud compute preview-features update FEATURE_NAME \
    --activation-status=enabled \
    --rollout-plan=fast-rollout
```

#### Windows (PowerShell)

```bash
gcloud compute preview-features update FEATURE_NAME `
    --activation-status=enabled `
    --rollout-plan=fast-rollout
```

#### Windows (cmd.exe)

```bash
gcloud compute preview-features update FEATURE_NAME ^
    --activation-status=enabled ^
    --rollout-plan=fast-rollout
```

You should receive a response similar to the following:

```
status: DONE
```

<br />

### REST

To enable your project to send HTTP requests to the alpha URI of a
Compute Engine feature, make a `PATCH` request to the
[`previewFeatures.update` method](https://docs.cloud.google.com/compute/docs/reference/rest/v1/previewFeatures/update).


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

- <var class="edit" scope="PROJECT_ID" translate="no">PROJECT_ID</var>: the ID of your project.
- <var class="edit" scope="FEATURE_NAME" translate="no">FEATURE_NAME</var>: 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]
> **Note:** The following command assumes that you have logged in to the `gcloud` CLI with your user account by running [`gcloud init`](https://docs.cloud.google.com/sdk/gcloud/reference/init) or [`gcloud auth login`](https://docs.cloud.google.com/sdk/gcloud/reference/auth/login) , or by using [Cloud Shell](https://docs.cloud.google.com/shell/docs), which automatically logs you into the `gcloud` CLI . You can check the currently active account by running [`gcloud auth list`](https://docs.cloud.google.com/sdk/gcloud/reference/auth/list).


Save the request body in a file named `request.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]
> **Note:** The following command assumes that you have logged in to the `gcloud` CLI with your user account by running [`gcloud init`](https://docs.cloud.google.com/sdk/gcloud/reference/init) or [`gcloud auth login`](https://docs.cloud.google.com/sdk/gcloud/reference/auth/login) . You can check the currently active account by running [`gcloud auth list`](https://docs.cloud.google.com/sdk/gcloud/reference/auth/list).


Save the request body in a file named `request.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"
}
```

<br />

### Terraform

To enable your project to send HTTP requests to the alpha URI of a
Compute Engine feature, use the
[`google_compute_preview_feature` Terraform resource](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/compute_preview_feature).

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 the
[Terraform on Google Cloud documentation](https://docs.cloud.google.com/docs/terraform).

### 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 the **Preview features** page.

   [Go to Preview features](https://console.cloud.google.com/compute/previewFeatures)
2. In the table that appears, you can view the enabled features by
   verifying whether a green check mark appears next to a feature name.

### gcloud

To view a list of enabled alpha features, use the
[`gcloud compute preview-features list` command](https://docs.cloud.google.com/sdk/gcloud/reference/compute/preview-features/list)
with the `--filter` flag set to `activationStatus=ENABLED`.


Execute the

following

command:

#### Linux, macOS, or Cloud Shell

```bash
gcloud compute preview-features list --filter=activationStatus=ENABLED
```

#### Windows (PowerShell)

```bash
gcloud compute preview-features list --filter=activationStatus=ENABLED
```

#### Windows (cmd.exe)

```bash
gcloud compute preview-features list --filter=activationStatus=ENABLED
```

You should receive a response similar to the following:

```
NAME              STATUS
alpha-feature-1   ENABLED
alpha-feature-2   ENABLED
```

<br />

### REST

To view a list of enabled alpha features, make a `GET` request to the
[`previewFeatures.list` method](https://docs.cloud.google.com/compute/docs/reference/rest/v1/previewFeatures/list).
In the request URL, set the `filter` query parameter to
`items.activationStatus=ENABLED`.


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

- <var class="edit" scope="PROJECT_ID" translate="no">PROJECT_ID</var>: 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]
> **Note:** The following command assumes that you have logged in to the `gcloud` CLI with your user account by running [`gcloud init`](https://docs.cloud.google.com/sdk/gcloud/reference/init) or [`gcloud auth login`](https://docs.cloud.google.com/sdk/gcloud/reference/auth/login) , or by using [Cloud Shell](https://docs.cloud.google.com/shell/docs), which automatically logs you into the `gcloud` CLI . You can check the currently active account by running [`gcloud auth list`](https://docs.cloud.google.com/sdk/gcloud/reference/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]
> **Note:** The following command assumes that you have logged in to the `gcloud` CLI with your user account by running [`gcloud init`](https://docs.cloud.google.com/sdk/gcloud/reference/init) or [`gcloud auth login`](https://docs.cloud.google.com/sdk/gcloud/reference/auth/login) . You can check the currently active account by running [`gcloud auth list`](https://docs.cloud.google.com/sdk/gcloud/reference/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"
}
```

<br />

## Disable an alpha feature

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

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

### Console

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

   [Go to Preview features](https://console.cloud.google.com/compute/previewFeatures)
2. Click **Disable** next to the preview feature you want to disable. Then, in the dialog that appears, click
   **Disable** again.

### gcloud

To disable your project from sending HTTP requests to the alpha URI of a
Compute Engine feature, use the
[`gcloud compute preview-features update` command](https://docs.cloud.google.com/sdk/gcloud/reference/compute/preview-features/update)
with the `--activation-status` flag set to `unspecified`.


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

- <var class="edit" scope="FEATURE_NAME" translate="no">FEATURE_NAME</var>: the name of the feature that you want to stop using.


Execute the

following

command:

#### Linux, macOS, or Cloud Shell

```bash
gcloud compute preview-features update FEATURE_NAME \
    --activation-status=unspecified \
    --rollout-plan=fast-rollout
```

#### Windows (PowerShell)

```bash
gcloud compute preview-features update FEATURE_NAME `
    --activation-status=unspecified `
    --rollout-plan=fast-rollout
```

#### Windows (cmd.exe)

```bash
gcloud compute preview-features update FEATURE_NAME ^
    --activation-status=unspecified ^
    --rollout-plan=fast-rollout
```

You should receive a response similar to the following:

```
status: DONE
```

<br />

### REST

To disable your project from sending HTTP requests to the alpha URI of a
Compute Engine feature, make a `PATCH` request to the
[`previewFeatures.update` method](https://docs.cloud.google.com/compute/docs/reference/rest/v1/previewFeatures/update).


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

- <var class="edit" scope="PROJECT_ID" translate="no">PROJECT_ID</var>: the ID of your project.
- <var class="edit" scope="FEATURE_NAME" translate="no">FEATURE_NAME</var>: 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]
> **Note:** The following command assumes that you have logged in to the `gcloud` CLI with your user account by running [`gcloud init`](https://docs.cloud.google.com/sdk/gcloud/reference/init) or [`gcloud auth login`](https://docs.cloud.google.com/sdk/gcloud/reference/auth/login) , or by using [Cloud Shell](https://docs.cloud.google.com/shell/docs), which automatically logs you into the `gcloud` CLI . You can check the currently active account by running [`gcloud auth list`](https://docs.cloud.google.com/sdk/gcloud/reference/auth/list).


Save the request body in a file named `request.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]
> **Note:** The following command assumes that you have logged in to the `gcloud` CLI with your user account by running [`gcloud init`](https://docs.cloud.google.com/sdk/gcloud/reference/init) or [`gcloud auth login`](https://docs.cloud.google.com/sdk/gcloud/reference/auth/login) . You can check the currently active account by running [`gcloud auth list`](https://docs.cloud.google.com/sdk/gcloud/reference/auth/list).


Save the request body in a file named `request.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"
}
```

<br />

### Terraform

To disable your project from sending HTTP requests to the alpha URI of a
Compute Engine feature, use the
[`google_compute_preview_feature` Terraform resource](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/compute_preview_feature).

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 the
[Terraform on Google Cloud documentation](https://docs.cloud.google.com/docs/terraform).

## What's next

- [Best practices for the Compute Engine API](https://docs.cloud.google.com/compute/docs/api/best-practices)