duanfang2708 2017-04-18 22:04
浏览 326
已采纳

如何创建启用了服务管理API的Google Cloud项目?

We're deploying our software on behalf (OAuth2) of users on Google Cloud. We've managed to automate most of it, but there's one bit that's missing.

  1. Creating the project is done with https://godoc.org/google.golang.org/api/cloudresourcemanager/v1#ProjectsService.Create
  2. Enabling the required APIs (compute, storage, etc) is done with google.golang.org/api/servicemanagement/v1#ServicesService.Enable (can't post as full link thanks to the very bright SO limitations)
  3. Creating the instance is done with google.golang.org/api/compute/v1#InstancesService.Insert

The missing bit is between step 1 and step 2: in order to make use of the Service Management API to enable the needed APIs, we need the Service Management API itself to be enabled on the project (how ironic). I'm hoping there must be a way to create a project with some APIs enabled from the start, maybe with cloudresourcemanager, or maybe with https://godoc.org/google.golang.org/api/deploymentmanager/v2, but I haven't found it so far.

So, to restate: does anyone know if it's possible (in Go) to create a Google Cloud project with some specific Google Cloud APIs enabled right on/after creation?

  • 写回答

2条回答 默认 最新

  • dtnmuyoiw680512744 2017-04-19 18:24
    关注
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 QT6颜色选择对话框显示不完整
  • ¥20 能提供一下思路或者代码吗
  • ¥15 用twincat控制!
  • ¥15 请问一下这个运行结果是怎么来的
  • ¥15 单通道放大电路的工作原理
  • ¥30 YOLO检测微调结果p为1
  • ¥15 DS18B20内部ADC模数转换器
  • ¥15 做个有关计算的小程序
  • ¥15 如何用MATLAB实现以下三个公式(有相互嵌套)
  • ¥30 关于#算法#的问题:运用EViews第九版本进行一系列计量经济学的时间数列数据回归分析预测问题 求各位帮我解答一下