Yandex Cloud
Поиск
Связаться с экспертомПопробовать бесплатно
  • Кейсы
  • Документация
  • Блог
  • Все сервисы
    • Cloud Interconnect
    • Cloud Backup
    • Compute Cloud
    • Object Storage
    • Managed Service for Kubernetes®
    • Managed Service for PostgreSQL
    • Managed Service for ClickHouse®
    • Monium
    • Cloud CDN
    • Network Load Balancer
    • Virtual Private Cloud
    • Cloud DNS
    • Application Load Balancer
    • Yandex Cloud Router
    • Managed Service for MySQL®
    • Managed Service for Valkey™
    • Managed Service for Apache Spark™
    • Managed Service for OpenSearch
    • Managed Service for Apache Kafka®
    • Data Transfer
    • Yandex MPP Analytics Engine for PostgreSQL
    • SpeechKit
    • Yandex Identity Hub
    • Key Management Service
    • Certificate Manager
    • Yandex Lockbox
    • Audit Trails
    • Container Registry
    • Managed Service for Prometheus®
    • Message Queue
    • Identity and Access Management
    • Yandex Cloud Console
    • Resource Manager
    • Yandex Cloud Billing
    • Cloud Apps
    • Yandex AI Studio
    • Yandex BareMetal
    • Smart Web Security
    • Security Deck
    • Yandex Cloud Video
    • Stackland
    • Yandex StoreDoc
    • Yandex Managed Service for Apache Airflow®
    • Data Processing
    • Yandex MetaData Hub
    • Managed Service for YDB
    • Yandex WebSQL
    • DataLens
    • Yandex Search API
    • SpeechSense
    • DataSphere
    • Vision OCR
    • Translate
    • Cloud Registry
    • SmartCaptcha
    • Cloud Desktop
    • SourceCraft Code Assistant
    • Managed Service for GitLab
    • Cloud Functions
    • API Gateway
    • Yandex Cloud Postbox
    • Serverless Integrations
    • IoT Core
    • Serverless Containers
    • Cloud Notification Service
    • Yandex Query
  • Статус работы сервисов
  • Marketplace
    • Доступны в регионе
    • Инфраструктура и сеть
    • Платформа данных
    • Искусственный интеллект
    • Безопасность
    • Инструменты DevOps
    • Бессерверные вычисления
    • Управление ресурсами
  • Все решения
    • По отраслям
    • По типу задач
    • Экономика платформы
    • Безопасность
    • Техническая поддержка
    • Каталог партнёров
    • Обучение и сертификация
    • Облако для стартапов
    • Облако для крупного бизнеса
    • Центр технологий для общества
    • Партнёрская программа
    • Поддержка IT-бизнеса
    • Облако для фрилансеров
    • Обучение и сертификация
    • Блог
    • Документация
    • Мероприятия и вебинары
    • Контакты, чаты и сообщества
    • Идеи
    • Калькулятор цен
    • Тарифы
    • Акции и free tier
  • Кейсы
  • Документация
  • Блог
Создавайте контент и получайте гранты!Готовы написать своё руководство? Участвуйте в контент-программе и получайте гранты на работу с облачными сервисами!
Подробнее о программе
Проект Яндекса
© 2026 ТОО «Облачные Сервисы Казахстан»
Yandex Identity and Access Management
KZ
  • Безопасное использование Yandex Cloud
  • Управление доступом
  • Правила тарификации
  • Справочник ролей
  • Справочник Terraform
    • Аутентификация в API
      • Overview
        • Overview
        • List
        • Get
        • Create
        • Update
        • Delete
        • ListOperations
        • ListScopes
  • Метрики Monitoring
  • Аудитные логи Audit Trails
  • История изменений
  • Обучающие курсы

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

  • gRPC request
  • CreateApiKeyRequest
  • CreateApiKeyResponse
  • ApiKey
  1. Справочник API
  2. gRPC (англ.)
  3. ApiKey
  4. Create

Identity and Access Management API, gRPC: ApiKeyService.Create

Статья создана
Yandex Cloud
Обновлена 27 мая 2026 г.
Открыть в Markdown
  • gRPC request
  • CreateApiKeyRequest
  • CreateApiKeyResponse
  • ApiKey

Creates an API key for the specified service account.

gRPC requestgRPC request

rpc Create (CreateApiKeyRequest) returns (CreateApiKeyResponse)

CreateApiKeyRequestCreateApiKeyRequest

{
  "service_account_id": "string",
  "description": "string",
  "scope": "string",
  "scopes": [
    "string"
  ],
  "expires_at": "google.protobuf.Timestamp"
}

Field

Description

service_account_id

string

ID of the service account to create an API key for.
To get the service account ID, use a yandex.cloud.iam.v1.ServiceAccountService.List request.
If not specified, it defaults to the subject that made the request.

The maximum string length in characters is 50.

description

string

Description of the API key.

The maximum string length in characters is 256.

scopes[]

string

Scopes of the API key.

The maximum string length in characters for each value is 256. The maximum number of elements is 100.

expires_at

google.protobuf.Timestamp

API key expiration timestamp, if not specified, then the API key doesn't expire

CreateApiKeyResponseCreateApiKeyResponse

{
  "api_key": {
    "id": "string",
    "service_account_id": "string",
    "created_at": "google.protobuf.Timestamp",
    "description": "string",
    "last_used_at": "google.protobuf.Timestamp",
    "scope": "string",
    "scopes": [
      "string"
    ],
    "expires_at": "google.protobuf.Timestamp",
    "masked_secret": "string"
  },
  "secret": "string"
}

Field

Description

api_key

ApiKey

ApiKey resource.

secret

string

Secret part of the API key. This secret key you may use in the requests for authentication.

ApiKeyApiKey

An ApiKey resource. For more information, see Api-Key.

Field

Description

id

string

ID of the API Key.

service_account_id

string

ID of the service account that the API key belongs to.

created_at

google.protobuf.Timestamp

Creation timestamp.

description

string

Description of the API key. 0-256 characters long.

last_used_at

google.protobuf.Timestamp

Timestamp for the last authentication using this API key.

scopes[]

string

Scopes of the API key. 0-256 characters long.

expires_at

google.protobuf.Timestamp

API key expiration timestamp.

masked_secret

string

Masked value of the API key's secret part: \*{4}[a-zA-Z0-9_]{6}

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

Предыдущая
Get
Следующая
Update
Создавайте контент и получайте гранты!Готовы написать своё руководство? Участвуйте в контент-программе и получайте гранты на работу с облачными сервисами!
Подробнее о программе
Проект Яндекса
© 2026 ТОО «Облачные Сервисы Казахстан»