# firebase_functions.remote_config_fn module

Cloud functions to handle Remote Config events.

## Classes

| ### ConfigUpdateData *class* firebase_functions.remote_config_fn.ConfigUpdateData(*version_number: int* , *update_time: datetime* , *update_user: [ConfigUser](https://firebase.google.com/docs/reference/functions/2nd-gen/python/firebase_functions.remote_config_fn#firebase_functions.remote_config_fn.ConfigUser "firebase_functions.remote_config_fn.ConfigUser")* , *description: str* , *update_origin: [ConfigUpdateOrigin](https://firebase.google.com/docs/reference/functions/2nd-gen/python/firebase_functions.remote_config_fn#firebase_functions.remote_config_fn.ConfigUpdateOrigin "firebase_functions.remote_config_fn.ConfigUpdateOrigin")* , *update_type: [ConfigUpdateType](https://firebase.google.com/docs/reference/functions/2nd-gen/python/firebase_functions.remote_config_fn#firebase_functions.remote_config_fn.ConfigUpdateType "firebase_functions.remote_config_fn.ConfigUpdateType")* , *rollback_source: int \| None = None* ) |
|---|
| Bases: `object` The data within Firebase Remote Config update events. description*: str* :   The user-provided description of the corresponding Remote Config template. rollback_source*: int \| None* *= None* :   Only present if this version is the result of a rollback, and is the version number of the Remote Config template that was rolled back to. update_origin*: [ConfigUpdateOrigin](https://firebase.google.com/docs/reference/functions/2nd-gen/python/firebase_functions.remote_config_fn#firebase_functions.remote_config_fn.ConfigUpdateOrigin "firebase_functions.remote_config_fn.ConfigUpdateOrigin")* :   Where the update action originated. update_time*: datetime* :   When the Remote Config template was written to the Remote Config server. update_type*: [ConfigUpdateType](https://firebase.google.com/docs/reference/functions/2nd-gen/python/firebase_functions.remote_config_fn#firebase_functions.remote_config_fn.ConfigUpdateType "firebase_functions.remote_config_fn.ConfigUpdateType")* :   What type of update was made. update_user*: [ConfigUser](https://firebase.google.com/docs/reference/functions/2nd-gen/python/firebase_functions.remote_config_fn#firebase_functions.remote_config_fn.ConfigUser "firebase_functions.remote_config_fn.ConfigUser")* :   Aggregation of all metadata fields about the account that performed the update. version_number*: int* :   The version number of the version's corresponding Remote Config template. |

| ### ConfigUpdateOrigin *class* firebase_functions.remote_config_fn.ConfigUpdateOrigin(*value* ) |
|---|
| Bases: `str`, `Enum` Where the Remote Config update action originated. ADMIN_SDK_NODE*= 'ADMIN_SDK_NODE'* :   The update came from the Firebase Admin Node SDK. CONSOLE*= 'CONSOLE'* :   The update came from the Firebase UI. REMOTE_CONFIG_UPDATE_ORIGIN_UNSPECIFIED*= 'REMOTE_CONFIG_UPDATE_ORIGIN_UNSPECIFIED'* :   Catch-all for unrecognized values. REST_API*= 'REST_API'* :   The update came from the Remote Config REST API. |

| ### ConfigUpdateType *class* firebase_functions.remote_config_fn.ConfigUpdateType(*value* ) |
|---|
| Bases: `str`, `Enum` What type of update was associated with the Remote Config template version. FORCED_UPDATE*= 'FORCED_UPDATE'* :   A forced update. The ETag was specified as "\*" in an UpdateRemoteConfigRequest request or the "Force Update" button was pressed on the console. INCREMENTAL_UPDATE*= 'INCREMENTAL_UPDATE'* :   A regular incremental update. REMOTE_CONFIG_UPDATE_TYPE_UNSPECIFIED*= 'REMOTE_CONFIG_UPDATE_TYPE_UNSPECIFIED'* :   Catch-all for unrecognized enum values. ROLLBACK*= 'ROLLBACK'* :   A rollback to a previous Remote Config template. |

| ### ConfigUser *class* firebase_functions.remote_config_fn.ConfigUser(*name: str* , *email: str* , *image_url: str* ) |
|---|
| Bases: `object` All the fields associated with the person/service account that wrote a Remote Config template. email*: str* :   Email address. image_url*: str* :   Image URL. name*: str* :   Display name. |

## Functions

| ### on_config_updated firebase_functions.remote_config_fn.on_config_updated(*\*\*kwargs* ) → Callable\[\[Callable\[\[[CloudEvent](https://firebase.google.com/docs/reference/functions/2nd-gen/python/firebase_functions.core#firebase_functions.core.CloudEvent "firebase_functions.core.CloudEvent")\[[ConfigUpdateData](https://firebase.google.com/docs/reference/functions/2nd-gen/python/firebase_functions.remote_config_fn#firebase_functions.remote_config_fn.ConfigUpdateData "firebase_functions.remote_config_fn.ConfigUpdateData")\]\], None\]\], Callable\[\[[CloudEvent](https://firebase.google.com/docs/reference/functions/2nd-gen/python/firebase_functions.core#firebase_functions.core.CloudEvent "firebase_functions.core.CloudEvent")\[[ConfigUpdateData](https://firebase.google.com/docs/reference/functions/2nd-gen/python/firebase_functions.remote_config_fn#firebase_functions.remote_config_fn.ConfigUpdateData "firebase_functions.remote_config_fn.ConfigUpdateData")\]\], None\]\] |
|---|
| Event handler which triggers when data is updated in a Remote Config. Example: ``` @on_config_updated() def example(event: CloudEvent[ConfigUpdateData]) -> None: pass ``` Parameters: :   **\*\*kwargs** (as [`firebase_functions.options.EventHandlerOptions`](https://firebase.google.com/docs/reference/functions/2nd-gen/python/firebase_functions.options#firebase_functions.options.EventHandlerOptions "firebase_functions.options.EventHandlerOptions")) -- Pub/Sub options. Return type: :   `typing.Callable` \[ \[ [`firebase_functions.core.CloudEvent`](https://firebase.google.com/docs/reference/functions/2nd-gen/python/firebase_functions.core#firebase_functions.core.CloudEvent "firebase_functions.core.CloudEvent") \[ [`firebase_functions.remote_config_fn.ConfigUpdateData`](https://firebase.google.com/docs/reference/functions/2nd-gen/python/firebase_functions.remote_config_fn#firebase_functions.remote_config_fn.ConfigUpdateData "firebase_functions.remote_config_fn.ConfigUpdateData") \[ `typing.Any` \] \] \], None \] A function that takes a CloudEvent and returns None. |