in azure/functions/decorators/function_app.py [0:0]
def service_bus_queue_output(self,
arg_name: str,
connection: str,
queue_name: str,
data_type: Optional[
Union[DataType, str]] = None,
access_rights: Optional[Union[
AccessRights, str]] = None,
**kwargs) -> \
Callable[..., Any]:
"""The service_bus_queue_output decorator adds
:class:`ServiceBusQueueOutput` to the :class:`FunctionBuilder` object
for building :class:`Function` object used in worker function
indexing model. This is equivalent to defining ServiceBusQueueOutput
in the function.json which enables function to write message(s) to
the service bus queue.
All optional fields will be given default value by function host when
they are parsed by function host.
Ref: https://aka.ms/azure-function-binding-service-bus
:param arg_name: The name of the variable that represents service
bus queue output object in function code.
:param connection: The name of an app setting or setting collection
that specifies how to connect to Service Bus.
:param queue_name: Name of the queue to monitor.
:param data_type: Defines how Functions runtime should treat the
parameter value.
:param access_rights: Access rights for the connection string.
:return: Decorator function.
"""
@self._configure_function_builder
def wrap(fb):
def decorator():
fb.add_binding(
binding=ServiceBusQueueOutput(
name=arg_name,
connection=connection,
queue_name=queue_name,
data_type=parse_singular_param_to_enum(data_type,
DataType),
access_rights=parse_singular_param_to_enum(
access_rights, AccessRights),
**kwargs))
return fb
return decorator()
return wrap