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에서는 이름이 같은 다른 관리형 서비스를 생성할 수 없습니다.
관리형 서비스를 복원하려면 다음 안내를 따르세요.
Google Cloud CLI(gcloud)에 Google Cloud의 데이터 및 서비스에 액세스할 수 있는 권한이 있는지 확인합니다.
gcloud auth login
관리형 서비스를 복원하고 원래 생성된 Google Cloud 프로젝트에 할당합니다. [SERVICE_NAME]을 관리형 서비스 이름으로 바꿉니다.
gcloudendpointsservicesundelete[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)을 부여받았는지 확인합니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2024-12-21(UTC)"],[[["\u003cp\u003eCloud Endpoints uses Service Management to manage APIs, and deploying an OpenAPI document creates a managed service.\u003c/p\u003e\n"],["\u003cp\u003eDeleting a managed service through \u003ccode\u003egcloud\u003c/code\u003e disables it for 30 days, allowing for restoration, after which it is permanently deleted.\u003c/p\u003e\n"],["\u003cp\u003eWhile disabled, a managed service's name cannot be reused, preventing the creation of a new service with the same name.\u003c/p\u003e\n"],["\u003cp\u003eTo restore a managed service, use the command \u003ccode\u003egcloud endpoints services undelete [SERVICE_NAME]\u003c/code\u003e, ensuring you have the correct permissions.\u003c/p\u003e\n"],["\u003cp\u003eTroubleshooting permission errors during restoration involves verifying user account authorization and ensuring the Service Management Administrator IAM role is granted.\u003c/p\u003e\n"]]],[],null,["# Restoring a managed service\n\nOpenAPI \\| [gRPC](/endpoints/docs/grpc/restore-managed-service \"View this page for the Cloud Endpoints gRPC docs\")\n\n\u003cbr /\u003e\n\nCloud Endpoints uses Service Management to manage your API. When\nyou deployed your OpenAPI document by using the `gcloud endpoints services\ndeploy` command, the command used Service Management to create a\nmanaged service for your API.\n\nIf you deleted a managed service by using the `gcloud endpoints services delete`\ncommand, Service Management doesn't immediately delete the managed\nservice. Service Management disables the managed service for 30 days,\nwhich allows you time to restore it if you need to. After 30 days,\nService Management permanently deletes the managed service.\n\nWhile the managed service is in the disabled state, Service Management\ndoesn't allow the creation of another managed service with the same name.\n\nTo restore a managed service:\n\n1. Make sure that the Google Cloud CLI (`gcloud`) is authorized to access your data\n and services on Google Cloud:\n\n gcloud auth login\n\n2. Restore the managed service and assign it to the\n Google Cloud project that it was originally created in. Replace\n `[SERVICE_NAME]` with the name of your managed service.\n\n gcloud endpoints services undelete [SERVICE_NAME]\n\nTroubleshooting\n---------------\n\nIf the `gcloud endpoints services undelete` command fails with a permission\nerror similar to: \n\n```\nERROR: (gcloud.endpoints.services.undelete) User [EMAIL] does not have permission to access service\n```\n\n\u003cbr /\u003e\n\n- Run `gcloud auth login` and make sure to choose a user account that has\n permission to access the project that the managed service is in.\n\n- Make sure you have been granted the Service Management Administrator IAM role\n (`roles/servicemanagement.admin`).\n\nWhat's next\n-----------\n\n- [Roles that control access to services](/endpoints/docs/frameworks/api-access-overview#roles_that_control_access_to_services).\n\n- [Granting, changing, and revoking access to resources](/iam/docs/granting-changing-revoking-access#grant_access).\n\n- See the\n [`gcloud` reference](/sdk/gcloud/reference)\n for more information on the `gcloud` commands used on this page."]]