{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-iot-device-management/json-schema/amazon-iot-device-management-describe-audit-task-response-schema.json",
  "title": "DescribeAuditTaskResponse",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-iot-device-management-audit-api-openapi.yml#/components/schemas/DescribeAuditTaskResponse",
  "type": "object",
  "properties": {
    "taskStatus": {
      "allOf": [
        {
          "$ref": "#/$defs/AuditTaskStatus"
        },
        {
          "description": "The status of the audit: one of \"IN_PROGRESS\", \"COMPLETED\", \"FAILED\", or \"CANCELED\"."
        }
      ]
    },
    "taskType": {
      "allOf": [
        {
          "$ref": "#/$defs/AuditTaskType"
        },
        {
          "description": "The type of audit: \"ON_DEMAND_AUDIT_TASK\" or \"SCHEDULED_AUDIT_TASK\"."
        }
      ]
    },
    "taskStartTime": {
      "allOf": [
        {
          "$ref": "#/$defs/Timestamp"
        },
        {
          "description": "The time the audit started."
        }
      ]
    },
    "taskStatistics": {
      "allOf": [
        {
          "$ref": "#/$defs/TaskStatistics"
        },
        {
          "description": "Statistical information about the audit."
        }
      ]
    },
    "scheduledAuditName": {
      "allOf": [
        {
          "$ref": "#/$defs/ScheduledAuditName"
        },
        {
          "description": "The name of the scheduled audit (only if the audit was a scheduled audit)."
        }
      ]
    },
    "auditDetails": {
      "allOf": [
        {
          "$ref": "#/$defs/AuditDetails"
        },
        {
          "description": "Detailed information about each check performed during this audit."
        }
      ]
    }
  },
  "$defs": {
    "AuditCheckDetails": {
      "type": "object",
      "properties": {
        "checkRunStatus": {
          "allOf": [
            {
              "$ref": "#/$defs/AuditCheckRunStatus"
            },
            {
              "description": "The completion status of this check. One of \"IN_PROGRESS\", \"WAITING_FOR_DATA_COLLECTION\", \"CANCELED\", \"COMPLETED_COMPLIANT\", \"COMPLETED_NON_COMPLIANT\", or \"FAILED\"."
            }
          ]
        },
        "checkCompliant": {
          "allOf": [
            {
              "$ref": "#/$defs/CheckCompliant"
            },
            {
              "description": "True if the check is complete and found all resources compliant."
            }
          ]
        },
        "totalResourcesCount": {
          "allOf": [
            {
              "$ref": "#/$defs/TotalResourcesCount"
            },
            {
              "description": "The number of resources on which the check was performed."
            }
          ]
        },
        "nonCompliantResourcesCount": {
          "allOf": [
            {
              "$ref": "#/$defs/NonCompliantResourcesCount"
            },
            {
              "description": "The number of resources that were found noncompliant during the check."
            }
          ]
        },
        "suppressedNonCompliantResourcesCount": {
          "allOf": [
            {
              "$ref": "#/$defs/SuppressedNonCompliantResourcesCount"
            },
            {
              "description": " Describes how many of the non-compliant resources created during the evaluation of an audit check were marked as suppressed. "
            }
          ]
        },
        "errorCode": {
          "allOf": [
            {
              "$ref": "#/$defs/ErrorCode"
            },
            {
              "description": "The code of any error encountered when this check is performed during this audit. One of \"INSUFFICIENT_PERMISSIONS\" or \"AUDIT_CHECK_DISABLED\"."
            }
          ]
        },
        "message": {
          "allOf": [
            {
              "$ref": "#/$defs/ErrorMessage"
            },
            {
              "description": "The message associated with any error encountered when this check is performed during this audit."
            }
          ]
        }
      },
      "description": "Information about the audit check."
    },
    "AuditCheckRunStatus": {
      "type": "string",
      "enum": [
        "IN_PROGRESS",
        "WAITING_FOR_DATA_COLLECTION",
        "CANCELED",
        "COMPLETED_COMPLIANT",
        "COMPLETED_NON_COMPLIANT",
        "FAILED"
      ]
    },
    "AuditDetails": {
      "type": "object",
      "additionalProperties": {
        "$ref": "#/$defs/AuditCheckDetails"
      }
    },
    "AuditTaskStatus": {
      "type": "string",
      "enum": [
        "IN_PROGRESS",
        "COMPLETED",
        "FAILED",
        "CANCELED"
      ]
    },
    "AuditTaskType": {
      "type": "string",
      "enum": [
        "ON_DEMAND_AUDIT_TASK",
        "SCHEDULED_AUDIT_TASK"
      ]
    },
    "CanceledChecksCount": {
      "type": "integer"
    },
    "CheckCompliant": {
      "type": "boolean"
    },
    "CompliantChecksCount": {
      "type": "integer"
    },
    "ErrorCode": {
      "type": "string"
    },
    "ErrorMessage": {
      "type": "string",
      "maxLength": 2048
    },
    "FailedChecksCount": {
      "type": "integer"
    },
    "InProgressChecksCount": {
      "type": "integer"
    },
    "NonCompliantChecksCount": {
      "type": "integer"
    },
    "NonCompliantResourcesCount": {
      "type": "integer"
    },
    "ScheduledAuditName": {
      "type": "string",
      "pattern": "[a-zA-Z0-9_-]+",
      "minLength": 1,
      "maxLength": 128
    },
    "SuppressedNonCompliantResourcesCount": {
      "type": "integer"
    },
    "TaskStatistics": {
      "type": "object",
      "properties": {
        "totalChecks": {
          "allOf": [
            {
              "$ref": "#/$defs/TotalChecksCount"
            },
            {
              "description": "The number of checks in this audit."
            }
          ]
        },
        "inProgressChecks": {
          "allOf": [
            {
              "$ref": "#/$defs/InProgressChecksCount"
            },
            {
              "description": "The number of checks in progress."
            }
          ]
        },
        "waitingForDataCollectionChecks": {
          "allOf": [
            {
              "$ref": "#/$defs/WaitingForDataCollectionChecksCount"
            },
            {
              "description": "The number of checks waiting for data collection."
            }
          ]
        },
        "compliantChecks": {
          "allOf": [
            {
              "$ref": "#/$defs/CompliantChecksCount"
            },
            {
              "description": "The number of checks that found compliant resources."
            }
          ]
        },
        "nonCompliantChecks": {
          "allOf": [
            {
              "$ref": "#/$defs/NonCompliantChecksCount"
            },
            {
              "description": "The number of checks that found noncompliant resources."
            }
          ]
        },
        "failedChecks": {
          "allOf": [
            {
              "$ref": "#/$defs/FailedChecksCount"
            },
            {
              "description": "The number of checks."
            }
          ]
        },
        "canceledChecks": {
          "allOf": [
            {
              "$ref": "#/$defs/CanceledChecksCount"
            },
            {
              "description": "The number of checks that did not run because the audit was canceled."
            }
          ]
        }
      },
      "description": "Statistics for the checks performed during the audit."
    },
    "Timestamp": {
      "type": "string",
      "format": "date-time"
    },
    "TotalChecksCount": {
      "type": "integer"
    },
    "TotalResourcesCount": {
      "type": "integer"
    },
    "WaitingForDataCollectionChecksCount": {
      "type": "integer"
    }
  }
}