airflow.providers.google.cloud.utils.credentials_provider
¶
This module contains a mechanism for providing temporary Google Cloud authentication.
Module Contents¶
Functions¶
|
Builds a uri that can be used as |
|
Context manager that provides a Google Cloud credentials for application supporting |
|
Context manager that provides a temporary value of |
|
Context manager that provides both: |
|
Returns the Credentials object for Google API and the associated project_id. |
Attributes¶
- airflow.providers.google.cloud.utils.credentials_provider.AIRFLOW_CONN_GOOGLE_CLOUD_DEFAULT = AIRFLOW_CONN_GOOGLE_CLOUD_DEFAULT[source]¶
- airflow.providers.google.cloud.utils.credentials_provider.build_gcp_conn(key_file_path=None, scopes=None, project_id=None)[source]¶
Builds a uri that can be used as
AIRFLOW_CONN_{CONN_ID}
with provided service key, scopes and project id.
- airflow.providers.google.cloud.utils.credentials_provider.provide_gcp_credentials(key_file_path=None, key_file_dict=None)[source]¶
Context manager that provides a Google Cloud credentials for application supporting Application Default Credentials (ADC) strategy.
It can be used to provide credentials for external programs (e.g. gcloud) that expect authorization file in
GOOGLE_APPLICATION_CREDENTIALS
environment variable.- Parameters
key_file_path (Optional[str]) -- Path to file with Google Cloud Service Account .json file.
key_file_dict (Optional[Dict]) -- Dictionary with credentials.
- airflow.providers.google.cloud.utils.credentials_provider.provide_gcp_connection(key_file_path=None, scopes=None, project_id=None)[source]¶
Context manager that provides a temporary value of
AIRFLOW_CONN_GOOGLE_CLOUD_DEFAULT
connection. It build a new connection that includes path to provided service json, required scopes and project id.
- airflow.providers.google.cloud.utils.credentials_provider.provide_gcp_conn_and_credentials(key_file_path=None, scopes=None, project_id=None)[source]¶
Context manager that provides both:
Google Cloud credentials for application supporting Application Default Credentials (ADC) strategy.
temporary value of
AIRFLOW_CONN_GOOGLE_CLOUD_DEFAULT
connection