Skip to main content

snapshots

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

Overview

Namesnapshots
TypeResource
Idgoogle.dataflow.snapshots

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
idstringThe unique ID of this snapshot.
creationTimestring (google-datetime)The time this snapshot was created.
descriptionstringUser specified description of the snapshot. Maybe empty.
diskSizeBytesstring (int64)The disk byte size of the snapshot. Only available for snapshots in READY state.
projectIdstringThe project this snapshot belongs to.
pubsubMetadataarrayPub/Sub snapshot metadata.
regionstringCloud region where this snapshot lives in, e.g., "us-central1".
sourceJobIdstringThe job this snapshot was created from.
statestringState of the snapshot.
ttlstring (google-duration)The time after which this snapshot will be automatically deleted.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
projects_locations_snapshots_getselectprojectId, location, snapshotIdGets information about a snapshot.
projects_locations_jobs_snapshots_listselectprojectId, location, jobIdLists snapshots.
projects_snapshots_getselectprojectId, snapshotIdlocationGets information about a snapshot.
projects_locations_snapshots_listselectprojectId, locationjobIdLists snapshots.
projects_snapshots_listselectprojectIdjobId, locationLists snapshots.
projects_locations_snapshots_deletedeleteprojectId, location, snapshotIdDeletes a snapshot.
projects_delete_snapshotsdeleteprojectIdsnapshotId, locationDeletes a snapshot.

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
jobIdstring
locationstring
projectIdstring
snapshotIdstring
jobIdstring
locationstring
snapshotIdstring

SELECT examples

Gets information about a snapshot.

SELECT
id,
creationTime,
description,
diskSizeBytes,
projectId,
pubsubMetadata,
region,
sourceJobId,
state,
ttl
FROM google.dataflow.snapshots
WHERE projectId = '{{ projectId }}' -- required
AND location = '{{ location }}' -- required
AND snapshotId = '{{ snapshotId }}' -- required;

DELETE examples

Deletes a snapshot.

DELETE FROM google.dataflow.snapshots
WHERE projectId = '{{ projectId }}' --required
AND location = '{{ location }}' --required
AND snapshotId = '{{ snapshotId }}' --required;