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

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

Methods

NameAccessible byRequired ParamsDescription
create_snapshotINSERTdisk, project, zoneCreates 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 example

Use the following StackQL query and manifest file to create a new disks_snapshot resource.

/*+ create */
INSERT INTO google.compute.disks_snapshot (
disk,
project,
zone,
name,
description,
status,
sourceDisk,
sourceDiskId,
diskSizeGb,
storageBytes,
storageBytesStatus,
licenses,
snapshotEncryptionKey,
sourceDiskEncryptionKey,
labels,
labelFingerprint,
licenseCodes,
storageLocations,
autoCreated,
guestOsFeatures,
downloadBytes,
chainName,
satisfiesPzs,
locationHint,
sourceSnapshotSchedulePolicy,
sourceSnapshotSchedulePolicyId,
sourceInstantSnapshot,
sourceInstantSnapshotId,
architecture,
snapshotType,
creationSizeBytes,
enableConfidentialCompute,
sourceDiskForRecoveryCheckpoint,
sourceInstantSnapshotEncryptionKey
)
SELECT
'{{ disk }}',
'{{ project }}',
'{{ zone }}',
'{{ name }}',
'{{ description }}',
'{{ status }}',
'{{ sourceDisk }}',
'{{ sourceDiskId }}',
'{{ diskSizeGb }}',
'{{ storageBytes }}',
'{{ storageBytesStatus }}',
'{{ licenses }}',
'{{ snapshotEncryptionKey }}',
'{{ sourceDiskEncryptionKey }}',
'{{ labels }}',
'{{ labelFingerprint }}',
'{{ licenseCodes }}',
'{{ storageLocations }}',
{{ autoCreated }},
'{{ guestOsFeatures }}',
'{{ downloadBytes }}',
'{{ chainName }}',
{{ satisfiesPzs }},
'{{ locationHint }}',
'{{ sourceSnapshotSchedulePolicy }}',
'{{ sourceSnapshotSchedulePolicyId }}',
'{{ sourceInstantSnapshot }}',
'{{ sourceInstantSnapshotId }}',
'{{ architecture }}',
'{{ snapshotType }}',
'{{ creationSizeBytes }}',
{{ enableConfidentialCompute }},
'{{ sourceDiskForRecoveryCheckpoint }}',
'{{ sourceInstantSnapshotEncryptionKey }}'
;