Restez organisé à l'aide des collections
Enregistrez et classez les contenus selon vos préférences.
Cloud Endpoints gère votre API à l'aide de Service Management. Lorsque vous avez déployé votre document OpenAPI avec la commande gcloud endpoints services
deploy, celle-ci a créé un service géré pour votre API à l'aide de Service Management.
Si vous avez supprimé un service géré à l'aide de la commande gcloud endpoints services delete, celui-ci n'est pas immédiatement supprimé par Service Management. Il est désactivé pendant 30 jours, ce qui vous laisse le temps de le restaurer au besoin. Passé ce délai, Service Management supprime définitivement le service.
Tant que l'état d'un service géré est désactivé, Service Management n'autorise pas la création d'un autre service géré portant le même nom.
Pour restaurer un service géré, procédez comme suit :
Assurez-vous que la Google Cloud CLI (gcloud) est autorisée à accéder à vos données et services sur Google Cloud:
gcloudauthlogin
Restaurez le service géré et attribuez-le au projetGoogle Cloud dans lequel il a été créé. Remplacez [SERVICE_NAME] par le nom de votre service géré.
gcloudendpointsservicesundelete[SERVICE_NAME]
Dépannage
Si la commande gcloud endpoints services undelete échoue et affiche une erreur d'autorisation semblable à la suivante :
ERROR: (gcloud.endpoints.services.undelete) User [EMAIL] does not have permission to access service
Exécutez gcloud auth login et veillez à choisir un compte utilisateur autorisé à accéder au projet dans lequel se trouve le service géré.
Assurez-vous que le rôle IAM "Administrateur Service Management" (roles/servicemanagement.admin) vous a été attribué.
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/09/04 (UTC).
[[["Facile à comprendre","easyToUnderstand","thumb-up"],["J'ai pu résoudre mon problème","solvedMyProblem","thumb-up"],["Autre","otherUp","thumb-up"]],[["Difficile à comprendre","hardToUnderstand","thumb-down"],["Informations ou exemple de code incorrects","incorrectInformationOrSampleCode","thumb-down"],["Il n'y a pas l'information/les exemples dont j'ai besoin","missingTheInformationSamplesINeed","thumb-down"],["Problème de traduction","translationIssue","thumb-down"],["Autre","otherDown","thumb-down"]],["Dernière mise à jour le 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."]]