eladkal commented on code in PR #31939:
URL: https://github.com/apache/airflow/pull/31939#discussion_r1231443594


##########
airflow/providers/amazon/aws/hooks/chime.py:
##########
@@ -0,0 +1,104 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+"""This module contains a web hook for Chime."""
+from __future__ import annotations
+
+import json
+import re
+from typing import Any
+
+from airflow.exceptions import AirflowException
+from airflow.providers.http.hooks.http import HttpHook
+
+
+class ChimeWebhookHook(HttpHook):
+    """Interact with Chime Web Hooks to create notifications.
+
+    .. warning:: This hook is only designed to work with Web Hooks and not 
Chatbots.
+
+    :param http_conn_id: Http connection ID with host as 
"https://hooks.chime.aws"; and
+                         default webhook endpoint in the extra field in the 
form of
+                         {"webhook_endpoint": 
"incomingwebhooks/{webhook.id}?token{webhook.token}"}
+    :param webhook_endpoint: Discord webhook endpoint in the form of
+                             
"incomingwebhooks/{webhook.id}?token={webhook.token}"
+    :param message: The message you want to send to your Discord channel
+                    (max 4096 characters)
+    """
+
+    conn_name_attr = "http_conn_id"
+    default_conn_name = "chime_default"
+    conn_type = "chime"
+    hook_name = "Chime Web Hook"

Review Comment:
   Looking at the other hooks it seems like they all have `Amazon _service_` 
format
   
   for example:
   
https://github.com/apache/airflow/blob/cda83c226bf231f3a7e1b78c00bf13f9defb5d6e/airflow/providers/amazon/aws/hooks/redshift_sql.py#L59
   
   
https://github.com/apache/airflow/blob/cda83c226bf231f3a7e1b78c00bf13f9defb5d6e/airflow/providers/amazon/aws/hooks/emr.py#L51
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to