Deleting a realm

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
  • Choose a shell with Cloud SDK installed:
  • 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

    To install gcloud, install the Cloud SDK, which includes the gcloud command-line tool.

    Verify that you have set desired default project for gcloud command-line tool (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
    

    Verify that you are running "Google Cloud SDK" at minimum version 281.0.0:

    gcloud version
    

    If not you can run the following command to update it:

    gcloud components update
    

Deleting a realm

You can delete a global or regional realm using the gcloud command-line tool.

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

gcloud beta 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 beta 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.

Verifying that your realm has been deleted

To verify that you successfully deleted the realm, list your global or regional realms using the gcloud command-line tool.

To list all global realms, run the following command:

gcloud beta 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 beta 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.