12/25/2023 0 Comments Slack api![]() ![]() SlackAPIFileOperator ( channels = None, initial_comment = None, filename = None, filetype = None, content = None, title = None, channel = None, ** kwargs ) ¶ Template_fields : Sequence = ('username', 'text', 'attachments', 'blocks', 'channel') ¶ ui_color = '#FFBA40' ¶ construct_api_call_params ( ) ¶ (templated)īlocks ( list | None) – extra block layouts. Icon_url ( str) – URL to icon used for this messageĪttachments ( list | None) – extra formatting details. Username ( str) – Username that airflow will be posting to Slack as. Slack = SlackAPIPostOperator ( task_id = "post_hello", dag = dag, token = ".", text = "hello there!", channel = "#random", ) ParametersĬhannel ( str) – channel in which to post message on slack name (#general) or SlackAPIPostOperator ( channel = '#general', username = 'Airflow', text = 'No message has been set.\nHere is a cat video instead\n', icon_url = '', attachments = None, blocks = None, ** kwargs ) ¶ ![]() Refer to get_template_context for more context. Of API call parameters ( ) execute ( ** kwargs ) ¶Ĭontext is the same dictionary used as when rendering jinja templates. Responsible for having function set self.api_call_params with a dict abstract construct_api_call_params ( ) ¶ĪPI call parameters used by the execute function.Īllows templating on the source fields of the api_call_params dictĬhild classes should override this. ![]() Retry_handlers ( list | None) – List of handlers to customize retry logic in slack_sdk.WebClient. Proxy ( str | None) – Proxy to make the Slack API call. Optionalīase_url ( str | None) – A string representing the Slack API base URL. Timeout ( int | None) – The maximum number of seconds the client will wait to connectĪnd receive a response from Slack. OptionalĪpi_params ( dict | None) – API Method call parameters ( ). Method ( str | None) – The Slack API Method to Call ( ). Slack_conn_id ( str) – Slack API Connection SlackAPIOperator ( *, slack_conn_id = fault_conn_name, method = None, api_params = None, base_url = None, proxy = None, timeout = None, retry_handlers = None, ** kwargs ) ¶ ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |