in azure/functions/decorators/function_app.py [0:0]
def dapr_invoke_output(self,
arg_name: str,
app_id: str,
method_name: str,
http_verb: str,
dapr_address: Optional[str] = None,
data_type: Optional[
Union[DataType, str]] = None,
**kwargs) \
-> Callable[..., Any]:
"""The dapr_invoke_output decorator adds
:class:`DaprInvokeOutput` to the :class:`FunctionBuilder` object
for building :class:`Function` object used in worker function
indexing model.
This is equivalent to defining DaprInvokeOutput
in the function.json which enables function to invoke another Dapr App.
All optional fields will be given default value by function host when
they are parsed by function host.
Ref: https://aka.ms/azure-function-dapr-invoke-output-binding
:param arg_name: The name of the variable that represents DaprState
output object in function code.
:param app_id: The dapr app name to invoke.
:param method_name: The method name of the app to invoke.
:param http_verb: The http verb of the app to invoke.
:param dapr_address: Dapr address, it is optional field, by default
it will be set to http://localhost:{daprHttpPort}.
:param data_type: Defines how Functions runtime should treat the
parameter value
:param kwargs: Keyword arguments for specifying additional binding
fields to include in the binding json
:return: Decorator function.
"""
@self._configure_function_builder
def wrap(fb):
def decorator():
fb.add_binding(
binding=DaprInvokeOutput(
name=arg_name,
app_id=app_id,
method_name=method_name,
http_verb=http_verb,
dapr_address=dapr_address,
data_type=parse_singular_param_to_enum(data_type,
DataType),
**kwargs))
return fb
return decorator()
return wrap