airflow.providers.yandex.utils.credentials

Module Contents

Functions

get_credentials([oauth_token, service_account_json, ...])

Return credentials JSON for Yandex Cloud SDK based on credentials.

get_service_account_key([service_account_json, ...])

Return Yandex Cloud Service Account key loaded from JSON string or file.

get_service_account_id([service_account_json, ...])

Return Yandex Cloud Service Account ID loaded from JSON string or file.

Attributes

log

airflow.providers.yandex.utils.credentials.log[source]
airflow.providers.yandex.utils.credentials.get_credentials(oauth_token=None, service_account_json=None, service_account_json_path=None)[source]

Return credentials JSON for Yandex Cloud SDK based on credentials.

Credentials will be used with this priority:

  • OAuth Token

  • Service Account JSON file

  • Service Account JSON

  • Metadata Service

Parameters
  • oauth_token (str | None) – OAuth Token

  • service_account_json (dict | str | None) – Service Account JSON key or dict

  • service_account_json_path (str | None) – Service Account JSON key file path

Returns

Credentials JSON

Return type

dict[str, Any]

airflow.providers.yandex.utils.credentials.get_service_account_key(service_account_json=None, service_account_json_path=None)[source]

Return Yandex Cloud Service Account key loaded from JSON string or file.

Parameters
  • service_account_json (dict | str | None) – Service Account JSON key or dict

  • service_account_json_path (str | None) – Service Account JSON key file path

Returns

Yandex Cloud Service Account key

Return type

dict[str, str] | None

airflow.providers.yandex.utils.credentials.get_service_account_id(service_account_json=None, service_account_json_path=None)[source]

Return Yandex Cloud Service Account ID loaded from JSON string or file.

Parameters
  • service_account_json (dict | str | None) – Service Account JSON key or dict

  • service_account_json_path (str | None) – Service Account JSON key file path

Returns

Yandex Cloud Service Account ID

Return type

str | None

Was this entry helpful?