A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://cloud.google.com/compute/docs/instances/get-list below:

Get a list of VMs | Compute Engine Documentation

To view a summary of VMs running in your project, get a list of VMs. This document shows you how to get a list of VMs in all zones or in specific zones.

Console

In the Google Cloud console, go to the VM instances page:

Go to VM instances

gcloud

Get an aggregate list of all VMs in all zones for a project by using the gcloud compute instances list command:

gcloud compute instances list

To narrow the list of VMs to a specific zone, use the previous command with the --zones flag.

Go

The following example get a list of instances across all zones in your project:

Before trying this sample, follow the Go setup instructions in the Compute Engine quickstart using client libraries. For more information, see the Compute Engine Go API reference documentation.

To authenticate to Compute Engine, set up Application Default Credentials. For more information, see Set up authentication for a local development environment.

You can also get a list instances in a specific zone:

Java

The following example get a list of instances across all zones in your project:

Before trying this sample, follow the Java setup instructions in the Compute Engine quickstart using client libraries. For more information, see the Compute Engine Java API reference documentation.

To authenticate to Compute Engine, set up Application Default Credentials. For more information, see Set up authentication for a local development environment.

You can also get a list instances in a specific zone:

Node.js

The following example get a list of instances across all zones in your project:

Before trying this sample, follow the Node.js setup instructions in the Compute Engine quickstart using client libraries. For more information, see the Compute Engine Node.js API reference documentation.

To authenticate to Compute Engine, set up Application Default Credentials. For more information, see Set up authentication for a local development environment.

You can also get a list instances in a specific zone:

Python

The following example get a list of instances across all zones in your project:

Before trying this sample, follow the Python setup instructions in the Compute Engine quickstart using client libraries. For more information, see the Compute Engine Python API reference documentation.

To authenticate to Compute Engine, set up Application Default Credentials. For more information, see Set up authentication for a local development environment.

You can also get a list instances in a specific zone:

REST

Get an aggregate list of all VMs in all zones in a project by using the instances.aggregatedList method:

GET https://compute.googleapis.com/compute/v1/projects/PROJECT/aggregated/instances

Replace PROJECT with the name of the project to get a list of VMs from.

To narrow the list of VMs to a specific zone, use the instances.list method:

GET https://compute.googleapis.com/compute/v1/projects/PROJECT/zones/ZONE/instances

Replace the following:


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4