{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/daon/json-schema/daon-rotate-request-schema.json",
  "title": "RotateRequest",
  "description": "A key rotation request. An entry is required for each key to be rotated.\n\nFor the CA and KEK keys a key lifetime and key leniency must be supplied, for the data encryption key only the key lifetime is required.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/daon-tenant-key-management-api-openapi.yml#/components/schemas/RotateRequest",
  "type": "object",
  "properties": {
    "dbEncKeyRotation": {
      "$ref": "#/$defs/KeyRotation",
      "description": "Providing this field will force a rotation of the Data Encryption Key"
    },
    "caKeyRotation": {
      "$ref": "#/$defs/KeyRotation",
      "description": "Providing this field will force a rotation of the CA Root Key"
    },
    "kekRotation": {
      "$ref": "#/$defs/KeyRotation",
      "description": "Providing this field will force a rotation of the Key Encryption Key"
    }
  },
  "$defs": {
    "KeyRotation": {
      "type": "object",
      "description": "Data required to generate a new key during key rotation.\n\nFor CA and KEK keys a key lifetime and key leniency must be supplied, for the data encryption key only the key lifetime is required.",
      "properties": {
        "keyLifetime": {
          "type": "string",
          "description": "How long until the key expires and is automatically rotated."
        },
        "keyLeniency": {
          "type": "string",
          "description": "How much time before the key expiry rotation happens for the CA and Key Encryption Keys."
        }
      },
      "required": [
        "keyLifetime"
      ]
    }
  }
}