Delete reservations


This document explains how to delete reservations.

Before you begin

  • Review the requirements and restrictions for reservations.
  • If you haven't already, set up authentication. Authentication is the process by which your identity is verified for access to Google Cloud services and APIs. To run code or samples from a local development environment, you can authenticate to Compute Engine as follows.

    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, then initialize it by running the following command:

      gcloud init
    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, then initialize it by running the following command:

      gcloud init

Delete a reservation

Before deleting a reservation, make sure of the following:

After you delete a reservation, you are no longer charged for the reservation and the reserved VMs are no longer reserved for you. The previously reserved VMs continue to run and you are still charged for those VMs.

To delete a reservation in your current project, use the Google Cloud console, gcloud CLI, or REST.

Console

To delete a reservation, follow these steps:

  1. In the Google Cloud console, go to the Reservations page.

    Go to Reservations

    The Reservations page opens.

  2. Select the checkbox next to each reservation that you want to delete.

  3. Click Delete reservation.

  4. To confirm, click Delete.

    Deleting the reservation might take some time to complete.

gcloud

To delete a reservation, use the gcloud compute reservations delete command.

gcloud compute reservations delete RESERVATION_NAME \
    --project=PROJECT_ID \
    --zone=ZONE

Replace the following:

  • RESERVATION_NAME: the name of an existing reservation that you want to delete.
  • PROJECT_ID: the ID of the project that you used to create the reservation.
  • ZONE: the zone where the reservation is located.

REST

To delete a reservation, make a DELETE request to the reservation.delete method.

DELETE https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/zones/ZONE/reservations/RESERVATION_NAME

Replace the following:

  • PROJECT_ID: the ID of the project that you used to create the reservation.
  • ZONE: the zone where the reservation is located.
  • RESERVATION_NAME: the name of the reservation that you want to delete.

What's next