Manage AI zone visibility

This page explains how to check if AI zones are visible for your Google Cloud project, and how to turn AI zone visibility on or off.

AI zones are specialized zones optimized for artificial intelligence (AI) and machine learning (ML) training and inference workloads. To help your team discover and use AI zones in your Google Cloud project, turn on AI zone visibility. AI zone visibility determines whether Google Cloud displays AI zones in your project's zone listings and console interfaces. If you turn off AI zone visibility, then Google Cloud hides AI zones from the following interfaces:

  • Google Cloud console
  • Google Cloud CLI zone listing commands
  • REST API

If the parent region is active in your project, then turning off AI zone visibility doesn't restrict API endpoints or block regional platform settings in the background, such as compute.InstanceSettings. To prevent creation of resources in AI zones, see Restrict resource creation in AI zones.

To learn more about AI zones, read the AI zones documentation.

Before you begin

  • If you haven't already, set up 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 the Google Cloud CLI. After installation, initialize the Google Cloud CLI by running the following command:

      gcloud init

      If you're using an external identity provider (IdP), you must first sign in to the gcloud CLI with your federated identity.

    2. Set a default region and zone.

    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.

      Install the Google Cloud CLI.

      If you're using an external identity provider (IdP), you must first sign in to the gcloud CLI with your federated identity.

    For more information, see Authenticate for using REST in the Google Cloud authentication documentation.

Required roles

To get the permissions that you need to turn on or turn off AI zone visibility, ask your administrator to grant you the Compute Admin (roles/compute.admin) IAM role on the project. For more information about granting roles, see Manage access to projects, folders, and organizations.

You might also be able to get the required permissions through custom roles or other predefined roles.

Check if AI zones are visible for a project

To check if AI zones are visible for your Google Cloud project, verify whether or not the feature ai-zones-visibility (Preview) is turned on for your Google Cloud project. For new Google Cloud projects, AI zone visibility is turned off by default.

Google Cloud CLI

Use the gcloud compute preview-features list command. The response that you get indicates if the feature ai-zones-visibility is turned on or turned off.

gcloud compute preview-features list --filter="name=ai-zones-visibility"

REST

Make the following GET request to the previewFeatures.list method.

GET https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/global/previewFeatures/ai-zones-visibility

Replace PROJECT_ID with your project ID.

Make AI zones visible for a project

To make AI zones visible for your Google Cloud project, turn on AI zone visibility for your project.

Google Cloud CLI

Use the gcloud compute preview-features command, setting the activation status as enabled and the rollout plan as fast-rollout.

gcloud compute preview-features update ai-zones-visibility \
    --activation-status=enabled \
    --rollout-plan=fast-rollout

REST

Make the following PATCH request to the previewFeatures.update method. In the request body, include the following fields:

  • The activation_status field, set to ENABLED.
  • The rollout_operation.predefined_rollout_plan field, set to ROLLOUT_PLAN_FAST_ROLLOUT.
PATCH https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/global/previewFeatures/ai-zones-visibility
{
  "activation_status": "ENABLED",
  "rollout_operation": {
    "rollout_input": {
      "predefined_rollout_plan": "ROLLOUT_PLAN_FAST_ROLLOUT"
    }
  }
}

Replace PROJECT_ID with your project ID.

Hide AI zones for your project

To hide AI zones from your Google Cloud project's zone listings and console deployment interfaces, turn off AI zone visibility.

Google Cloud CLI

Use the gcloud compute preview-features command, setting the activation status as unspecified and the rollout plan as fast-rollout.

gcloud compute preview-features update ai-zones-visibility \
    --activation-status=unspecified \
    --rollout-plan=fast-rollout

REST

Make the following PATCH request to the previewFeatures.update method. In the request body, include the following fields:

  • The activation_status field, set to ACTIVATION_STATE_UNSPECIFIED.
  • The rollout_operation.predefined_rollout_plan field, set to ROLLOUT_PLAN_FAST_ROLLOUT.
PATCH https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/global/previewFeatures/ai-zones-visibility
{
  "activation_status": "ACTIVATION_STATE_UNSPECIFIED",
  "rollout_operation": {
    "rollout_input": {
      "predefined_rollout_plan": "ROLLOUT_PLAN_FAST_ROLLOUT"
    }
  }
}

Replace PROJECT_ID with your project ID.

Restrict resource creation in AI zones

If your organization has data residency, compliance, or governance requirements mandating that no resources or system configurations exist in AI zones, use Organization Policy Service to restrict resource creation in AI zones. For more information, see Restrict resource locations.

What's next