Delete all files from a GCS bucket.
type: "io.kestra.plugin.gcp.gcs.deletelist"Examples
id: gcp_gcs_delete_list
namespace: company.team
tasks:
- id: delete_list
type: io.kestra.plugin.gcp.gcs.DeleteList
from: "gs://my_bucket/dir/"
Properties
from *Requiredstring
The directory to list
allVersions booleanstring
If set to true, lists all versions of a blob. The default is false.
concurrent Non-dynamicinteger
>= 2Number of concurrent parallel deletions
errorOnEmpty booleanstring
falseraise an error if the file is not found
impersonatedServiceAccount string
The GCP service account to impersonate.
listingType string
DIRECTORYRECURSIVEDIRECTORYThe listing type you want (like directory or recursive)
if DIRECTORY, will only list objects in the specified directory
if RECURSIVE, will list objects in the specified directory recursively
Default value is DIRECTORY
When using RECURSIVE value, be careful to move your files to a location not in the from scope
projectId string
The GCP project ID.
regExp string
A regexp to filter on full path
ex:
regExp: .* to match all files
regExp: .*2020-01-0.\\.csv to match files between 01 and 09 of january ending with .csv
scopes array
["https://www.googleapis.com/auth/cloud-platform"]The GCP scopes to be used.
serviceAccount string
The GCP service account.
Outputs
count integer
0The count of blobs deleted
size integer
0The size of all blobs deleted