I'm working on a new project where I plan to replace a collection of one-off shell scripts that call gcloud
and gsutil
with Google Cloud Go APIs and client libraries. The main driver behind this is so I can have easier to maintain and testable code to manage a large scale GCP automation project.
I've dug through all of the Google doc and cannot seem to find anything that covers what underlying APIs glcoud
calls, or the glcoud
source code. To add to this, the GCP go APIs don't seem to cover what I'm looking for. I have been able to find some of what I need offered in the REST APIs, but even then, it's not entirely clear what gcloud
commands map to what REST API endpoints.
An example would be: gcloud addresses describe gce_vm_foo
The only thing I can find that fits is this endpoint from the REST API, found through digging through the enormous pile of documentation and trial and error: https://godoc.org/google.golang.org/api/compute/v1#InstancesService.Get
I realize this is a very open ended question, but any pointing in the right right direction is much appreciated.
question from:
https://stackoverflow.com/questions/65623699/where-can-i-find-which-apis-gcloud-calls 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…