This document describes how to cancel or delete future reservation requests.
Before a future reservation request reaches its lock time, you can prevent Compute Engine from provisioning the requested resources by doing one of the following:
Cancel the future reservation request. This is useful to keep the canceled request for reference when creating new requests. However, a canceled future reservation request prevents you from creating new requests with properties that match the canceled request in your project, or in the projects that the request is shared with, until you delete it. For more information, see Restrictions on creation.
Delete the future reservation request. This is useful when you no longer need the request. Deleting a future reservation request permanently deletes it and removes any restrictions on creating new requests.
After a fulfilled future reservation reaches the end of its reservation period, you can delete it to remove any restrictions on creating new requests. However, deleting a fulfilled future reservation doesn't delete its auto-created reservations. To delete an auto-created reservation after its reservation period ends, see Delete reservations.
Before you begin
-
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
-
Install the Google Cloud CLI, then initialize it by running the following command:
gcloud init
- 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
For more information, see Authenticate for using REST in the Google Cloud authentication documentation.
-
Required roles
To get the permissions that you need to cancel or delete future reservation requests,
ask your administrator to grant you the
Compute Future Reservation Admin (roles/compute.futureReservationAdmin
) IAM role on the project.
For more information about granting roles, see Manage access to projects, folders, and organizations.
This predefined role contains the permissions required to cancel or delete future reservation requests. To see the exact permissions that are required, expand the Required permissions section:
Required permissions
The following permissions are required to cancel or delete future reservation requests:
-
To cancel a future reservation:
compute.futureReservations.cancel
on the project -
To delete a future reservation:
compute.futureReservations.delete
on the project
You might also be able to get these permissions with custom roles or other predefined roles.
Cancel future reservation requests
You can only cancel a future reservation in the following cases:
The request is pending approval or has been declined.
The request was approved, but it hasn't reached its lock time yet.
After canceling a future reservation request, you can only view the request's details or delete it.
To cancel a future reservation request, select one of the following options:
gcloud
To cancel a future reservation request, use the
gcloud beta compute future-reservations cancel
command.
gcloud beta compute future-reservations cancel FUTURE_RESERVATION_NAME \
--zone=ZONE
Replace the following:
FUTURE_RESERVATION_NAME
: the name of an existing future reservation request.ZONE
: the zone where the future reservation request is located.
REST
To cancel a future reservation request, make a POST
request to the
beta.futureReservations.cancel
method.
POST https://compute.googleapis.com/compute/beta/projects/PROJECT_ID/zones/ZONE/futureReservations/FUTURE_RESERVATION_NAME/cancel
Replace the following:
PROJECT_ID
: the ID of the project where the future reservation request is located.ZONE
: the zone where the future reservation request is located.FUTURE_RESERVATION_NAME
: the name of the future reservation request.
Delete future reservation requests
You can only delete a future reservation request in the following cases:
The request hasn't reached its lock time yet and isn't pending approval.
The request was fulfilled and its reservation period has ended.
To delete a future reservation request that is pending approval, you must cancel the request before deleting it.
Deleting a fulfilled future reservation doesn't delete its auto-created reservations. To delete an auto-created reservation after its reservation period ends, see Delete reservations.
To delete multiple future reservation requests simultaneously, use the Google Cloud console. Otherwise, to delete a single future reservation request, select any of the following options:
Console
In the Google Cloud console, go to the Reservations page.
Click the Future reservations tab.
Select each future reservation request that you want to delete.
Click
Delete reservation.To confirm, click Delete.
Deleting a future reservation request can take up to a minute to complete.
gcloud
To delete a future reservation request, use the
gcloud beta compute future-reservations delete
command.
gcloud beta compute future-reservations delete FUTURE_RESERVATION_NAME \
--zone=ZONE
Replace the following:
FUTURE_RESERVATION_NAME
: the name of an existing future reservation request.ZONE
: the zone where the future reservation request is located.
REST
To delete a future reservation request, make a DELETE
request to the
beta.futureReservations.delete
method.
DELETE https://compute.googleapis.com/compute/beta/projects/PROJECT_ID/zones/ZONE/futureReservations/FUTURE_RESERVATION_NAME
Replace the following:
PROJECT_ID
: the ID of the project where the future reservation request is located.ZONE
: the zone where the future reservation request is located.FUTURE_RESERVATION_NAME
: the name of an existing future reservation request.
What's next
- Learn how to view future reservation requests.