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

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

  • gRPC request
  • GenerateDataKeyRequest
  • GenerateDataKeyResponse
  1. Справочник API
  2. gRPC (англ.)
  3. SymmetricCrypto
  4. GenerateDataKey

Key Management Service API, gRPC: SymmetricCryptoService.GenerateDataKey

Статья создана
Yandex Cloud
Обновлена 9 декабря 2025 г.
Открыть в Markdown
  • gRPC request
  • GenerateDataKeyRequest
  • GenerateDataKeyResponse

Generates a new symmetric data encryption key (not a KMS key) and returns
the generated key as plaintext and as ciphertext encrypted with the specified symmetric KMS key.

gRPC requestgRPC request

rpc GenerateDataKey (GenerateDataKeyRequest) returns (GenerateDataKeyResponse)

GenerateDataKeyRequestGenerateDataKeyRequest

{
  "key_id": "string",
  "version_id": "string",
  "aad_context": "bytes",
  "data_key_spec": "SymmetricAlgorithm",
  "skip_plaintext": "bool"
}

Field

Description

key_id

string

Required field. ID of the symmetric KMS key that the generated data key should be encrypted with.

The maximum string length in characters is 50.

version_id

string

ID of the key version to encrypt the generated data key with.
Defaults to the primary version if not specified.

The maximum string length in characters is 50.

aad_context

bytes

Additional authenticated data (AAD context), optional.
If specified, this data will be required for decryption with the SymmetricDecryptRequest.
Should be encoded with base64.

The maximum string length in characters is 8192.

data_key_spec

enum SymmetricAlgorithm

Encryption algorithm and key length for the generated data key.

  • AES_128: AES algorithm with 128-bit keys.
  • AES_192: AES algorithm with 192-bit keys.
  • AES_256: AES algorithm with 256-bit keys.
  • AES_256_HSM: AES algorithm with 256-bit keys hosted by HSM
  • GOST_R_3412_2015_K: GOST R 34.12-2015 Kuznyechik algorithm

skip_plaintext

bool

If true, the method won't return the data key as plaintext.
Default value is false.

GenerateDataKeyResponseGenerateDataKeyResponse

{
  "key_id": "string",
  "version_id": "string",
  "data_key_plaintext": "bytes",
  "data_key_ciphertext": "bytes"
}

Field

Description

key_id

string

ID of the symmetric KMS key that was used to encrypt the generated data key.

version_id

string

ID of the key version that was used for encryption.

data_key_plaintext

bytes

Generated data key as plaintext.
The field is empty, if the GenerateDataKeyRequest.skip_plaintext parameter
was set to true.

data_key_ciphertext

bytes

The encrypted data key.

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

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