The Compute Engine API lets you create and run virtual machines (VMs) on Google Cloud.
This document shows you how to initialize the Compute Engine client library for Rust and perform basic operations using the library.
Prerequisites
Before you start this document, 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 Instances client creates and manages virtual machines. 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.