이 문서에서는 예약을 삭제하는 방법을 설명합니다.
더 이상 예약이 필요하지 않으면 예약된 리소스에 대한 비용이 발생하지 않도록 삭제하세요. 공유 예약이 더 이상 필요하지 않으면 소유자 프로젝트를 사용해서만 삭제할 수 있습니다.
시작하기 전에
-
아직 인증을 설정하지 않았다면 설정합니다.
인증은 서비스 및 API에 액세스하기 위해 ID를 확인하는 프로세스입니다. Google Cloud
로컬 개발 환경에서 코드 또는 샘플을 실행하려면 다음 옵션 중 하나를 선택하여 Compute Engine에 인증하면 됩니다.
Select the tab for how you plan to use the samples on this page:
When you use the Google Cloud console to access Google Cloud services and APIs, you don't need to set up authentication.
-
Install the Google Cloud CLI, then initialize it by running the following command:
gcloud init
- Set a default region and zone.
- Install the Google Cloud CLI.
-
To initialize the gcloud CLI, run the following command:
gcloud init
-
If you're using a local shell, then create local authentication credentials for your user account:
gcloud auth application-default login
You don't need to do this if you're using Cloud Shell.
- Install the Google Cloud CLI.
-
To initialize the gcloud CLI, run the following command:
gcloud init
-
If you're using a local shell, then create local authentication credentials for your user account:
gcloud auth application-default login
You don't need to do this if you're using Cloud Shell.
- Install the Google Cloud CLI.
-
To initialize the gcloud CLI, run the following command:
gcloud init
-
If you're using a local shell, then create local authentication credentials for your user account:
gcloud auth application-default login
You don't need to do this if you're using Cloud Shell.
- Install the Google Cloud CLI.
-
To initialize the gcloud CLI, run the following command:
gcloud init
-
If you're using a local shell, then create local authentication credentials for your user account:
gcloud auth application-default login
You don't need to do this if you're using Cloud Shell.
Go
로컬 개발 환경에서 이 페이지의 Go 샘플을 사용하려면 gcloud CLI를 설치 및 초기화한 다음 사용자 인증 정보로 애플리케이션 기본 사용자 인증 정보를 설정하세요.
자세한 내용은 다음을 참조하세요: Set up authentication for a local development environment.
Java
로컬 개발 환경에서 이 페이지의 Java 샘플을 사용하려면 gcloud CLI를 설치 및 초기화한 다음 사용자 인증 정보로 애플리케이션 기본 사용자 인증 정보를 설정하세요.
자세한 내용은 다음을 참조하세요: Set up authentication for a local development environment.
Node.js
로컬 개발 환경에서 이 페이지의 Node.js 샘플을 사용하려면 gcloud CLI를 설치 및 초기화한 다음 사용자 인증 정보로 애플리케이션 기본 사용자 인증 정보를 설정하세요.
자세한 내용은 다음을 참조하세요: Set up authentication for a local development environment.
Python
로컬 개발 환경에서 이 페이지의 Python 샘플을 사용하려면 gcloud CLI를 설치 및 초기화한 다음 사용자 인증 정보로 애플리케이션 기본 사용자 인증 정보를 설정하세요.
자세한 내용은 다음을 참조하세요: Set up authentication for a local development environment.
REST
로컬 개발 환경에서 이 페이지의 REST API 샘플을 사용하려면 gcloud CLI에 제공한 사용자 인증 정보를 사용합니다.
Install the Google Cloud CLI, then initialize it by running the following command:
gcloud init
자세한 내용은 Google Cloud 인증 문서의 REST 사용을 위한 인증을 참고하세요.
-
예약 삭제
예약을 삭제하기 전에 다음 조건이 충족되었는지 확인하세요.
예약이 약정에 연결되지 않아야 합니다.
특정 예약을 삭제하려면 다음 단계를 한 가지 이상 수행하여 해당 예약을 사용하도록 타겟팅한 가상 머신(VM) 인스턴스가 없는 것을 확인해야 합니다.
예약을 삭제한 후에는 더 이상 예약에 대한 비용이 청구되지 않으며 예약된 VM의 예약이 해제됩니다. 이전에 예약된 VM은 계속 실행되며 이러한 VM에 대한 요금이 계속 청구됩니다.
예약을 여러 개 동시에 삭제하려면 Google Cloud 콘솔을 사용하세요. 그렇지 않은 경우 단일 예약을 삭제하려면 다음 옵션 중 하나를 선택합니다.
Google Cloud 콘솔에서 예약 페이지로 이동합니다.
온디맨드 예약 탭(기본값)에서 삭제할 예약을 선택합니다.
삭제를 클릭합니다.
삭제를 클릭하여 확인합니다.
예약을 2개 이상 동시에 삭제하는 데 최대 1분이 걸릴 수 있습니다.
예약을 삭제하려면 gcloud compute reservations delete
명령어를 사용합니다.
gcloud compute reservations delete RESERVATION_NAME \
--zone=ZONE
다음을 바꿉니다.
RESERVATION_NAME
: 삭제하려는 기존 예약의 이름ZONE
: 예약이 있는 영역
예약을 삭제하려면 DELETE
요청을 reservation.delete
메서드로 보냅니다.
DELETE https://compute.googleapis.com/compute/v1/projects/PROJECT_ID /zones/ZONE /reservations/RESERVATION_NAME
다음을 바꿉니다.
PROJECT_ID
: 예약을 만드는 데 사용한 프로젝트의 IDZONE
: 예약이 있는 영역RESERVATION_NAME
: 삭제하려는 예약의 이름
다음 단계
- 예약 확인 방법 알아보기