This page contains code samples for Compute Engine. To search and filter code samples for other Google Cloud products, see the Google Cloud sample browser.
Change the auto-delete setting of a disk
Change the value of the auto-delete flag, which determines whether the disk attached to a VM is automatically deleted or not when you delete the VM.
Reset a VM instance
Performing a reset on your VM is similar to doing a hard reset on your computer, where you might press a reset button or press and hold the power button. Resetting a VM forcibly wipes the memory contents of the machine and resets the VM to its initial state. The VM does not perform a clean shutdown of the guest OS. Throughout this process, the VM remains in the RUNNING state.