blob: 6e906a4821d14f8ad3fb50132337b2a0e619cfe6 [file] [log] [blame]
:py:mod:`airflow.secrets.base_secrets`
======================================
.. py:module:: airflow.secrets.base_secrets
Module Contents
---------------
Classes
~~~~~~~
.. autoapisummary::
airflow.secrets.base_secrets.BaseSecretsBackend
.. py:class:: BaseSecretsBackend(**kwargs)
Bases: :py:obj:`abc.ABC`
Abstract base class to retrieve Connection object given a conn_id or Variable given a key
.. py:method:: build_path(path_prefix: str, secret_id: str, sep: str = '/') -> str
:staticmethod:
Given conn_id, build path for Secrets Backend
:param path_prefix: Prefix of the path to get secret
:type path_prefix: str
:param secret_id: Secret id
:type secret_id: str
:param sep: separator used to concatenate connections_prefix and conn_id. Default: "/"
:type sep: str
.. py:method:: get_conn_uri(self, conn_id: str) -> Optional[str]
:abstractmethod:
Get conn_uri from Secrets Backend
:param conn_id: connection id
:type conn_id: str
.. py:method:: get_connection(self, conn_id: str) -> Optional[airflow.models.connection.Connection]
Return connection object with a given ``conn_id``.
:param conn_id: connection id
:type conn_id: str
.. py:method:: get_connections(self, conn_id: str) -> List[airflow.models.connection.Connection]
Return connection object with a given ``conn_id``.
:param conn_id: connection id
:type conn_id: str
.. py:method:: get_variable(self, key: str) -> Optional[str]
:abstractmethod:
Return value for Airflow Variable
:param key: Variable Key
:type key: str
:return: Variable Value
.. py:method:: get_config(self, key: str) -> Optional[str]
Return value for Airflow Config Key
:param key: Config Key
:return: Config Value