Elements runtime reference / Tenant GCS files

deleteGcsFile

Delete a tenant-scoped GCS object from inside an Element.

Signatuur

deleteGcsFile(path, bucket=None, prefix=None, ignoreMissing=False)

Doel

Delete a tenant-scoped GCS object from inside an Element.

Aliases and imports

  • delete_gcs_file
  • gcs.delete
  • gcs.delete_file

Payloadformaat

Use these fields as the Python call arguments or keyword payload for this helper.

{
  "path": "exports/old-report.json",
  "ignoreMissing": true
}
FieldDescription
pathRelative path, filestore/{tenantId}-prefixed object path, or gs:// URI inside the current tenant filestore folder.
bucketOptional bucket override; must match the configured file artifact/output bucket.
prefixOptional extra prefix under filestore/{tenantId}/ when path is relative.
ignoreMissingWhen true, missing objects return deleted=False/missing=True instead of an error.

Return payload

{
  "deleted": true,
  "missing": false,
  "gcsUri": "gs://dashview-cache/filestore/tenant/exports/old-report.json",
  "relativePath": "exports/old-report.json"
}

Voorbeeld

def run():
    result = gcs.delete("exports/old-report.json", ignoreMissing=True)
    return {"deleted": result["deleted"], "missing": result.get("missing", False)}

Scope-notities