Nesta página, descrevemos as opções de controle de acesso à API disponíveis no Google Cloud Endpoints.
Visão geral
O Endpoints usa o gerenciamento de identidade e acesso (IAM) para controlar o acesso à sua API. Você pode conceder acesso à API nos níveis de projeto e de serviço individual do Endpoints. Por exemplo:
Conceda acesso aos participantes por serviço.
Conceder permissão a uma conta de usuário ou serviço para implantar uma configuração atualizada do Endpoints.
Conceder acesso aos usuários da API para que eles possam ativar a API no próprio
projetoGoogle Cloud .
Papéis que controlam o acesso aos serviços
Você pode atribuir os papéis abaixo a um serviço específico na página Endpoints >
Serviços no Google Cloud console, usando a API ou a
CLI do Google Cloud.
Nome do papel do IAM
Título do papel
Descrição
roles/servicemanagement.serviceConsumer
Consumidor de serviço
Permissões para que um participante visualize e ative a API no próprio
projeto. É possível conceder o papel Consumidor de serviço somente a Contas do Google, Grupos do Google ou contas de serviço.
roles/servicemanagement.serviceController
Controlador de serviço
Permissões para fazer chamadas para os métodos check e
report na API Service Infrastructure no ambiente de execução. Esse papel costuma ser concedido a contas de serviço. Para mais informações sobre esse papel, consulte o tópico Controle de acesso à Service Management API.
roles/servicemanagement.configEditor
Editor de configuração do serviço
Permissão para implantar configurações do Endpoints. Esse papel é mais restritivo que o papel editor do projeto concedido em um serviço.
roles/servicemanagement.admin
Administrador do Service Management
Todas as permissões Editor de configuração do serviço e permissões para gerenciar o acesso à API. Comparável ao papel Proprietário do projeto concedido em um serviço.
[[["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 Identity and Access Management (IAM) to manage API access, allowing permissions to be set at both the project and individual service levels.\u003c/p\u003e\n"],["\u003cp\u003eThe Service Consumer role permits principals to view and enable an API within their own Google Cloud project, and can only be granted to Google Accounts, Google Groups, or service accounts.\u003c/p\u003e\n"],["\u003cp\u003eThe Service Controller role grants permission to invoke the \u003ccode\u003echeck\u003c/code\u003e and \u003ccode\u003ereport\u003c/code\u003e methods in the Service Infrastructure API during runtime, and is typically assigned to service accounts.\u003c/p\u003e\n"],["\u003cp\u003eThe Service Config Editor role enables the deployment of Endpoints configurations, offering more restricted permissions compared to the Project Editor role at the service level.\u003c/p\u003e\n"],["\u003cp\u003eThe Service Management Administrator role includes all permissions of the Service Config Editor, and grants the ability to manage API access, resembling the Project Owner role at a service level.\u003c/p\u003e\n"]]],[],null,["# Overview of API access\n\n[OpenAPI](/endpoints/docs/openapi/api-access-overview \"View this page for the Cloud Endpoints OpenAPI docs\") \\| gRPC\n\n\u003cbr /\u003e\n\nThis page describes the API access control options available to you in\nCloud Endpoints.\n\nOverview\n--------\n\nEndpoints uses\n[Identity and Access Management (IAM)](/iam/docs)\nto control access to your API. You can grant access to your API at the project\nlevel and at the individual Endpoints service level. For example,\nyou can:\n\n- Grant access to principals on a per-service basis.\n- Grant permission to a user or service account to deploy an updated Endpoints configuration.\n- Grant access to your API users so they can enable your API in their own Google Cloud project.\n\nRoles that control access to services\n-------------------------------------\n\nYou can grant the following roles for a specific service on the **Endpoints** \\\u003e\n**Services** page in the Google Cloud console, by using the API, or by\nusing the Google Cloud CLI.\n\n| **Note:** Although you can grant other roles at the service level, we recommend that you use the roles listed in the previous table to manage your API.\n\nWhat's next\n-----------\n\n- [Controlling who can enable your API](/endpoints/docs/grpc/control-api-callers).\n- [Granting and revoking access to the API](/endpoints/docs/grpc/control-api-access)."]]