{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/harness/main/json-schema/harness-ricoverage-details-response-schema.json",
  "title": "RICoverageDetailsResponse",
  "x-generated": "2026-10-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/harness-coverage-details-api-openapi.yml#/components/schemas/RICoverageDetailsResponse",
  "type": "object",
  "properties": {
    "ts": {
      "type": "integer",
      "format": "int64",
      "description": "Timestamp of the response"
    },
    "success": {
      "type": "boolean",
      "description": "Indicates whether the request was successful"
    },
    "errors": {
      "type": [
        "string",
        "null"
      ],
      "description": "Error message, if any"
    },
    "response": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/RICoverageDetailRow"
      },
      "description": "List of RI coverage detail rows grouped by instance type, platform, tenancy and region"
    }
  },
  "$defs": {
    "RICoverageDetailRow": {
      "type": "object",
      "properties": {
        "instance_type": {
          "type": "string",
          "description": "EC2 instance type (e.g. m5.2xlarge, t3.medium)"
        },
        "platform": {
          "type": "string",
          "description": "Operating system platform"
        },
        "tenancy": {
          "type": "string",
          "description": "Instance tenancy (Shared, Dedicated, Host)"
        },
        "region": {
          "type": "string",
          "description": "AWS region"
        },
        "average_coverage": {
          "type": "number",
          "format": "double",
          "description": "Average RI coverage percentage (0-100)"
        },
        "reservation_covered_hrs": {
          "type": "number",
          "format": "double",
          "description": "Hours covered by reserved instances"
        },
        "on_demand_hrs": {
          "type": "number",
          "format": "double",
          "description": "Hours billed at on-demand rates"
        },
        "total_running_hrs": {
          "type": "number",
          "format": "double",
          "description": "Total running hours (reservation covered + on-demand)"
        },
        "on_demand_cost": {
          "type": "number",
          "format": "double",
          "description": "Cost for on-demand hours"
        }
      }
    }
  }
}