The Google Cloud Storage object builder interface.

Access via functions.storage.object().

Index

Properties

Private options

Private triggerResource

triggerResource: function

Type declaration

    • (): string
    • Returns string

Methods

onArchive

  • Event handler sent only when a bucket has enabled object versioning. This event indicates that the live version of an object has become an archived version, either because it was archived or because it was overwritten by the upload of an object of the same name.

    Parameters

    Returns CloudFunction<ObjectMetadata>

    A Cloud Function which you can export and deploy.

onDelete

  • Event handler which fires every time a Google Cloud Storage deletion occurs.

    Sent when an object has been permanently deleted. This includes objects that are overwritten or are deleted as part of the bucket's lifecycle configuration. For buckets with object versioning enabled, this is not sent when an object is archived, even if archival occurs via the storage.objects.delete method.

    Parameters

    Returns CloudFunction<ObjectMetadata>

    A Cloud Function which you can export and deploy.

onFinalize

  • Event handler which fires every time a Google Cloud Storage object creation occurs.

    Sent when a new object (or a new generation of an existing object) is successfully created in the bucket. This includes copying or rewriting an existing object. A failed upload does not trigger this event.

    Parameters

    • handler: function

      Event handler which is run every time a Google Cloud Storage object creation occurs.

    Returns CloudFunction<ObjectMetadata>

    A Cloud Function which you can export and deploy.

onMetadataUpdate

  • Event handler which fires every time the metadata of an existing object changes.

    Parameters

    • handler: function

      Event handler which is run every time a Google Cloud Storage metadata update occurs.

    Returns CloudFunction<ObjectMetadata>

    A Cloud Function which you can export and deploy.