firebase_functions.firestore_fn module Stay organized with collections Save and categorize content based on your preferences.
Module for Cloud Functions that are triggered by Firestore.
Classes
AuthEventclassfirebase_functions.firestore_fn.AuthEvent(specversion:str,id:str,source:str,type:str,time:datetime.datetime,data:T,subject:str|None,location:str,project:str,database:str,namespace:str,document:str,params:dict[str,str],auth_type:Literal['service_account','api_key','system','unauthenticated','unknown'],auth_id:str|None) |
|---|
Bases:
|
Eventclassfirebase_functions.firestore_fn.Event(specversion:str,id:str,source:str,type:str,time:datetime,data:T,subject:str|None,location:str,project:str,database:str,namespace:str,document:str,params:dict[str,str]) |
|---|
Bases: A CloudEvent that contains a
|
Functions
on_document_createdfirebase_functions.firestore_fn.on_document_created(**kwargs)→Callable[[Callable[[Event[DocumentSnapshot|None]],None]],Callable[[Event[DocumentSnapshot|None]],None]] |
|---|
Event handler that triggers when a document is created in Firestore. Example: @on_document_created(document="*")defexample(event:Event[DocumentSnapshot]):pass
|
on_document_created_with_auth_contextfirebase_functions.firestore_fn.on_document_created_with_auth_context(**kwargs)→Callable[[Callable[[Event[DocumentSnapshot|None]],None]],Callable[[Event[DocumentSnapshot|None]],None]] |
|---|
Event handler that triggers when a document is created in Firestore.This trigger will also provide the authentication context of the principal who triggeredthe event. Example: @on_document_created_with_auth_context(document="*")defexample(event:AuthEvent[DocumentSnapshot]):pass
|
on_document_deletedfirebase_functions.firestore_fn.on_document_deleted(**kwargs)→Callable[[Callable[[Event[DocumentSnapshot|None]],None]],Callable[[Event[DocumentSnapshot|None]],None]] |
|---|
Event handler that triggers when a document is deleted in Firestore. Example: @on_document_deleted(document="*")defexample(event:Event[DocumentSnapshot])->None:pass
|
on_document_deleted_with_auth_contextfirebase_functions.firestore_fn.on_document_deleted_with_auth_context(**kwargs)→Callable[[Callable[[Event[DocumentSnapshot|None]],None]],Callable[[Event[DocumentSnapshot|None]],None]] |
|---|
Event handler that triggers when a document is deleted in Firestore.This trigger will also provide the authentication context of the principal who triggeredthe event. Example: @on_document_deleted_with_auth_context(document="*")defexample(event:AuthEvent[DocumentSnapshot])->None:pass
|
on_document_updatedfirebase_functions.firestore_fn.on_document_updated(**kwargs)→Callable[[Callable[[Event[Change[DocumentSnapshot|None]]],None]],Callable[[Event[Change[DocumentSnapshot|None]]],None]] |
|---|
Event handler that triggers when a document is updated in Firestore. Example: @on_document_updated(document="*")defexample(event:Event[Change[DocumentSnapshot]])->None:pass
|
on_document_updated_with_auth_contextfirebase_functions.firestore_fn.on_document_updated_with_auth_context(**kwargs)→Callable[[Callable[[Event[Change[DocumentSnapshot|None]]],None]],Callable[[Event[Change[DocumentSnapshot|None]]],None]] |
|---|
Event handler that triggers when a document is updated in Firestore.This trigger will also provide the authentication context of the principal who triggeredthe event. Example: @on_document_updated_with_auth_context(document="*")defexample(event:AuthEvent[Change[DocumentSnapshot]])->None:pass
|
on_document_writtenfirebase_functions.firestore_fn.on_document_written(**kwargs)→Callable[[Callable[[Event[Change[DocumentSnapshot|None]]],None]],Callable[[Event[Change[DocumentSnapshot|None]]],None]] |
|---|
Event handler that triggers when a document is created, updated, or deleted in Firestore. Example: @on_document_written(document="*")defexample(event:Event[Change[DocumentSnapshot]])->None:pass
|
on_document_written_with_auth_contextfirebase_functions.firestore_fn.on_document_written_with_auth_context(**kwargs)→Callable[[Callable[[Event[Change[DocumentSnapshot|None]]],None]],Callable[[Event[Change[DocumentSnapshot|None]]],None]] |
|---|
Event handler that triggers when a document is created, updated, or deleted in Firestore.This trigger will also provide the authentication context of the principal who triggeredthe event. Example: @on_document_written_with_auth_context(document="*")defexample(event:AuthEvent[Change[DocumentSnapshot]])->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 2024-09-20 UTC.