Get Object Metadata

gcs.get_object_metadata
ActionGoogle Cloudconnection required

Calls the GCS JSON API GET /b/{bucket}/o/{object}.

Read a Cloud Storage object's size, checksums, holds and custom metadata.

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

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

FieldTypeRequiredDefaultConstraintsExample
bucket
Bucket name (overrides connection).
stringNo———
object
Object name/key.
stringYes———

Output

One shape.

result

FieldTypeExample
object
string—
bucket
string—
size
number—
content_type
string—
updated
string—
md5
string—
generation
string—
metageneration
Metadata version, bumped by a metadata-only change.
string—
crc32c
Base64 CRC32C of the content; always present.
string—
etag
string—
storage_class
STANDARD / NEARLINE / COLDLINE / ARCHIVE.
string—
created
When the object version was created.
string—
storage_class_updated
When the storage class last changed.
string—
media_link
Authenticated download URL.
string—
self_link
string—
content_encoding
Stored Content-Encoding, e.g. gzip.
string—
content_disposition
Stored Content-Disposition.
string—
cache_control
Stored Cache-Control.
string—
kms_key_name
Customer-managed encryption key, when one is used.
string—
temporary_hold
True while a temporary hold blocks deletion.
boolean—
event_based_hold
True while an event-based hold blocks deletion.
boolean—
retention_expiration
When retention stops blocking deletion.
string—
custom_time
User-set timestamp used by lifecycle rules.
string—
metadata
The user-defined key/value map stamped on the object.
object—
{
  "bucket": "",
  "cache_control": "",
  "content_disposition": "",
  "content_encoding": "",
  "content_type": "",
  "crc32c": "",
  "created": "",
  "custom_time": "",
  "etag": "",
  "event_based_hold": false,
  "generation": "",
  "kms_key_name": "",
  "md5": "",
  "media_link": "",
  "metadata": {},
  "metageneration": "",
  "object": "",
  "retention_expiration": "",
  "self_link": "",
  "size": 0,
  "storage_class": "",
  "storage_class_updated": "",
  "temporary_hold": false,
  "updated": ""
}

See Get Object Metadata 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.