问题描述
TL; DR 我正在尝试重新创建此gcloud alpha command
gcloud alpha services api-keys create
我了解构造resource
与gcloud api进行交互的方法类似于
from googleapiclient import discovery
from oauth2client.client import GoogleCredentials
resource = discovery.build(serviceName='serviceName',version='v1',credentials=GoogleCredentials.get_application_default())
我正在努力确定与serviceName
命令相对应的alpha services api-keys
是什么。
以gcloud alpha services list --available
的价格列出服务
...
serviceconsumermanagement.googleapis.com Service Consumer Management API
servicecontrol.googleapis.com Service Control API
servicedirectory.googleapis.com Service Directory API
servicemanagement.googleapis.com Service Management API
servicenetworking.googleapis.com Service Networking API
serviceusage.googleapis.com Service Usage API
...
我尝试过servicemanagement
(听起来最合理的一种),但是它没有alpha
版本,也没有我在其他服务中惯用的v1alpha1
。
相关问题:是否有一种方法可以跟踪cli执行哪些命令/网络请求,以便对它实际调用的服务/资源进行反向工程?我认为gcloud
cli的核心只是一些REST / rpc调用的包装,不是吗?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)