The Compute Engine API lets you create and run virtual machines (VMs) on Google Cloud.
This guide shows you how to initialize the Compute Engine client library for Rust and perform basic operations using the library.
Prerequisites
Before you start this guide, make sure that you have an existing Google Cloud project with billing enabled.
Add the client library as a dependency
Use cargo to add the google-cloud-compute-v1 crate to your Cargo.toml
file:
cargo add google-cloud-compute-v1
List virtual machines
The client to create and manage virtual machines is called Instances. You can
list the VMs in a project and zone using the list() method of this type:
What's next
- Learn more about the Compute Engine client libraries.
- Learn about Working with long-running operations.
- Learn about Configuring polling policies.