Yandex Cloud
Поиск
Связаться с намиПодключиться
  • Истории успеха
  • Документация
  • Блог
  • Все сервисы
  • Статус работы сервисов
    • Популярные
    • Инфраструктура и сеть
    • Платформа данных
    • Контейнеры
    • Инструменты разработчика
    • Бессерверные вычисления
    • Безопасность
    • Мониторинг и управление ресурсами
    • AI Studio
    • Бизнес-инструменты
  • Все решения
    • По отраслям
    • По типу задач
    • Экономика платформы
    • Безопасность
    • Техническая поддержка
    • Каталог партнёров
    • Обучение и сертификация
    • Облако для стартапов
    • Облако для крупного бизнеса
    • Центр технологий для общества
    • Облако для интеграторов
    • Поддержка IT-бизнеса
    • Облако для фрилансеров
    • Обучение и сертификация
    • Блог
    • Документация
    • Контент-программа
    • Мероприятия и вебинары
    • Контакты, чаты и сообщества
    • Идеи
    • Тарифы Yandex Cloud
    • Промоакции и free tier
    • Правила тарификации
  • Истории успеха
  • Документация
  • Блог
Проект Яндекса
© 2025 ООО «Яндекс.Облако»
Yandex AI Studio
  • Совместимость с OpenAI
    • О Yandex Cloud ML SDK
      • Overview
      • Authentication
      • Request retries
  • Управление доступом
  • Правила тарификации
  • Аудитные логи Audit Trails
  • Публичные материалы
  • История изменений

В этой статье:

  • Authentication methods classes
  • class yandex_cloud_ml_sdk.auth.APIKeyAuth
  • class yandex_cloud_ml_sdk.auth.EnvIAMTokenAuth
  • class yandex_cloud_ml_sdk.auth.IAMTokenAuth
  • class yandex_cloud_ml_sdk.auth.MetadataAuth
  • class yandex_cloud_ml_sdk.auth.NoAuth
  • class yandex_cloud_ml_sdk.auth.OAuthTokenAuth
  • class yandex_cloud_ml_sdk.auth.YandexCloudCLIAuth
  1. Yandex Cloud ML SDK
  2. Справочник SDK (англ.)
  3. Authentication

Authentication

Статья создана
Yandex Cloud
Обновлена 22 августа 2025 г.
  • Authentication methods classes
    • class yandex_cloud_ml_sdk.auth.APIKeyAuth
    • class yandex_cloud_ml_sdk.auth.EnvIAMTokenAuth
    • class yandex_cloud_ml_sdk.auth.IAMTokenAuth
    • class yandex_cloud_ml_sdk.auth.MetadataAuth
    • class yandex_cloud_ml_sdk.auth.NoAuth
    • class yandex_cloud_ml_sdk.auth.OAuthTokenAuth
    • class yandex_cloud_ml_sdk.auth.YandexCloudCLIAuth

Here must be algorithm about how auto-authorization works

And here – how SDK will work if you pass a string to SDK auth param

Authentication methods classesAuthentication methods classes

class yandexcloudmlsdk.auth.APIKeyAuthclass yandex_cloud_ml_sdk.auth.APIKeyAuth

Authentication method using an API key.

Read more about the API key in the IAM documentation.

class yandexcloudmlsdk.auth.EnvIAMTokenAuthclass yandex_cloud_ml_sdk.auth.EnvIAMTokenAuth

Auth method, which takes IAM token from environment variable for every request.

It is assumed that the token will be refreshed in the environment before it expires.

However, by default, the YC_TOKEN environment variable is used when auto-selecting the auth method, in order to be compatible with a Yandex DataSphere environment. Therefore, it is not recommended to use this environment variable when setting up a personal work environment.

class yandexcloudmlsdk.auth.IAMTokenAuthclass yandex_cloud_ml_sdk.auth.IAMTokenAuth

Authentication method using an IAM token.

Read more about the IAM token in the AIM documentation.

class yandexcloudmlsdk.auth.MetadataAuthclass yandex_cloud_ml_sdk.auth.MetadataAuth

Authentication class for retrieving IAM tokens from metadata service.

This class retrieves IAM tokens from the Google Cloud metadata service. Read more in the VM metadata documentation.

class yandexcloudmlsdk.auth.NoAuthclass yandex_cloud_ml_sdk.auth.NoAuth

class yandexcloudmlsdk.auth.OAuthTokenAuthclass yandex_cloud_ml_sdk.auth.OAuthTokenAuth

Auth method that uses an OAuth token for authentication.

This class extends the RefresheableIAMTokenAuth to provide functionality for managing and using an OAuth token for authentication purposes.

Read more about the OAuth token in the corresponding documentation.

class yandexcloudmlsdk.auth.YandexCloudCLIAuthclass yandex_cloud_ml_sdk.auth.YandexCloudCLIAuth

Authentication class for Yandex Cloud CLI using IAM tokens.

It handles the initialization and retrieval of IAM tokens via the Yandex Cloud CLI that should be installed and configured.

Yandex Cloud CLI is a downloadable software for managing cloud resources via the command line. Read more in the CLI documentation.

Была ли статья полезна?

Предыдущая
Chat domain
Следующая
Overview
Проект Яндекса
© 2025 ООО «Яндекс.Облако»