Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Cloud Endpoints verwaltet Ihre API mithilfe von Service Management. Als Sie das OpenAPI-Dokument mit dem Befehl gcloud endpoints services
deploy bereitgestellt haben, hat der Befehl mithilfe von Service Management einen verwalteten Dienst für Ihre API erstellt.
Wenn Sie einen verwalteten Dienst mit dem Befehl gcloud endpoints services delete gelöscht haben, löscht Service Management den verwalteten Dienst nicht sofort. Der verwaltete Dienst wird erst 30 Tage lang deaktiviert, sodass Sie ihn bei Bedarf wiederherstellen können. Nach 30 Tagen löscht Service Management den verwalteten Dienst endgültig.
Während sich der verwaltete Dienst im deaktivierten Zustand befindet, verhindert Service Management, dass ein anderer verwalteter Dienst mit demselben Namen erstellt wird.
So stellen Sie einen verwalteten Dienst wieder her:
Die Google Cloud CLI (gcloud) muss berechtigt sein, auf Ihre Daten und Dienste auf Google Cloudzuzugreifen:
gcloudauthlogin
Stellen Sie den verwalteten Dienst wieder her und weisen Sie ihn demGoogle Cloud -Projekt zu, in dem er ursprünglich erstellt wurde. Ersetzen Sie [SERVICE_NAME] durch den Namen Ihres verwalteten Diensts.
gcloudendpointsservicesundelete[SERVICE_NAME]
Fehlerbehebung
Gehen Sie so vor, wenn der Befehl gcloud endpoints services undelete mit einem Berechtigungsfehler wie dem folgenden fehlschlägt:
ERROR: (gcloud.endpoints.services.undelete) User [EMAIL] does not have permission to access service
Führen Sie gcloud auth login aus und wählen Sie ein Benutzerkonto aus, das berechtigt ist, auf das Projekt zuzugreifen, in dem sich der verwaltete Dienst befindet.
Sie müssen die IAM-Rolle des Service Management-Administrators haben (roles/servicemanagement.admin).
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Schwer verständlich","hardToUnderstand","thumb-down"],["Informationen oder Beispielcode falsch","incorrectInformationOrSampleCode","thumb-down"],["Benötigte Informationen/Beispiele nicht gefunden","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2025-09-04 (UTC)."],[[["\u003cp\u003eCloud Endpoints utilizes Service Management to oversee APIs, creating a managed service upon deployment via the \u003ccode\u003egcloud endpoints services deploy\u003c/code\u003e command.\u003c/p\u003e\n"],["\u003cp\u003eDeleting a managed service with \u003ccode\u003egcloud endpoints services delete\u003c/code\u003e only disables it for 30 days, allowing for potential restoration before permanent deletion.\u003c/p\u003e\n"],["\u003cp\u003eDuring the 30-day disabled period, Service Management prevents the creation of another managed service with the same name.\u003c/p\u003e\n"],["\u003cp\u003eManaged services can be restored during this period using the \u003ccode\u003egcloud endpoints services undelete [SERVICE_NAME]\u003c/code\u003e command.\u003c/p\u003e\n"],["\u003cp\u003eIf the undelete command fails due to permission issues, ensure you've logged in with an account that has the required permissions and has the Service Management Administrator role.\u003c/p\u003e\n"]]],[],null,["# Restoring a managed service\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."]]