Questions tagged [google-compute-api]
30 questions
0
votes
1 answer
How can I get virtual machines specifications from Google cloud?
I would like to know if there is a way to collect the technical specifications of a virtual machine from Google Cloud (CPU, frequency, memory, storage) ?
I am using the billing API…

Scryper
- 178
- 1
- 14
0
votes
1 answer
GCP Compute Engine Python API proper way to create clients
What is the current "standard" way to create a gcp compute client in python? I have seen both:
import googleapiclient.discovery
service = googleapiclient.discovery.build(
'container', 'v1', credentials=credentials)
body = {
…

Lister
- 170
- 7
0
votes
1 answer
Which client library to use to interact with Google Cloud Compute
I am working on a project to interact with Google Cloud Compute. For that I found 2 ways to interact with Google Cloud using Python (Can use other languages too);
Google API clients(Rest orchestration) - google-api-python-client
Google cloud…

Yogesh Patil
- 908
- 4
- 14
0
votes
1 answer
How do I specify only running instances in Google's Python API client?
I am building a list of gcloud instances using the Python API.
These are the commands that pull the info from GCP on the servers:
project_id = 'company1'
zone = 'us-east1-b'
compute = googleapiclient.discovery.build('compute', 'v1')
result =…

bluethundr
- 1,005
- 17
- 68
- 141
0
votes
1 answer
Access google storage from compute instance with no external IP
I need to read and write to a google storage from my vm with no public IP. It has a disk with a custom image with everything I need: python etc.
I create an instance with a script like this one. In the config dictionary you can see the section…

David
- 302
- 3
- 13
0
votes
1 answer
GKE REST/Node API call to get number of nodes in a pool?
How can I get the current size of a GKE node pool using the REST (or Node) API?
I'm managing my own worker pool using my Express app running on my cluster, and can set the size of the pool and track the success of the setSize operation, but I see no…

Daniel Wexler
- 131
- 1
- 7
0
votes
1 answer
Google Cloud - Compute Engine, Insert Instance with Instance Template
I want to create a Instance using a InstanceTemplate via the java google-api-client. After executing the operation the new instance is displayed, beein created, in the Compute Engine frontend of GCP. After 10-15s the instance disappears.
Following…

Mawiguk0
- 33
- 5
0
votes
1 answer
How can I get a partial response for Method: instances.aggregatedList Compute API in GCP
I am trying to get specific response from Compute API method instances.aggregatedList by setting the fields request param as per https://cloud.google.com/resource-manager/docs/performance#partial-response
But I am getting 400 BAD REQUEST.
Is there a…

Maninder Chhabra
- 103
- 2
- 11
0
votes
1 answer
Fetching List public VM Images in Google Cloud
I am using C# Google SDK to fetch the list of public ubuntu or debian VM Images available in Google Cloud.
The response is a long list of VM' having primarily the deprecated State as "OBSOLETE".
When applying the filter for ACTIVE state the response…

Sam
- 51
- 6
0
votes
1 answer
How to retrieve the compute engine name from snapshot API response?
I need to list all the compute instance snapshots successfully created in a project (only for compute instance types), along with the compute engine names.
I am using this API:…

user1403505
- 895
- 2
- 19
- 42
0
votes
1 answer
Suspend Google Cloud Platform instance using Java
I have a Java web application in which I create GCP VM instances and perform operations on them.
I use the Java Compute Engine API to perform tasks such as creation, start, stop etc.
I wanted to perfrom:
Compute compute = getComputeObj();
Suspend…

Uri Shapira
- 369
- 1
- 2
- 17
0
votes
2 answers
Is there any API in GCP to get the resource usage details..?
I am looking for some API's in GCP that can fetch the usage of resource in terms of usage hours, storage usage etc

Cloud_wiz
- 9
- 4
0
votes
1 answer
Why do i see traffic on the Compute Engine API?
I am using Google cloud to run some services. speifically, I have code running in firebase, as well as Cloud Run and Cloud SQL.
For some reason, however, I am seeing constant traffic to a compute engine API, which I have no idea why? I don't have…

mike hennessy
- 1,359
- 1
- 16
- 35
0
votes
1 answer
Check Google compute VM instance state
How can I check (inside Java code) if a VM instance on google compute engine is running or not? Thank you in advance.

Nane Petrosyan
- 553
- 1
- 7
- 19
0
votes
2 answers
How to invalidate Google CDN cache using REST API Java?
I have been researching for a working example for this but haven't found any.
I referred following links
Stackoverflow Link and Google Official Docs
From these documentations I did understand that I need to implement this
import…

Oliver
- 6,152
- 2
- 42
- 75