Skip to main content

disks_snapshot

Creates, updates, deletes, gets or lists a disks_snapshot resource.

Overview

Namedisks_snapshot
TypeResource
Idgoogle.compute.disks_snapshot

Fields

The following fields are returned by SELECT queries:

SELECT not supported for this resource, use SHOW METHODS to view available operations for the resource.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
create_snapshotinsertproject, zone, diskguestFlush, requestIdCreates a snapshot of a specified persistent disk. For regular snapshot
creation, consider using snapshots.insert
instead, as that method supports more features, such as creating snapshots
in a project different from the source disk project.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
diskstring
projectstring
zonestring
guestFlushboolean
requestIdstring

INSERT examples

Creates a snapshot of a specified persistent disk. For regular snapshot
creation, consider using snapshots.insert
instead, as that method supports more features, such as creating snapshots
in a project different from the source disk project.

INSERT INTO google.compute.disks_snapshot (
data__labelFingerprint,
data__params,
data__guestFlush,
data__sourceDiskForRecoveryCheckpoint,
data__labels,
data__locationHint,
data__sourceDisk,
data__chainName,
data__sourceDiskEncryptionKey,
data__snapshotEncryptionKey,
data__name,
data__snapshotType,
data__sourceInstantSnapshot,
data__description,
data__sourceInstantSnapshotEncryptionKey,
data__storageLocations,
project,
zone,
disk,
guestFlush,
requestId
)
SELECT
'{{ labelFingerprint }}',
'{{ params }}',
{{ guestFlush }},
'{{ sourceDiskForRecoveryCheckpoint }}',
'{{ labels }}',
'{{ locationHint }}',
'{{ sourceDisk }}',
'{{ chainName }}',
'{{ sourceDiskEncryptionKey }}',
'{{ snapshotEncryptionKey }}',
'{{ name }}',
'{{ snapshotType }}',
'{{ sourceInstantSnapshot }}',
'{{ description }}',
'{{ sourceInstantSnapshotEncryptionKey }}',
'{{ storageLocations }}',
'{{ project }}',
'{{ zone }}',
'{{ disk }}',
'{{ guestFlush }}',
'{{ requestId }}'
RETURNING
id,
name,
clientOperationId,
creationTimestamp,
description,
endTime,
error,
getVersionOperationMetadata,
httpErrorMessage,
httpErrorStatusCode,
insertTime,
instancesBulkInsertOperationMetadata,
kind,
operationGroupId,
operationType,
progress,
region,
selfLink,
setCommonInstanceMetadataOperationMetadata,
startTime,
status,
statusMessage,
targetId,
targetLink,
user,
warnings,
zone
;