{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-timestream/json-schema/amazon-timestream-list-scheduled-queries-response-schema.json",
  "title": "ListScheduledQueriesResponse",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-timestream-scheduled-query-api-openapi.yml#/components/schemas/ListScheduledQueriesResponse",
  "type": "object",
  "properties": {
    "ScheduledQueries": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ScheduledQuery"
      },
      "description": "A list of scheduled queries."
    },
    "NextToken": {
      "type": "string",
      "description": "A token to specify where to start paginating. This is the NextToken from a previously truncated response."
    }
  },
  "required": [
    "ScheduledQueries"
  ],
  "$defs": {
    "ErrorReportConfiguration": {
      "type": "object",
      "properties": {
        "S3Configuration": {
          "$ref": "#/$defs/S3Configuration"
        }
      },
      "required": [
        "S3Configuration"
      ]
    },
    "S3Configuration": {
      "type": "object",
      "properties": {
        "BucketName": {
          "type": "string",
          "description": "Name of the S3 bucket under which error reports will be created."
        },
        "ObjectKeyPrefix": {
          "type": "string",
          "description": "Prefix for the error report key. Timestream by default adds the following prefix to the error report path."
        },
        "EncryptionOption": {
          "type": "string",
          "enum": [
            "SSE_S3",
            "SSE_KMS"
          ],
          "description": "Encryption at rest options for the error reports. If no encryption option is specified, Timestream will choose SSE_S3 as default."
        }
      },
      "required": [
        "BucketName"
      ]
    },
    "ScheduledQuery": {
      "type": "object",
      "properties": {
        "Arn": {
          "type": "string",
          "description": "The Amazon Resource Name."
        },
        "Name": {
          "type": "string",
          "description": "The name of the scheduled query."
        },
        "CreationTime": {
          "type": "string",
          "format": "date-time",
          "description": "The creation time of the scheduled query."
        },
        "State": {
          "type": "string",
          "enum": [
            "ENABLED",
            "DISABLED"
          ],
          "description": "State of scheduled query."
        },
        "PreviousInvocationTime": {
          "type": "string",
          "format": "date-time",
          "description": "The last time the scheduled query was run."
        },
        "NextInvocationTime": {
          "type": "string",
          "format": "date-time",
          "description": "The next time the scheduled query is to be run."
        },
        "ErrorReportConfiguration": {
          "$ref": "#/$defs/ErrorReportConfiguration"
        },
        "TargetDestination": {
          "$ref": "#/$defs/TargetDestination"
        },
        "LastRunStatus": {
          "type": "string",
          "enum": [
            "AUTO_TRIGGER_SUCCESS",
            "AUTO_TRIGGER_FAILURE",
            "MANUAL_TRIGGER_SUCCESS",
            "MANUAL_TRIGGER_FAILURE"
          ],
          "description": "Status of the last scheduled query run."
        }
      },
      "required": [
        "Arn",
        "Name",
        "State"
      ]
    },
    "TargetDestination": {
      "type": "object",
      "properties": {
        "TimestreamDestination": {
          "$ref": "#/$defs/TimestreamDestination"
        }
      }
    },
    "TimestreamDestination": {
      "type": "object",
      "properties": {
        "DatabaseName": {
          "type": "string",
          "description": "Timestream database name."
        },
        "TableName": {
          "type": "string",
          "description": "Timestream table name."
        }
      }
    }
  }
}