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, region, diskrequestIdCreates 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
regionstring
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__kind,
data__id,
data__creationTimestamp,
data__name,
data__description,
data__status,
data__sourceDisk,
data__sourceDiskId,
data__diskSizeGb,
data__storageBytes,
data__storageBytesStatus,
data__licenses,
data__snapshotEncryptionKey,
data__sourceDiskEncryptionKey,
data__selfLink,
data__labels,
data__labelFingerprint,
data__licenseCodes,
data__storageLocations,
data__autoCreated,
data__guestOsFeatures,
data__downloadBytes,
data__chainName,
data__satisfiesPzs,
data__guestFlush,
data__locationHint,
data__sourceSnapshotSchedulePolicy,
data__sourceSnapshotSchedulePolicyId,
data__sourceInstantSnapshot,
data__sourceInstantSnapshotId,
data__architecture,
data__snapshotType,
data__creationSizeBytes,
data__enableConfidentialCompute,
data__sourceDiskForRecoveryCheckpoint,
data__sourceInstantSnapshotEncryptionKey,
project,
region,
disk,
requestId
)
SELECT
'{{ kind }}',
'{{ id }}',
'{{ creationTimestamp }}',
'{{ name }}',
'{{ description }}',
'{{ status }}',
'{{ sourceDisk }}',
'{{ sourceDiskId }}',
'{{ diskSizeGb }}',
'{{ storageBytes }}',
'{{ storageBytesStatus }}',
'{{ licenses }}',
'{{ snapshotEncryptionKey }}',
'{{ sourceDiskEncryptionKey }}',
'{{ selfLink }}',
'{{ labels }}',
'{{ labelFingerprint }}',
'{{ licenseCodes }}',
'{{ storageLocations }}',
{{ autoCreated }},
'{{ guestOsFeatures }}',
'{{ downloadBytes }}',
'{{ chainName }}',
{{ satisfiesPzs }},
{{ guestFlush }},
'{{ locationHint }}',
'{{ sourceSnapshotSchedulePolicy }}',
'{{ sourceSnapshotSchedulePolicyId }}',
'{{ sourceInstantSnapshot }}',
'{{ sourceInstantSnapshotId }}',
'{{ architecture }}',
'{{ snapshotType }}',
'{{ creationSizeBytes }}',
{{ enableConfidentialCompute }},
'{{ sourceDiskForRecoveryCheckpoint }}',
'{{ sourceInstantSnapshotEncryptionKey }}',
'{{ project }}',
'{{ region }}',
'{{ disk }}',
'{{ requestId }}'
RETURNING
id,
name,
clientOperationId,
creationTimestamp,
description,
endTime,
error,
httpErrorMessage,
httpErrorStatusCode,
insertTime,
instancesBulkInsertOperationMetadata,
kind,
operationGroupId,
operationType,
progress,
region,
selfLink,
setCommonInstanceMetadataOperationMetadata,
startTime,
status,
statusMessage,
targetId,
targetLink,
user,
warnings,
zone
;