Generate a Data Encryption Key from a given KMS Key.
POST
/kms-key/{id}/generate-data-key
curl \
--request POST 'https://api-ch-gva-2.exoscale.com/v2/kms-key/{id}/generate-data-key' \
--header "Content-Type: application/json" \
--data '{"key-spec":"AES-256","bytes-count":42,"encryption-context":"string"}'
Request examples
{
"key-spec": "AES-256",
"bytes-count": 42,
"encryption-context": "string"
}
Response examples (200)
{
"plaintext": "string",
"ciphertext": "string"
}
Response examples (400)
{
"type": "string",
"title": "string",
"status": 42,
"detail": "string",
"instance": "string",
"errors": [
{
"path": "string",
"detail": "string",
"pointer": "string",
"location": "string"
}
]
}