Stops a running instance, shutting it down cleanly, and allows you to restart the instance at a later time.

gce_vm_stop(instance, project = gce_get_global_project(),
  zone = gce_get_global_zone())

Arguments

instance
Name of the instance resource, or an instance object e.g. from gce_get_instance
project
Project ID for this request, default as set by gce_get_global_project
zone
The name of the zone for this request, default as set by gce_get_global_zone

Details

Authentication scopes used by this function are:

  • https://www.googleapis.com/auth/cloud-platform
  • https://www.googleapis.com/auth/compute

Stopped instances do not incur per-minute, virtual machine usage charges while they are stopped, but any resources that the virtual machine is using, such as persistent disks and static IP addresses, will continue to be charged until they are deleted.

See also

https://developers.google.com/compute/docs/reference/latest/