{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/opper/json-schema/opper-management-control-rule-schema.json",
  "title": "ManagementControlRule",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/opper-management-api-openapi.yml#/components/schemas/ManagementControlRule",
  "properties": {
    "allowed_model_ids": {
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "config": {
      "description": "The rule's configuration; its shape depends on kind. comply and route rules carry a type discriminator (comply: allowlist | retention | budget | zdr; route: cache | pool_order | absent for a default-model rule); guard and observe rules carry their configuration inline.",
      "type": "object"
    },
    "confirm_file_deletion": {
      "type": "boolean"
    },
    "created_at": {
      "format": "date-time",
      "type": "string"
    },
    "effective_count": {
      "type": "integer"
    },
    "enabled": {
      "type": "boolean"
    },
    "health": {
      "properties": {
        "reason": {
          "type": "string"
        },
        "skipped_at": {
          "format": "date-time",
          "type": "string"
        }
      },
      "required": [
        "skipped_at",
        "reason"
      ],
      "type": "object"
    },
    "id": {
      "type": "string"
    },
    "idempotency_key": {
      "type": "string"
    },
    "kind": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "parent_allowlist": {
      "properties": {
        "deny_all": {
          "type": "boolean"
        },
        "exclude_providers": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "exclude_service_routes": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "handling": {
          "properties": {
            "cache_scopes": {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "caching": {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "human_review": {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "logging": {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "max_retention_days": {
              "type": "integer"
            },
            "moderation": {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "subprocessors_read_content": {
              "type": "boolean"
            },
            "training": {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          },
          "type": "object"
        },
        "maker": {
          "properties": {
            "jurisdiction": {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "name": {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          },
          "type": "object"
        },
        "models": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "provider": {
          "properties": {
            "locations": {
              "properties": {
                "inference": {
                  "properties": {
                    "exclude": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "include": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    }
                  },
                  "type": "object"
                },
                "jurisdiction": {
                  "properties": {
                    "exclude": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "include": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    }
                  },
                  "type": "object"
                },
                "storage": {
                  "properties": {
                    "exclude": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "include": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    }
                  },
                  "type": "object"
                }
              },
              "type": "object"
            },
            "name": {
              "properties": {
                "exclude": {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                "include": {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                }
              },
              "type": "object"
            },
            "route": {
              "properties": {
                "exclude": {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                "include": {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                }
              },
              "type": "object"
            }
          },
          "type": "object"
        },
        "providers": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "regions": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "service_routes": {
          "items": {
            "type": "string"
          },
          "type": "array"
        }
      },
      "required": [
        "providers",
        "regions",
        "models"
      ],
      "type": "object"
    },
    "schema_version": {
      "type": "integer"
    },
    "scope": {
      "properties": {
        "function_uuids": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "member_uuids": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "project_uuids": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "role_names": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "type": {
          "type": "string"
        }
      },
      "required": [
        "type"
      ],
      "type": "object"
    },
    "updated_at": {
      "format": "date-time",
      "type": "string"
    }
  },
  "required": [
    "id",
    "kind",
    "enabled",
    "scope",
    "schema_version",
    "config",
    "created_at",
    "updated_at"
  ],
  "type": "object"
}