Mantenha tudo organizado com as coleções
Salve e categorize o conteúdo com base nas suas preferências.
O Cloud Endpoints usa o Service Management para gerenciar a API. Quando você implanta o documento OpenAPI usando o comando gcloud endpoints services
deploy, esse comando utiliza o Service Management para criar um serviço gerenciado na API.
Se você excluir um serviço gerenciado usando o comando gcloud endpoints services delete, o Service Management não fará a remoção imediatamente. O Service Management desativa o serviço gerenciado por 30 dias, o que permite que você tenha tempo para restaurá-lo, se necessário. Após 30 dias, o Service Management excluirá permanentemente o serviço gerenciado.
Enquanto o serviço gerenciado está no estado desativado, o Service Management não permite a criação de outro com o mesmo nome.
Para restaurar um serviço gerenciado:
Verifique se a CLI do Google Cloud (gcloud) está autorizada a acessar dados e serviços no Google Cloud:
gcloudauthlogin
Restaure o serviço gerenciado e atribua-o ao projetoGoogle Cloud em que foi originalmente criado. Substitua
[SERVICE_NAME] pelo nome do serviço gerenciado.
gcloudendpointsservicesundelete[SERVICE_NAME]
Solução de problemas
Se o comando gcloud endpoints services undelete falhar com um erro de permissão parecido com este:
ERROR: (gcloud.endpoints.services.undelete) User [EMAIL] does not have permission to access service
Execute gcloud auth login e escolha uma conta de usuário com permissão para acessar o projeto que contém o serviço gerenciado.
Verifique se você tem o papel do IAM de administrador do Service Management (roles/servicemanagement.admin).
[[["Fácil de entender","easyToUnderstand","thumb-up"],["Meu problema foi resolvido","solvedMyProblem","thumb-up"],["Outro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Informações incorretas ou exemplo de código","incorrectInformationOrSampleCode","thumb-down"],["Não contém as informações/amostras de que eu preciso","missingTheInformationSamplesINeed","thumb-down"],["Problema na tradução","translationIssue","thumb-down"],["Outro","otherDown","thumb-down"]],["Última atualização 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."]]