发送反馈
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
使用 IAM 控制访问权限
Cloud Translation - Advanced API (v3) 使用 Identity and Access Management (IAM) 来控制访问权限。向主账号分配一个或多个 IAM 角色以授予权限。如需了解详情,请参阅 IAM 基本角色和预定义角色 。
注意 :Cloud Translation 基本版 (v2) 支持通过 IAM 进行身份验证,但不支持授权;您无法为 Cloud Translation 基本版指定精细的 IAM 权限。 适用于 v3 的预定义 Cloud Translation 角色
下表列出了可让您访问 Cloud Translation 资源的预定义角色:
Role
Permissions
Cloud Translation API Admin
(roles/cloudtranslate.admin
)
Full access to all Cloud Translation resources
automl.models.get
automl.models.predict
cloudtranslate.*
cloudtranslate.adaptiveMtDatasets.create
cloudtranslate.adaptiveMtDatasets.delete
cloudtranslate.adaptiveMtDatasets.get
cloudtranslate.adaptiveMtDatasets.import
cloudtranslate.adaptiveMtDatasets.list
cloudtranslate.adaptiveMtDatasets.predict
cloudtranslate.adaptiveMtFiles.delete
cloudtranslate.adaptiveMtFiles.get
cloudtranslate.adaptiveMtFiles.list
cloudtranslate.adaptiveMtSentences.list
cloudtranslate.customModels.create
cloudtranslate.customModels.delete
cloudtranslate.customModels.get
cloudtranslate.customModels.list
cloudtranslate.customModels.predict
cloudtranslate.datasets.create
cloudtranslate.datasets.delete
cloudtranslate.datasets.export
cloudtranslate.datasets.get
cloudtranslate.datasets.import
cloudtranslate.datasets.list
cloudtranslate.generalModels.batchDocPredict
cloudtranslate.generalModels.batchPredict
cloudtranslate.generalModels.docPredict
cloudtranslate.generalModels.get
cloudtranslate.generalModels.predict
cloudtranslate.glossaries.batchDocPredict
cloudtranslate.glossaries.batchPredict
cloudtranslate.glossaries.create
cloudtranslate.glossaries.delete
cloudtranslate.glossaries.docPredict
cloudtranslate.glossaries.get
cloudtranslate.glossaries.list
cloudtranslate.glossaries.predict
cloudtranslate.glossaries.update
cloudtranslate.glossaryentries.create
cloudtranslate.glossaryentries.delete
cloudtranslate.glossaryentries.get
cloudtranslate.glossaryentries.list
cloudtranslate.glossaryentries.update
cloudtranslate.languageDetectionModels.predict
cloudtranslate.locations.get
cloudtranslate.locations.list
cloudtranslate.operations.cancel
cloudtranslate.operations.delete
cloudtranslate.operations.get
cloudtranslate.operations.list
cloudtranslate.operations.wait
resourcemanager.projects.get
resourcemanager.projects.list
Cloud Translation API Editor
(roles/cloudtranslate.editor
)
Editor of all Cloud Translation resources
automl.models.get
automl.models.predict
cloudtranslate.*
cloudtranslate.adaptiveMtDatasets.create
cloudtranslate.adaptiveMtDatasets.delete
cloudtranslate.adaptiveMtDatasets.get
cloudtranslate.adaptiveMtDatasets.import
cloudtranslate.adaptiveMtDatasets.list
cloudtranslate.adaptiveMtDatasets.predict
cloudtranslate.adaptiveMtFiles.delete
cloudtranslate.adaptiveMtFiles.get
cloudtranslate.adaptiveMtFiles.list
cloudtranslate.adaptiveMtSentences.list
cloudtranslate.customModels.create
cloudtranslate.customModels.delete
cloudtranslate.customModels.get
cloudtranslate.customModels.list
cloudtranslate.customModels.predict
cloudtranslate.datasets.create
cloudtranslate.datasets.delete
cloudtranslate.datasets.export
cloudtranslate.datasets.get
cloudtranslate.datasets.import
cloudtranslate.datasets.list
cloudtranslate.generalModels.batchDocPredict
cloudtranslate.generalModels.batchPredict
cloudtranslate.generalModels.docPredict
cloudtranslate.generalModels.get
cloudtranslate.generalModels.predict
cloudtranslate.glossaries.batchDocPredict
cloudtranslate.glossaries.batchPredict
cloudtranslate.glossaries.create
cloudtranslate.glossaries.delete
cloudtranslate.glossaries.docPredict
cloudtranslate.glossaries.get
cloudtranslate.glossaries.list
cloudtranslate.glossaries.predict
cloudtranslate.glossaries.update
cloudtranslate.glossaryentries.create
cloudtranslate.glossaryentries.delete
cloudtranslate.glossaryentries.get
cloudtranslate.glossaryentries.list
cloudtranslate.glossaryentries.update
cloudtranslate.languageDetectionModels.predict
cloudtranslate.locations.get
cloudtranslate.locations.list
cloudtranslate.operations.cancel
cloudtranslate.operations.delete
cloudtranslate.operations.get
cloudtranslate.operations.list
cloudtranslate.operations.wait
resourcemanager.projects.get
resourcemanager.projects.list
Cloud Translation API Service Agent
(roles/cloudtranslate.serviceAgent
)
Gives Cloud Translation Service Account access to consumer resources.
Warning: Do not grant service agent roles to any principals except
service agents .
automl.datasets.export
automl.datasets.get
automl.datasets.list
automl.models.get
automl.models.list
automl.operations.get
storage.buckets.get
storage.objects.create
storage.objects.get
storage.objects.list
Cloud Translation API User
(roles/cloudtranslate.user
)
User of Cloud Translation and AutoML models
automl.models.get
automl.models.predict
cloudtranslate.adaptiveMtDatasets.get
cloudtranslate.adaptiveMtDatasets.list
cloudtranslate.adaptiveMtDatasets.predict
cloudtranslate.adaptiveMtFiles.get
cloudtranslate.adaptiveMtFiles.list
cloudtranslate.adaptiveMtSentences.list
cloudtranslate.customModels.get
cloudtranslate.customModels.list
cloudtranslate.customModels.predict
cloudtranslate.datasets.get
cloudtranslate.datasets.list
cloudtranslate.generalModels.*
cloudtranslate.generalModels.batchDocPredict
cloudtranslate.generalModels.batchPredict
cloudtranslate.generalModels.docPredict
cloudtranslate.generalModels.get
cloudtranslate.generalModels.predict
cloudtranslate.glossaries.batchDocPredict
cloudtranslate.glossaries.batchPredict
cloudtranslate.glossaries.docPredict
cloudtranslate.glossaries.get
cloudtranslate.glossaries.list
cloudtranslate.glossaries.predict
cloudtranslate.glossaryentries.get
cloudtranslate.glossaryentries.list
cloudtranslate.languageDetectionModels.predict
cloudtranslate.locations.*
cloudtranslate.locations.get
cloudtranslate.locations.list
cloudtranslate.operations.get
cloudtranslate.operations.list
cloudtranslate.operations.wait
resourcemanager.projects.get
resourcemanager.projects.list
Cloud Translation API Viewer
(roles/cloudtranslate.viewer
)
Viewer of all Translation resources
automl.models.get
cloudtranslate.adaptiveMtDatasets.get
cloudtranslate.adaptiveMtDatasets.list
cloudtranslate.adaptiveMtFiles.get
cloudtranslate.adaptiveMtFiles.list
cloudtranslate.adaptiveMtSentences.list
cloudtranslate.customModels.get
cloudtranslate.customModels.list
cloudtranslate.datasets.get
cloudtranslate.datasets.list
cloudtranslate.generalModels.get
cloudtranslate.glossaries.get
cloudtranslate.glossaries.list
cloudtranslate.glossaryentries.get
cloudtranslate.glossaryentries.list
cloudtranslate.locations.*
cloudtranslate.locations.get
cloudtranslate.locations.list
cloudtranslate.operations.get
cloudtranslate.operations.list
cloudtranslate.operations.wait
resourcemanager.projects.get
resourcemanager.projects.list
自定义角色
如果预定义角色无法为您的用例提供正确的权限集,请创建自定义角色。自定义角色可以包含您指定的任何权限。例如,您可以创建具有特定管理操作能力的自定义角色,例如创建字典或管理自定义模型。要创建自定义角色,请参阅创建和管理自定义角色 。
后续步骤
如需详细了解如何在项目中授予角色,请参阅授予角色 。您可以通过这种方式授予预定义角色或自定义角色。
如需详细了解 IAM,请参阅 IAM 概览 。
发送反馈
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可 获得了许可,并且代码示例已根据 Apache 2.0 许可 获得了许可。有关详情,请参阅 Google 开发者网站政策 。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-25。
需要向我们提供更多信息?
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-25。"],[],[],null,["# Control access with IAM\n=======================\n\nThe Cloud Translation - Advanced API (v3) uses Identity and Access Management (IAM) to\ncontrol access. Assign one or more IAM roles to a principal to\ngrant permissions. For more information, see [IAM basic and predefined\nroles](/iam/docs/understanding-roles).\n| **Note:** Cloud Translation - Basic (v2) supports authentication through IAM but not authorization; you cannot specify granular IAM permissions for Cloud Translation - Basic.\n\nPredefined Cloud Translation roles for v3\n-----------------------------------------\n\nThe following table lists the predefined roles that give you access to\nCloud Translation resources: \n\nCustom roles\n------------\n\nIf a predefined role doesn't offer the right set of permissions for your use\ncase, create a custom role. Custom roles can include any permissions that you\nspecify. For example, you can create a custom role with specific administrative\noperations, such as creating glossaries or managing custom models. To create\ncustom roles, see [Creating and managing custom\nroles](/iam/docs/creating-custom-roles).\n\nWhat's next\n-----------\n\n- For more information about granting a role on a project, see [Grant a\n role](/iam/docs/granting-changing-revoking-access#single-role). You can grant predefined or custom roles in this way.\n- To learn more about IAM, see [IAM\n overview](https://cloud.google.com/iam/docs/overview)."]]