{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/instaclustr/json-schema/instaclustr-aws-encryption-key-v2-schema.json",
  "title": "AwsEncryptionKeyV2",
  "description": "Definition of a customer managed AWS KMS Key for use with at rest EBS encryption in Instaclustr managed clusters.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/instaclustr-aws-encryption-key-v2-api-openapi.yml#/components/schemas/AwsEncryptionKeyV2",
  "required": [
    "alias",
    "arn"
  ],
  "type": "object",
  "properties": {
    "regions": {
      "type": "array",
      "description": "Regions of the key",
      "readOnly": true,
      "items": {
        "$ref": "#/$defs/AwsRegionV2"
      }
    },
    "inUse": {
      "type": "boolean",
      "description": "Whether the encryption key is used by a cluster.",
      "readOnly": true
    },
    "alias": {
      "maxLength": 30,
      "minLength": 1,
      "pattern": "^[a-zA-Z0-9_-]{1}[a-zA-Z0-9 _-]*$",
      "type": "string",
      "description": "Encryption key alias for display purposes.",
      "x-terraform-force-new": true
    },
    "id": {
      "type": "string",
      "description": "ID of the encryption key.",
      "format": "uuid",
      "readOnly": true
    },
    "arn": {
      "type": "string",
      "description": "AWS ARN for the encryption key.",
      "x-terraform-force-new": true
    },
    "providerAccountName": {
      "type": "string",
      "description": "For customers running in their own account. Your provider account can be found on the Create Cluster page on the Instaclustr Console, or the \"Provider Account\" property on any existing cluster. For customers provisioning on Instaclustr's cloud provider accounts, this property may be omitted.",
      "x-terraform-computed": true,
      "x-terraform-force-new": true
    }
  },
  "$defs": {
    "AwsRegionV2": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "Name of the AWS Region",
          "x-insta-unchangeable": true
        }
      },
      "description": ""
    }
  }
}