POST /kms-key/{id}/encrypt

Encrypt a plaintext.

Path parameters

  • id string(uuid) Required
application/json

Body Required

  • encryption-context string(byte) | null
  • plaintext string(byte) Required

Responses

  • 200 application/json

    200

    Hide response attribute Show response attribute object
    • ciphertext string(byte) Required
  • 400 application/json

    400

    Hide response attributes Show response attributes object
    • type string(uri-reference) Required
    • title string Required
    • status integer Required

      Minimum value is 100, maximum value is 599.

    • detail string Required
    • instance string(uri-reference)
    • errors array[object]
      Hide errors attributes Show errors attributes object
      • path string
      • detail string
      • pointer string
      • location string
POST /kms-key/{id}/encrypt
curl \
 --request POST 'https://api-ch-gva-2.exoscale.com/v2/kms-key/{id}/encrypt' \
 --header "Content-Type: application/json" \
 --data '{"encryption-context":"string","plaintext":"string"}'
Request examples
{
  "encryption-context": "string",
  "plaintext": "string"
}
Response examples (200)
{
  "ciphertext": "string"
}
Response examples (400)
{
  "type": "string",
  "title": "string",
  "status": 42,
  "detail": "string",
  "instance": "string",
  "errors": [
    {
      "path": "string",
      "detail": "string",
      "pointer": "string",
      "location": "string"
    }
  ]
}