관리형 서비스 복원

Cloud Endpoints에서는 Service Management를 사용하여 API를 관리합니다. gcloud endpoints services deploy 명령어로 OpenAPI 문서를 배포할 때 이 명령어는 Service Management를 사용하여 API의 관리형 서비스를 만들었습니다.

gcloud endpoints services delete 명령어로 관리형 서비스를 삭제한 경우 Service Management는 관리형 서비스를 즉시 삭제하지 않습니다. Service Management에서 30일 동안 관리형 서비스가 사용 중지되므로 필요한 경우 복원할 수 있습니다. 30일 이후에는 Service Management에서 관리형 서비스가 영구적으로 삭제됩니다.

관리형 서비스가 사용 중지된 상태인 동안 Service Management에서는 이름이 같은 다른 관리형 서비스를 생성할 수 없습니다.

관리형 서비스를 복원하려면 다음 안내를 따르세요.

  1. Google Cloud CLI(gcloud)에 Google Cloud의 데이터 및 서비스에 액세스할 수 있는 권한이 있는지 확인합니다.

    gcloud auth login
    
  2. 관리형 서비스를 복원하고 원래 생성된 Google Cloud 프로젝트에 할당합니다. [SERVICE_NAME]을 관리형 서비스 이름으로 바꿉니다.

    gcloud endpoints services undelete [SERVICE_NAME]
    

문제해결

gcloud endpoints services undelete 명령어가 다음과 비슷한 권한 오류와 함께 실패한 경우 다음을 수행합니다.

ERROR: (gcloud.endpoints.services.undelete) User [EMAIL] does not have permission to access service

  • gcloud auth login을 실행하고 관리형 서비스가 속한 프로젝트에 액세스할 수 있는 권한이 있는 사용자 계정을 선택해야 합니다.

  • Service Management 관리자 IAM 역할(roles/servicemanagement.admin)을 부여받았는지 확인합니다.

다음 단계