[英]How to create a Google Cloud project with service management API enabled?
We're deploying our software on behalf (OAuth2) of users on Google Cloud. 我们正在Google Cloud上代表用户(OAuth2)部署我们的软件。 We've managed to automate most of it, but there's one bit that's missing.
我们已经成功实现了大部分的自动化,但有一点缺失了。
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). 缺少的位在步骤1和步骤2之间:为了利用
Service Management API to enable the needed APIs
,我们需要在项目上启用Service Management API本身(多么具有讽刺意味)。 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. 我希望必须有一种方法来创建一个项目,从一开始就启用一些API,可能使用cloudresourcemanager,或者可能使用https://godoc.org/google.golang.org/api/deploymentmanager/v2 ,但我到目前为止还没有找到它。
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? 重申:有没有人知道是否可以(在Go中)创建一个Google Cloud项目,在创建之后/之后启用一些特定的Google Cloud API?
The Google Cloud Resource Manager API is very limited in what it will allow you to do. Google Cloud Resource Manager API在允许您执行的操作方面非常有限。
while it does have a projects.update method it does not support enabling APIs. 虽然它有一个projects.update方法,但它不支持启用API。 Your going to have to manually edit the project.
您将不得不手动编辑项目。
Use the Service Usage API: https://cloud.google.com/service-usage/docs/reference/rest/ 使用服务使用API: https : //cloud.google.com/service-usage/docs/reference/rest/
(updated) (更新)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.