Decrypts an existing ciphertext using its original key material and re-encrypts the underlying plaintext using a specified KMS key or the latest key material of the same KMS Key.
Responses
-
Base64 encoded ciphertext
-
Errors
Key Not Found: The request was rejected because the specified KMS Key could not be found.
Key is Disabled: The request was rejected because the specified KMS key is disabled.
Not on Default: The request was rejected because the operation is not allowed on the default key.
Bad Request: The request was rejected because of an invalid request body or path parameter.
POST
/kms-key/{id}/re-encrypt
curl \
--request POST 'https://api-ch-gva-2.exoscale.com/v2/kms-key/{id}/re-encrypt' \
--header "Content-Type: application/json" \
--data '{"source":{"key":"string","encryption-context":"string","ciphertext":"string"},"destination":{"key":"string","encryption-context":"string"}}'
Request examples
{
"source": {
"key": "string",
"encryption-context": "string",
"ciphertext": "string"
},
"destination": {
"key": "string",
"encryption-context": "string"
}
}
Response examples (200)
{
"ciphertext": "string"
}
Response examples (400)
{
"type": "string",
"title": "string",
"status": 42,
"detail": "string"
}