{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/ovh/json-schema/ovh-cdnanycast-cache-rule-schema.json",
  "title": "cdnanycast.CacheRule",
  "description": "CacheRules for a domain",
  "x-generated": "2026-11-24",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/ovh-v1-cdn-dedicated-openapi.yml#/components/schemas/cdnanycast.CacheRule",
  "type": "object",
  "properties": {
    "cacheRuleId": {
      "type": "integer",
      "description": "Id for this cache rule",
      "readOnly": true
    },
    "cacheType": {
      "allOf": [
        {
          "$ref": "#/$defs/cdnanycast.CacheRuleCacheTypeEnum"
        }
      ],
      "readOnly": true
    },
    "domain": {
      "type": "string",
      "readOnly": true
    },
    "fileMatch": {
      "type": "string",
      "readOnly": true
    },
    "fileType": {
      "allOf": [
        {
          "$ref": "#/$defs/cdnanycast.CacheRuleFileTypeEnum"
        }
      ],
      "readOnly": true
    },
    "status": {
      "$ref": "#/$defs/cdnanycast.CacheRuleStatusEnum"
    },
    "ttl": {
      "type": "integer"
    }
  },
  "$defs": {
    "cdnanycast.CacheRuleCacheTypeEnum": {
      "type": "string",
      "description": "All type a cache can be in",
      "enum": [
        "forceCache",
        "noCache"
      ]
    },
    "cdnanycast.CacheRuleFileTypeEnum": {
      "type": "string",
      "description": "All states an anycast pool can be in",
      "enum": [
        "extension",
        "file",
        "folder"
      ]
    },
    "cdnanycast.CacheRuleStatusEnum": {
      "type": "string",
      "description": "All states a status can be in",
      "enum": [
        "creating",
        "deleting",
        "error",
        "off",
        "on",
        "updating"
      ]
    }
  }
}