Yandex Cloud
Поиск
Связаться с намиПодключиться
  • Документация
  • Блог
  • Все сервисы
  • Статус работы сервисов
    • Популярные
    • Инфраструктура и сеть
    • Платформа данных
    • Контейнеры
    • Инструменты разработчика
    • Бессерверные вычисления
    • Безопасность
    • Мониторинг и управление ресурсами
    • Машинное обучение
    • Бизнес-инструменты
  • Все решения
    • По отраслям
    • По типу задач
    • Экономика платформы
    • Безопасность
    • Техническая поддержка
    • Каталог партнёров
    • Обучение и сертификация
    • Облако для стартапов
    • Облако для крупного бизнеса
    • Центр технологий для общества
    • Облако для интеграторов
    • Поддержка IT-бизнеса
    • Облако для фрилансеров
    • Обучение и сертификация
    • Блог
    • Документация
    • Контент-программа
    • Мероприятия и вебинары
    • Контакты, чаты и сообщества
    • Идеи
    • Истории успеха
    • Тарифы Yandex Cloud
    • Промоакции и free tier
    • Правила тарификации
  • Документация
  • Блог
Проект Яндекса
© 2025 ООО «Яндекс.Облако»
Yandex Identity and Access Management
  • Безопасное использование 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
Обновлена 26 марта 2025 г.
  • gRPC request
  • CreateApiKeyRequest
  • CreateApiKeyResponse
  • ApiKey

Creates an API key for the specified service account.

gRPC request

rpc Create (CreateApiKeyRequest) returns (CreateApiKeyResponse)

CreateApiKeyRequest

{
  "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.

description

string

Description of the API key.

scopes[]

string

Scopes of the API key.

expires_at

google.protobuf.Timestamp

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

CreateApiKeyResponse

{
  "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"
  },
  "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.

ApiKey

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.

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

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