List files from a GCS bucket.
type: "io.kestra.plugin.gcp.gcs.list"Examples
List files in a GCS bucket
id: gcp_gcs_list
namespace: company.team
tasks:
- id: list
type: io.kestra.plugin.gcp.gcs.List
from: "gs://my_bucket/dir/"
Properties
from*Requiredstring
The directory to list
allVersionsbooleanstring
If set to true, lists all versions of a blob. The default is false.
filterstring
BOTHFILESDIRECTORYBOTHThe filter for files or a directory
impersonatedServiceAccountstring
The GCP service account to impersonate.
listingTypestring
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
projectIdstring
The GCP project ID.
regExpstring
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
scopesarray
["https://www.googleapis.com/auth/cloud-platform"]The GCP scopes to be used.
serviceAccountstring
The GCP service account.
Outputs
blobsarray
The list of blobs
io.kestra.plugin.gcp.gcs.models.Blob
date-timedate-timedate-timedate-timedate-timeuriMetrics
sizecounter
filesNumber of blobs listed.