JDOaktown
JDOaktown

Reputation: 4474

How to convert GCP console to API command?

I would like to know the API commands used when I use the GCP console.

For example, below is a screenshot of the GCP console to create a VM instance.

How to see what the

gcloud compute instances create VM_NAME [--image IMAGE | --image-family IMAGE_FAMILY] --image-project IMAGE_PROJECT --machine-type=  

statement would be if the "CREATE" button is pressed on the console?

enter image description here

Upvotes: 1

Views: 392

Answers (2)

Galuoises
Galuoises

Reputation: 3283

In addition to the accepted solution if you use any gcloud command you can get the equivalent rest api command adding the flag --log-http

Upvotes: 2

JDOaktown
JDOaktown

Reputation: 4474

This was much easier than I thought. Thank you kornshell93.

At the bottom of the GCP console, next to the create and cancel button, there is a button called

equivalent command line

enter image description here

Upvotes: 1

Related Questions