pip_services3_azure.containers.AzureFunction module
- class pip_services3_azure.containers.AzureFunction.AzureFunction(name: Optional[str], description: Optional[str])
Bases:
pip_services3_container.Container.ContainerAbstract Azure Function, that acts as a container to instantiate and run components and expose them via external entry point.
When handling calls “cmd” parameter determines which what action shall be called, while other parameters are passed to the action itself.
Container configuration for this Azure Function is stored in “./config/config.yml” file. But this path can be overriden by CONFIG_PATH environment variable.
- ### References ###
*:logger:*:*:1.0 (optional)
ILoggercomponents to pass log messages*:counters:*:*:1.0 (optional)
ICounterscomponents to pass collected measurements*:ervice:azure-function:*:*:1.0 (optional)
IAzureFunctionServiceservices to handle action requests*:service:commandable-azure-function:*:*:1.0 (optional)
IAzureFunctionServiceservices to handle action requests
Example:
- act(context: azure.functions._http.HttpRequest) azure.functions._http.HttpResponse
Calls registered action in this Azure Function. “cmd” parameter in the action parameters determin what action shall be called.
This method shall only be used in testing.
- Parameters
context – action parameters.
- Returns
action result
- open(correlation_id: Optional[str])
Opens the component.
- Parameters
correlation_id – (optional) transaction id to trace execution through call chain.
- register()
Registers all actions in this Azure Function.
Note: Overloading of this method has been deprecated. Use AzureFunctionService instead.
- run()
Runs this Azure Function, loads container configuration, instantiate components and manage their lifecycle, makes this function ready to access action calls.
- set_references(references: pip_services3_commons.refer.IReferences.IReferences)
Sets references to dependent components.
- Parameters
references – references to locate the component dependencies.