firebase_functions.storage_fn module Stay organized with collections Save and categorize content based on your preferences.
Functions to handle events from Google Cloud Storage.
Classes
CustomerEncryptionclassfirebase_functions.storage_fn.CustomerEncryption(encryption_algorithm:str,key_sha256:str) |
|---|
Bases: Metadata of customer-supplied encryption key,if the object is encrypted by such a key.
|
StorageObjectDataclassfirebase_functions.storage_fn.StorageObjectData(bucket:str,cache_control:str|None,component_count:int|None,content_disposition:str|None,content_encoding:str|None,content_language:str|None,content_type:str|None,crc32c:str|None,customer_encryption:CustomerEncryption|None,etag:str|None,generation:int,id:str,kind:str|None,md5_hash:str|None,media_link:str|None,metadata:dict[str,str]|None,metageneration:int,name:str,self_link:str|None,size:int,storage_class:str,time_created:str|None,time_deleted:str|None,time_storage_class_updated:str|None,updated:str|None) |
|---|
Bases: An object within Google Cloud Storage.
|
Functions
on_object_archivedfirebase_functions.storage_fn.on_object_archived(**kwargs)→Callable[[Callable[[CloudEvent[StorageObjectData]],None]],Callable[[CloudEvent[StorageObjectData]],None]] |
|---|
Event handler sent only when a bucket has enabled object versioning.This event indicates that the live version of an object has become anarchived version, either because it was archived or because it wasoverwritten by the upload of an object of the same name. Example: @on_object_archived()defexample(event:CloudEvent[StorageObjectData])->None:pass
|
on_object_deletedfirebase_functions.storage_fn.on_object_deleted(**kwargs)→Callable[[Callable[[CloudEvent[StorageObjectData]],None]],Callable[[CloudEvent[StorageObjectData]],None]] |
|---|
Event handler which fires every time a Google Cloud Storage deletion occurs.Sent when an object has been permanently deleted. This includes objectsthat are overwritten or are deleted as part of the bucket's lifecycleconfiguration. For buckets with object versioning enabled, this is notsent when an object is archived, even if archival occursvia thestorage.objects.delete method. Example: @on_object_deleted()defexample(event:CloudEvent[StorageObjectData])->None:pass
|
on_object_finalizedfirebase_functions.storage_fn.on_object_finalized(**kwargs)→Callable[[Callable[[CloudEvent[StorageObjectData]],None]],Callable[[CloudEvent[StorageObjectData]],None]] |
|---|
Event handler which fires every time a Google Cloud Storage objectcreation occurs.Sent when a new object (or a new generation of an existing object)is successfully created in the bucket. This includes copying or rewritingan existing object. A failed upload does not trigger this event. Example: @on_object_finalized()defexample(event:CloudEvent[StorageObjectData])->None:pass
|
on_object_metadata_updatedfirebase_functions.storage_fn.on_object_metadata_updated(**kwargs)→Callable[[Callable[[CloudEvent[StorageObjectData]],None]],Callable[[CloudEvent[StorageObjectData]],None]] |
|---|
Event handler which fires every time the metadata of an existing objectchanges. Example: @on_object_metadata_updated()defexample(event:CloudEvent[StorageObjectData])->None:pass
|
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2023-11-06 UTC.