本页面上的部分或全部信息可能不适用于 Trusted Cloud by S3NS。
Artifact Registry Service Agent
Artifact Registry Service Agent 在与服务交互时会代表 Artifact Registry 执行操作。 Trusted Cloud by S3NS
在Trusted Cloud 项目中创建第一个 Artifact Registry 代码库后,系统会自动创建 Artifact Registry 服务代理。服务代理标识符为:
service-PROJECT-NUMBER@gcp-sa-artifactregistry.s3ns-system.iam.gserviceaccount.com
PROJECT-NUMBER 是运行 Artifact Registry 的Trusted Cloud 项目的项目编号。
您可以使用以下命令在没有任何代码库的项目中手动创建服务账号:
gcloud beta services identity create \
--service=artifactregistry.s3nsapis.fr \
--project=PROJECT-ID
将 PROJECT-ID
替换为 Trusted Cloud 项目 ID。
为 Artifact Registry Service Agent 授予项目中资源的 Artifact Registry Service Agent 角色 (roles/artifactregistry.serviceAgent
)。为了强制执行最小权限安全原则,该角色仅具有最低必要权限:
- 发布 Pub/Sub 主题:
pubsub.topics.publish
- 从 Artifact Registry 制品库下载工件:
artifactregistry.repositories.downloadArtifacts
- 删除工件:
artifactregistry.versions.delete
后续步骤
了解 Artifact Registry 角色以及如何配置对代码库的访问权限。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-18。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["没有我需要的信息","missingTheInformationINeed","thumb-down"],["太复杂/步骤太多","tooComplicatedTooManySteps","thumb-down"],["内容需要更新","outOfDate","thumb-down"],["翻译问题","translationIssue","thumb-down"],["示例/代码问题","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-18。"],[[["\u003cp\u003eThe Artifact Registry Service Agent operates on behalf of Artifact Registry when interacting with other Google Cloud services.\u003c/p\u003e\n"],["\u003cp\u003eThis service agent is automatically generated upon the creation of the first Artifact Registry repository within a Google Cloud project.\u003c/p\u003e\n"],["\u003cp\u003eThe service agent's identifier is \u003ccode\u003eservice-PROJECT-NUMBER@gcp-sa-artifactregistry.iam.gserviceaccount.com\u003c/code\u003e, where PROJECT-NUMBER represents the project number.\u003c/p\u003e\n"],["\u003cp\u003eThe service agent is granted the Artifact Registry Service Agent role, which includes permissions for publishing Pub/Sub topics, downloading artifacts, and deleting artifacts.\u003c/p\u003e\n"],["\u003cp\u003eYou can manually create the service agent in projects without any repositories using the provided \u003ccode\u003egcloud\u003c/code\u003e command.\u003c/p\u003e\n"]]],[],null,[]]