Deleting a realm

Stay organized with collections Save and categorize content based on your preferences.

This page explains how to delete a Game Servers realm.

Before you begin

Before you start, we recommend you familiarize yourself with key concepts in the Game Servers Overview. Make sure you have also performed the following tasks:

  • Ensure that you have enabled the Game Services API.
  • Enable Game Services API
  • Either choose a shell with gcloud CLI installed, or use an API client:
  • Cloud Shell

    To launch Cloud Shell, perform the following steps:

    1. Go to Google Cloud console.

      Google Cloud console

    2. From the upper-right corner of the console, click the Activate Cloud Shell button:

    A Cloud Shell session opens inside a frame lower on the console. You use this shell to run gcloud commands.

    Local shell

    Install the gcloud CLI.

    Verify that you have set desired default project for Google Cloud CLI (otherwise you need to specify flag --project explicitly for each command later):

    gcloud config list project

    If not you can run the following command to set a default project, replacing PROJECT_ID with your desired project ID :

    gcloud config set project PROJECT_ID

    Run the following command to verify your version of the Google Cloud CLI. Game Servers requires version 306.0.0 or higher of the gcloud CLI.

    gcloud version

    To update your installation, run the following command:

    gcloud components update

    curl / PowerShell

    To use the REST API with curl or Windows PowerShell, do the following:

    1. Create a service account.
    2. Download a private key as a JSON file.
    3. Set the environment variable GOOGLE_APPLICATION_CREDENTIALS to the path of the JSON file that contains your service account key. This variable only applies to your current shell session, so if you open a new session, set the variable again.

    Client Library

    Google Cloud Game Servers can be controlled programmatically using a client library. See Client Libraries Overview for instructions on using the library and authenticating.

Deleting a realm


  1. In the Google Cloud console, go to the Realms & Clusters page.

    Go to Game Servers

  2. You can use the filter box to filter the realms list by different properties.

  3. In the last table column, click the ellipses and select Remove realm.


You can delete a global or regional realm using the Google Cloud CLI.

To delete a global realm, run the following command and replace realmID with the identifier for a realm you have previously created:

gcloud game servers realms delete realmID

To delete a regional realm, run the following command and replace the placeholder values, such as realmID, with appropriate values:

gcloud game servers realms delete realmID --location=region

The variable placeholders correspond to the following descriptions:

  • realmID is the unique identifier for a realm.
  • region is the region for the realm, if it exists.


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

  • PROJECT_ID: your Google Cloud project ID listed in the IAM Settings
  • LOCATION: the region for the realm or global
  • REALM_ID: a user-defined identifier for the realm

To send your request, expand one of these options:

You should receive a JSON response similar to the following:

  "name": "projects/PROJECT_ID/locations/LOCATION/operations/OPERATION_ID",
  "metadata": {
    "@type": "",
    "createTime": CREATE_TIME,
    "target": "projects/PROJECT_ID/locations/LOCATION/realms/REALM_ID",
    "verb": "delete",
    "requestedCancellation": false,
    "apiVersion": "v1"
  "done": false

Verifying that your realm has been deleted

To verify that you successfully deleted the realm, list your global or regional realms using the Google Cloud CLI.

To list all global realms, run the following command:

gcloud game servers realms list

To list realms in a region, run the following command and replace region with the region you want to list:

gcloud game servers realms list --location=region

Your deleted realm no longer appears in the output of the command.

What's next

Learn about audit logging.