airflow.providers.microsoft.azure.hooks.base_azure¶
Classes¶
This hook acts as a base hook for azure services. |
Module Contents¶
- class airflow.providers.microsoft.azure.hooks.base_azure.AzureBaseHook(sdk_client=None, conn_id='azure_default')[source]¶
Bases:
airflow.providers.microsoft.azure.version_compat.BaseHook
This hook acts as a base hook for azure services.
It offers several authentication mechanisms to authenticate the client library used for upstream azure hooks.
- Parameters:
sdk_client (Any) – The SDKClient to use.
conn_id (str) – The Azure connection id which refers to the information to connect to the service.
- classmethod get_connection_form_widgets()[source]¶
Return connection widgets to add to connection form.
- get_conn()[source]¶
Authenticate the resource using the connection id passed during init.
- Returns:
the authenticated client.
- Return type:
Any
- get_credential(*, conn=None)[source]¶
Get Azure credential object for the connection.
Azure Identity based credential object (
ClientSecretCredential
,DefaultAzureCredential
) can be used to get OAuth token usingget_token
method. Older Credential objects (ServicePrincipalCredentials
,AzureIdentityCredentialAdapter
) are supported for backward compatibility.- Returns:
The Azure credential object
- Return type:
azure.common.credentials.ServicePrincipalCredentials | airflow.providers.microsoft.azure.utils.AzureIdentityCredentialAdapter | azure.identity.ClientSecretCredential | azure.identity.DefaultAzureCredential