{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-deadline-cloud/json-schema/amazon-deadline-cloud-get-sessions-statistics-aggregation-response-schema.json",
  "title": "GetSessionsStatisticsAggregationResponse",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-deadline-cloud-operations-api-openapi.yml#/components/schemas/GetSessionsStatisticsAggregationResponse",
  "type": "object",
  "properties": {
    "statistics": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Statistics"
      },
      "description": "The statistics for the specified fleets or queues."
    },
    "status": {
      "type": "string",
      "enum": [
        "IN_PROGRESS",
        "TIMEOUT",
        "FAILED",
        "COMPLETED"
      ],
      "description": "The status of the aggregated results. An aggregation may fail or time out if the results are too large. If this happens, you can call the StartSessionsStatisticsAggregation operation after you reduce the aggregation time frame, reduce the number of queues or fleets in the aggregation, or increase the period length. If you call the StartSessionsStatisticsAggregation operation when the status is IN_PROGRESS, you will receive a ThrottlingException."
    },
    "statusMessage": {
      "type": "string",
      "description": "A message that describes the status."
    },
    "nextToken": {
      "type": "string",
      "description": "If Deadline Cloud returns nextToken, then there are more results available. The value of nextToken is a unique pagination token for each page. To retrieve the next page, call the operation again using the returned token. Keep all other arguments unchanged. If no results remain, then nextToken is set to null. Each pagination token expires after 24 hours. If you provide a token that isn't valid, then you receive an HTTP 400 ValidationException error."
    }
  },
  "required": [
    "status"
  ],
  "$defs": {
    "Statistics": {
      "type": "object",
      "properties": {
        "queueId": {
          "type": "string",
          "description": "The queue ID."
        },
        "fleetId": {
          "type": "string",
          "description": "The fleet ID."
        },
        "jobId": {
          "type": "string",
          "description": "The job ID."
        },
        "jobName": {
          "type": "string",
          "description": "The job name."
        },
        "userId": {
          "type": "string",
          "description": "The user ID."
        },
        "usageType": {
          "type": "string",
          "enum": [
            "COMPUTE",
            "LICENSE",
            "PERSISTENT_VOLUME"
          ],
          "description": "The type of usage for the statistics."
        },
        "licenseProduct": {
          "type": "string",
          "description": "The licensed product."
        },
        "instanceType": {
          "type": "string",
          "description": "The type of instance."
        },
        "count": {
          "type": "integer",
          "description": "The number of instances in a list of statistics."
        },
        "costInUsd": {
          "$ref": "#/$defs/Stats"
        },
        "runtimeInSeconds": {
          "$ref": "#/$defs/Stats"
        },
        "aggregationStartTime": {
          "type": "string",
          "format": "date-time",
          "description": "The start time for the aggregation."
        },
        "aggregationEndTime": {
          "type": "string",
          "format": "date-time",
          "description": "The end time for the aggregation."
        }
      },
      "required": [
        "count",
        "costInUsd",
        "runtimeInSeconds"
      ]
    },
    "Stats": {
      "type": "object",
      "properties": {
        "min": {
          "type": "number",
          "description": "The minimum of the usage statistics."
        },
        "max": {
          "type": "number",
          "description": "The maximum among the usage statistics."
        },
        "avg": {
          "type": "number",
          "description": "The average of the usage statistics."
        },
        "sum": {
          "type": "number",
          "description": "The sum of the usage statistics."
        }
      }
    }
  }
}