ResourceManager 的 GAPIC 客户端
我正在尝试创建一个列出 GCP 中所有项目的 java 客户端,我已使用文档中提到的 google-cloud-resourcemanager
。它工作正常,但我不断收到 ResourceManager 已被弃用的信息。 ResourceManager v3 GAPIC 客户端现已推出
。不确定什么是 Gapic 客户端以及如何使用它?
I'm trying to create a java client listing all projects in GCP, I've used google-cloud-resourcemanager
as mentioned in the documentation. It works fine but I keep getting ResourceManager is deprecated. v3 GAPIC client of ResourceManager is now available
. Not sure what is a Gapic client and how do I use it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我刚刚遇到了相同的弃用消息,经过一些研究,我认为该消息具有极大的误导性 - 实际上新设计中没有等效的
ResourceManager
,它已被分解为许多不同的客户端。特别是,ResourceManager.get()
的弃用消息显示请改用 com.google.cloud.resourcemanager.v3.ProjectsClient.getProject()
。(现在还有单独的
OrganizationsClient
和FoldersClient
对象)I just encountered the same deprecation message, and after some research I believe that the message is terribly misleading - there actually is no
ResourceManager
equivalent in the new design, it has been broken apart into a number of different clients. In particular, the deprecation message forResourceManager.get()
saysPlease use com.google.cloud.resourcemanager.v3.ProjectsClient.getProject() instead
.(There are also now separate
OrganizationsClient
andFoldersClient
objects as well)