blob: 1e91606dc379522e8822823d912df5be412ad417 [file] [log] [blame]
:py:mod:`airflow.providers.dingding.operators.dingding`
=======================================================
.. py:module:: airflow.providers.dingding.operators.dingding
Module Contents
---------------
Classes
~~~~~~~
.. autoapisummary::
airflow.providers.dingding.operators.dingding.DingdingOperator
.. py:class:: DingdingOperator(*, dingding_conn_id = 'dingding_default', message_type = 'text', message = None, at_mobiles = None, at_all = False, **kwargs)
Bases: :py:obj:`airflow.models.BaseOperator`
This operator allows you send Dingding message using Dingding custom bot.
Get Dingding token from conn_id.password. And prefer set domain to
conn_id.host, if not will use default ``https://oapi.dingtalk.com``.
For more detail message in
`Dingding custom bot <https://open-doc.dingtalk.com/microapp/serverapi2/qf2nxq>`_
:param dingding_conn_id: The name of the Dingding connection to use
:param message_type: Message type you want to send to Dingding, support five type so far
including text, link, markdown, actionCard, feedCard
:param message: The message send to Dingding chat group
:param at_mobiles: Remind specific users with this message
:param at_all: Remind all people in group or not. If True, will overwrite ``at_mobiles``
.. py:attribute:: template_fields
:annotation: :Sequence[str] = ['message']
.. py:attribute:: ui_color
:annotation: = #4ea4d4
.. py:method:: execute(context)
This is the main method to derive when creating an operator.
Context is the same dictionary used as when rendering jinja templates.
Refer to get_template_context for more context.