Cleanup Job Snapshots
A 3-step recipe with Google Cloud Dataflow. We can help you get access.
Recipe · 3 steps
Cleanup Job Snapshots
List a job's snapshots, inspect the first, and delete it.
- List the snapshots in the region that were created from the supplied source job and capture the first snapshot id.
- Read the first snapshot to confirm its state and creation time before deleting it.
- Permanently delete the inspected snapshot and its associated data to reclaim storage.
What you'll need to have ready
- accessToken: Google Cloud OAuth 2.0 access token used as a Bearer credential.
- projectId: The Google Cloud project id that owns the snapshots.
- location: The regional endpoint that contains the snapshots (e.g. us-central1).
- jobId: The source job id whose snapshots should be listed and pruned.
For your developer
Arazzo workflow google-cloud-dataflow:cleanup-job-snapshots, 3 operations: listLocationSnapshots → getLocationSnapshot → deleteLocationSnapshot. Specs on APIs.io.