List Buckets

gcs.list_buckets
ActionGoogle Cloudconnection required

Calls the GCS JSON API GET /b?project={project}.

List the Cloud Storage buckets in a GCP project.

Connection

Required
Yes — the node will not save without one
Auth type
OAuth 2.0
Providers
Google Cloud Storage
Secret shape
{"client_id", "client_secret", "refresh_token"}
Config it needs
bucket
Resolved by
config.connection_id, else node.connection_id

Configuration

3 fields, 1 required. A dotted path is a nested object and name[] an array of objects — the editor renders the same tree.

FieldTypeRequiredDefaultConstraintsExample
project_id
GCP project id.
stringYes———
max_results
How many buckets to return in total. GCS pages at 1000, so a larger budget follows nextPageToken until it is met.
numberNo100≥ 1—
page_token
Resume from a previous run's next_page_token.
stringNo———

Example configuration

Every value below is the contract’s own example or default — nothing invented.

{
  "max_results": 100
}

Output

One shape.

result

FieldTypeExample
buckets
array—
buckets[].name
string—
buckets[].location
string—
buckets[].storage_class
string—
buckets[].created
string—
buckets[].id
string—
buckets[].project_number
string—
buckets[].location_type
region / dual-region / multi-region.
string—
buckets[].updated
string—
buckets[].labels
Bucket labels, e.g. the cost-centre tag.
object—
buckets[].versioning
Object versioning config ({'enabled': bool}).
object—
buckets[].lifecycle
Lifecycle rules, or absent when the bucket has none.
object—
buckets[].retention_policy
Retention period and lock state.
object—
buckets[].iam_configuration
Uniform bucket-level access and public-access prevention.
object—
buckets[].encryption
Default KMS key for new objects.
object—
buckets[].logging
object—
buckets[].website
object—
buckets[].default_event_based_hold
New objects are created on hold.
boolean—
buckets[].etag
string—
buckets[].self_link
string—
count
How many items this step returned.
number—
truncated
True when the budget ran out with more items behind it.
boolean—
next_page_token
Resume token for the next run; empty once the listing is complete.
string—
{
  "buckets": [
    {
      "created": "",
      "default_event_based_hold": false,
      "encryption": {},
      "etag": "",
      "iam_configuration": {},
      "id": "",
      "labels": {},
      "lifecycle": {},
      "location": "",
      "location_type": "",
      "logging": {},
      "name": "",
      "project_number": "",
      "retention_policy": {},
      "self_link": "",
      "storage_class": "",
      "updated": "",
      "versioning": {},
      "website": {}
    }
  ],
  "count": 0,
  "next_page_token": "",
  "truncated": false
}

See List Buckets run in a workflow.

In a technical demo we add the Google Cloud Storage connection, drop the node on the canvas and let Workflow Health pre-flight it before the first real run.