airflow.providers.yandex.utils.credentials

Module Contents

Classes

CredentialsType

Credentials dict description.

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]
class airflow.providers.yandex.utils.credentials.CredentialsType[source]

Bases: TypedDict

Credentials dict description.

token: str[source]
service_account_key: dict[str, str][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

CredentialsType

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?