Skip to main content

Create Compute Disk Snapshot

Creates a snapshot of a specified persistent disk.

External Documentation

To learn more, visit the GCP documentation.

Basic Parameters

ParameterDescription
DiskName of the persistent disk to snapshot.
ProjectProject ID for this request.
ZoneThe name of the zone for this request.

Advanced Parameters

ParameterDescription
Chain NameCreates the new snapshot in the snapshot chain labeled with the specified name. The chain name must be 1-63 characters long and comply with RFC1035. This is an uncommon option only for advanced service owners who needs to create separate snapshot chains, for example, for chargeback tracking. When you describe your snapshot resource, this field is visible only if it has a non-empty value.
DescriptionAn optional description of this resource. Provide this property when you create the resource.
Guest Flush[Input Only] Whether to attempt an application consistent snapshot by informing the OS to prepare for the snapshot process. Currently only supported on Windows instances using the Volume Shadow Copy Service (VSS).
Label FingerprintA fingerprint for the labels being applied to this snapshot, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve a snapshot.
LabelsLabels to apply to this snapshot. These can be later modified by the setLabels method. Label values may be empty.
Location HintAn opaque location hint used to place the snapshot close to other resources. This field is for use by internal tools that use the public API.
NameName of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
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).
Snapshot Encryption Key Kms Key NameThe name of the encryption key that is stored in Google Cloud KMS. For example: "kmsKeyName": "projects/kmsprojectid/locations/region/keyRings/ key_region/cryptoKeys/key.
Snapshot Encryption Key Kms Key Service AccountThe service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used. For example: "kmsKeyServiceAccount": "name@project_id.iam.gserviceaccount.com/.
Snapshot Encryption Key Raw KeySpecifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. You can provide either the rawKey or the rsaEncryptedKey. For example: "rawKey": "SGVsbG8gZnJvbSBHb29nbGUgQ2xvdWQgUGxhdGZvcm0=".
Snapshot Encryption Key Rsa Encrypted KeySpecifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource. You can provide either the rawKey or the rsaEncryptedKey. For example: "rsaEncryptedKey": "ieCx/NcW06PcT7Ep1X6LUTc/hLvUDYyzSZPPVCVPTVEohpeHASqC8uw5TzyO9U+Fka9JFH z0mBibXUInrC/jEk014kCK/NPjYgEMOyssZ4ZINPKxlUh2zn1bV+MCaTICrdmuSBTWlUUiFoD D6PYznLwh8ZNdaheCeZ8ewEXgFQ8V+sDroLaN3Xs3MDTXQEMMoNUXMCZEIpg9Vtp9x2oe==" The key must meet the following requirements before you can provide it to Compute Engine: 1. The key is wrapped using a RSA public key certificate provided by Google. 2. After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at: https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem.
Source Disk Encryption Key Kms Key NameThe name of the encryption key that is stored in Google Cloud KMS. For example: "kmsKeyName": "projects/kmsprojectid/locations/region/keyRings/ key_region/cryptoKeys/key.
Source Disk Encryption Key Kms Key Service AccountThe service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used. For example: "kmsKeyServiceAccount": "name@project_id.iam.gserviceaccount.com/.
Source Disk Encryption Key Raw KeySpecifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. You can provide either the rawKey or the rsaEncryptedKey. For example: "rawKey": "SGVsbG8gZnJvbSBHb29nbGUgQ2xvdWQgUGxhdGZvcm0=".
Source Disk Encryption Key Rsa Encrypted KeySpecifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource. You can provide either the rawKey or the rsaEncryptedKey. For example: "rsaEncryptedKey": "ieCx/NcW06PcT7Ep1X6LUTc/hLvUDYyzSZPPVCVPTVEohpeHASqC8uw5TzyO9U+Fka9JFH z0mBibXUInrC/jEk014kCK/NPjYgEMOyssZ4ZINPKxlUh2zn1bV+MCaTICrdmuSBTWlUUiFoD D6PYznLwh8ZNdaheCeZ8ewEXgFQ8V+sDroLaN3Xs3MDTXQEMMoNUXMCZEIpg9Vtp9x2oe==" The key must meet the following requirements before you can provide it to Compute Engine: 1. The key is wrapped using a RSA public key certificate provided by Google. 2. After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at: https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem.
Storage LocationsCloud Storage bucket storage location of the snapshot (regional or multi-regional).

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

Create Compute Disk Snapshot with Gcp and Send Results Via Email

Workflow LibraryPreview this Workflow on desktop