Skip to main content

Suspend Compute Instance

This method suspends a running instance, saving its state to persistent storage, and allows you to resume the instance at a later time. Suspended instances have no compute costs (cores or RAM), and incur only storage charges for the saved VM memory and localSSD data. Any charged resources the virtual machine was using, such as persistent disks and static IP addresses, will continue to be charged while the instance is suspended.

External Documentation

To learn more, visit the GCP documentation.

Basic Parameters

ParameterDescription
InstanceName of the instance resource to suspend.
ProjectProject ID for this request.
ZoneThe name of the zone for this request.

Advanced Parameters

ParameterDescription
Request IDAn optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).

Example Output

{
"clientOperationId": "[Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.",
"creationTimestamp": "[Deprecated] This field is deprecated.",
"description": "[Output Only] A textual description of the operation, which is set when the operation is created.",
"endTime": "[Output Only] The time that this operation was completed. This value is in RFC3339 text format.",
"error": {
"errors": [
{
"code": "[Output Only] The error type identifier for this error.",
"location": "[Output Only] Indicates the field in the request that caused the error. This property is optional.",
"message": "[Output Only] An optional, human-readable error message."
}
]
},
"httpErrorMessage": "[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.",
"httpErrorStatusCode": 0,
"id": "[Output Only] The unique identifier for the operation. This identifier is defined by the server.",
"insertTime": "[Output Only] The time that this operation was requested. This value is in RFC3339 text format.",
"kind": "compute#operation",
"name": "[Output Only] Name of the operation.",
"operationGroupId": "[Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.",
"operationType": "[Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.",
"progress": 0,
"region": "[Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.",
"selfLink": "[Output Only] Server-defined URL for the resource.",
"startTime": "[Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.",
"status": "[Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.",
"statusMessage": "[Output Only] An optional textual description of the current status of the operation.",
"targetId": "[Output Only] The unique target ID, which identifies a specific incarnation of the target resource.",
"targetLink": "[Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.",
"user": "[Output Only] User who requested the operation, for example: `user@example.com`.",
"warnings": [
{
"code": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.",
"data": [
{
"key": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).",
"value": "[Output Only] A warning data value corresponding to the key."
}
],
"message": "[Output Only] A human-readable description of the warning code."
}
],
"zone": "[Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations."
}

Workflow Library Example

Suspend Compute Instance with Gcp and Send Results Via Email

Workflow LibraryPreview this Workflow on desktop