{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-deadline-cloud/json-schema/amazon-deadline-cloud-start-sessions-statistics-aggregation-request-schema.json",
  "title": "StartSessionsStatisticsAggregationRequest",
  "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/StartSessionsStatisticsAggregationRequest",
  "type": "object",
  "properties": {
    "farmId": {
      "type": "string",
      "description": "The identifier of the farm that contains queues or fleets to return statistics for."
    },
    "resourceIds": {
      "$ref": "#/$defs/SessionsStatisticsResources"
    },
    "startTime": {
      "type": "string",
      "format": "date-time",
      "description": "The Linux timestamp of the date and time that the statistics start."
    },
    "endTime": {
      "type": "string",
      "format": "date-time",
      "description": "The Linux timestamp of the date and time that the statistics end."
    },
    "timezone": {
      "type": "string",
      "description": "The time zone to use for the statistics. Use UTC notation such as \"UTC+8.\""
    },
    "period": {
      "type": "string",
      "enum": [
        "HOURLY",
        "DAILY",
        "WEEKLY",
        "MONTHLY"
      ],
      "description": "The period to aggregate the statistics."
    },
    "groupBy": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "QUEUE_ID",
          "FLEET_ID",
          "JOB_ID",
          "USER_ID",
          "USAGE_TYPE",
          "INSTANCE_TYPE",
          "LICENSE_PRODUCT"
        ]
      },
      "description": "The field to use to group the statistics."
    },
    "statistics": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "SUM",
          "MIN",
          "MAX",
          "AVG"
        ]
      },
      "description": "One to four statistics to return."
    }
  },
  "required": [
    "farmId",
    "resourceIds",
    "startTime",
    "endTime",
    "groupBy",
    "statistics"
  ],
  "$defs": {
    "SessionsStatisticsResources": {
      "type": "object",
      "properties": {
        "queueIds": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "One to 10 queue IDs that specify the queues to return statistics for. If you specify the queueIds field, you can't specify the fleetIds field."
        },
        "fleetIds": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "One to 10 fleet IDs that specify the fleets to return statistics for. If you specify the fleetIds field, you can't specify the queueIds field."
        }
      },
      "description": "Exactly one member is set."
    }
  }
}