This is an automated email from the ASF dual-hosted git repository.
eladkal pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 2c4d5366dc Add docs about zendesk connection and creating dedicated
connection form (#36423)
2c4d5366dc is described below
commit 2c4d5366dcee4b34d7f6737a30a8f14928f4bc6f
Author: shohamy7 <[email protected]>
AuthorDate: Tue Dec 26 15:13:05 2023 +0200
Add docs about zendesk connection and creating dedicated connection form
(#36423)
---
airflow/providers/zendesk/hooks/zendesk.py | 9 ++++-
.../connections.rst | 39 ++++++++++++++++++++++
docs/apache-airflow-providers-zendesk/index.rst | 7 ++++
3 files changed, 54 insertions(+), 1 deletion(-)
diff --git a/airflow/providers/zendesk/hooks/zendesk.py
b/airflow/providers/zendesk/hooks/zendesk.py
index 02734a912f..00ff3b94f0 100644
--- a/airflow/providers/zendesk/hooks/zendesk.py
+++ b/airflow/providers/zendesk/hooks/zendesk.py
@@ -17,7 +17,7 @@
# under the License.
from __future__ import annotations
-from typing import TYPE_CHECKING
+from typing import TYPE_CHECKING, Any
from zenpy import Zenpy
@@ -41,6 +41,13 @@ class ZendeskHook(BaseHook):
conn_type = "zendesk"
hook_name = "Zendesk"
+ @classmethod
+ def get_ui_field_behaviour(cls) -> dict[str, Any]:
+ return {
+ "hidden_fields": ["schema", "port", "extra"],
+ "relabeling": {"host": "Zendesk domain", "login": "Zendesk email"},
+ }
+
def __init__(self, zendesk_conn_id: str = default_conn_name) -> None:
super().__init__()
self.zendesk_conn_id = zendesk_conn_id
diff --git a/docs/apache-airflow-providers-zendesk/connections.rst
b/docs/apache-airflow-providers-zendesk/connections.rst
new file mode 100644
index 0000000000..8d2d586b30
--- /dev/null
+++ b/docs/apache-airflow-providers-zendesk/connections.rst
@@ -0,0 +1,39 @@
+ .. 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.
+
+Zendesk Connection
+=========================
+
+The Zendesk connection type enables connection to Zendesk.
+
+Default Connection IDs
+----------------------
+
+Zendesk Hook uses parameter ``zendesk_conn_id`` for Connection IDs and the
value of the
+parameter as ``zendesk_default`` by default.
+
+Configuring the Connection
+--------------------------
+Zendesk domain
+ The domain of the Zendesk cluster (should be without scheme).
+ The domain field can contain the subdomain with a dot as delimiter between
the domain and subdomain.
+
+Zendesk email
+ The email that will be used for authentication against the Zendesk API.
+
+Password
+ The password corresponding to the email that will be used for
authentication against the Zendesk API.
diff --git a/docs/apache-airflow-providers-zendesk/index.rst
b/docs/apache-airflow-providers-zendesk/index.rst
index 39a68b2a1f..05ae97fba6 100644
--- a/docs/apache-airflow-providers-zendesk/index.rst
+++ b/docs/apache-airflow-providers-zendesk/index.rst
@@ -29,6 +29,13 @@
Changelog <changelog>
Security <security>
+.. toctree::
+ :hidden:
+ :maxdepth: 1
+ :caption: Guides
+
+ Connection types <connections>
+
.. toctree::
:hidden:
:maxdepth: 1