{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/daon/json-schema/daon-create-archive-policy-request-schema.json",
  "title": "CreateArchivePolicyRequest",
  "description": "The create request body for creating Archive Policies.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/daon-archive-policies-api-openapi.yml#/components/schemas/CreateArchivePolicyRequest",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "The Archive Policy name. May only contain alphanumeric characters and underscores.",
      "maxLength": 50,
      "minLength": 0,
      "pattern": "^[A-Za-z0-9_]+$"
    },
    "description": {
      "type": "string",
      "description": "The Archive Policy description (optional).",
      "maxLength": 255,
      "minLength": 0
    },
    "publicKey": {
      "type": "string",
      "description": "Base64 encoded public key data."
    },
    "publicKeyFormat": {
      "type": "string",
      "description": "Public key format. Only PEM is supported. Value is case-sensitive.",
      "enum": [
        "PEM"
      ]
    },
    "passphrase": {
      "type": "string",
      "description": "Archive Policy passphrase.",
      "maxLength": 255,
      "minLength": 6,
      "pattern": "^[\\x20-\\x7E]+$"
    },
    "cloudFunctionName": {
      "type": "string",
      "description": "Optional cloud function name."
    },
    "cloudFunctionVersion": {
      "type": "integer",
      "format": "int32",
      "description": "Optional cloud function version.",
      "minimum": 1
    },
    "retentionDays": {
      "type": "integer",
      "format": "int32",
      "description": "The number of days to retain archived data. If not provided, retention is unlimited."
    }
  },
  "required": [
    "name"
  ]
}