Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add docs about zendesk connection and creating dedicated connection form #36423

Merged
merged 1 commit into from
Dec 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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