{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cockroach-labs/json-schema/cockroach-labs-enable-cmekspec-body-schema.json",
  "title": "CMEKClusterSpecification",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cockroach-labs-customer-managed-encryption-keys-api-openapi.yml#/components/schemas/EnableCMEKSpecBody",
  "type": "object",
  "properties": {
    "region_specs": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/CMEKRegionSpecification"
      }
    }
  },
  "required": [
    "region_specs"
  ],
  "$defs": {
    "CMEKKeySpecification": {
      "description": "CMEKKeySpecification contains all the details necessary to use a customer-provided\nencryption key.\n\nThis involves the type/location of the key and the principal to authenticate as \nwhen accessing it.",
      "type": "object",
      "properties": {
        "auth_principal": {
          "type": "string"
        },
        "type": {
          "$ref": "#/$defs/CMEKKeyType"
        },
        "uri": {
          "type": "string"
        }
      }
    },
    "CMEKKeyType": {
      "type": "string",
      "enum": [
        "AWS_KMS",
        "GCP_CLOUD_KMS",
        "NULL_KMS",
        "AZURE_KEY_VAULT"
      ],
      "title": "CMEKKeyType enumerates types of customer-managed keys"
    },
    "CMEKRegionSpecification": {
      "description": "CMEKRegionSpecification declares the customer-provided key specification that\nshould be used in a given region.",
      "type": "object",
      "properties": {
        "key_spec": {
          "$ref": "#/$defs/CMEKKeySpecification"
        },
        "region": {
          "type": "string"
        }
      }
    }
  }
}