{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/sakura-internet/main/json-schema/sakura-internet-metrics-storage-schema.json",
  "title": "MetricsStorage",
  "x-generated": "2026-10-09",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/sakura-internet-monitoring-suite-openapi.yml#/components/schemas/MetricsStorage",
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "format": "int64",
      "title": "Cloud resource id",
      "readOnly": true
    },
    "name": {
      "type": "string",
      "maxLength": 64
    },
    "description": {
      "type": "string",
      "maxLength": 512
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "readOnly": true
    },
    "icon": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "id": {
          "type": "string"
        }
      },
      "readOnly": true
    },
    "is_system": {
      "type": "boolean",
      "readOnly": true
    },
    "account_id": {
      "type": "string",
      "readOnly": true,
      "title": "Cloud account id"
    },
    "resource_id": {
      "type": [
        "integer",
        "null"
      ],
      "readOnly": true,
      "title": "Cloud resource id",
      "format": "int64",
      "minimum": 0,
      "maximum": 999999999999
    },
    "endpoints": {
      "type": "object",
      "properties": {
        "address": {
          "type": "string"
        }
      },
      "required": [
        "address"
      ],
      "readOnly": true
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "readOnly": true,
      "title": "Register datetime"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time",
      "readOnly": true,
      "title": "Update datetime"
    },
    "usage": {
      "type": "object",
      "properties": {
        "metrics_routings": {
          "type": "integer"
        },
        "alert_rules": {
          "type": "integer"
        },
        "log_measure_rules": {
          "type": "integer"
        }
      },
      "required": [
        "metrics_routings",
        "alert_rules",
        "log_measure_rules"
      ],
      "readOnly": true
    }
  },
  "required": [
    "account_id",
    "created_at",
    "endpoints",
    "icon",
    "id",
    "is_system",
    "resource_id",
    "tags",
    "updated_at",
    "usage"
  ]
}