Skip to content

Commit

Permalink
Add docs about zendesk connection and creating dedicated connection f…
Browse files Browse the repository at this point in the history
…orm (#36423)
  • Loading branch information
shohamy7 authored Dec 26, 2023
1 parent a7700c1 commit 2c4d536
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 1 deletion.
9 changes: 8 additions & 1 deletion airflow/providers/zendesk/hooks/zendesk.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down
39 changes: 39 additions & 0 deletions docs/apache-airflow-providers-zendesk/connections.rst
Original file line number Diff line number Diff line change
@@ -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.
7 changes: 7 additions & 0 deletions docs/apache-airflow-providers-zendesk/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@
Changelog <changelog>
Security <security>

.. toctree::
:hidden:
:maxdepth: 1
:caption: Guides

Connection types <connections>

.. toctree::
:hidden:
:maxdepth: 1
Expand Down

0 comments on commit 2c4d536

Please sign in to comment.