{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-iot-device-management/json-schema/amazon-iot-device-management-list-active-violations-response-schema.json",
  "title": "ListActiveViolationsResponse",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-iot-device-management-active-violations-api-openapi.yml#/components/schemas/ListActiveViolationsResponse",
  "type": "object",
  "properties": {
    "activeViolations": {
      "allOf": [
        {
          "$ref": "#/$defs/ActiveViolations"
        },
        {
          "description": "The list of active violations."
        }
      ]
    },
    "nextToken": {
      "allOf": [
        {
          "$ref": "#/$defs/NextToken"
        },
        {
          "description": "A token that can be used to retrieve the next set of results, or <code>null</code> if there are no additional results."
        }
      ]
    }
  },
  "$defs": {
    "ActiveViolation": {
      "type": "object",
      "properties": {
        "violationId": {
          "allOf": [
            {
              "$ref": "#/$defs/ViolationId"
            },
            {
              "description": "The ID of the active violation."
            }
          ]
        },
        "thingName": {
          "allOf": [
            {
              "$ref": "#/$defs/DeviceDefenderThingName"
            },
            {
              "description": "The name of the thing responsible for the active violation."
            }
          ]
        },
        "securityProfileName": {
          "allOf": [
            {
              "$ref": "#/$defs/SecurityProfileName"
            },
            {
              "description": "The security profile with the behavior is in violation."
            }
          ]
        },
        "behavior": {
          "allOf": [
            {
              "$ref": "#/$defs/Behavior"
            },
            {
              "description": "The behavior that is being violated."
            }
          ]
        },
        "lastViolationValue": {
          "allOf": [
            {
              "$ref": "#/$defs/MetricValue"
            },
            {
              "description": "The value of the metric (the measurement) that caused the most recent violation."
            }
          ]
        },
        "violationEventAdditionalInfo": {
          "allOf": [
            {
              "$ref": "#/$defs/ViolationEventAdditionalInfo"
            },
            {
              "description": " The details of a violation event. "
            }
          ]
        },
        "verificationState": {
          "allOf": [
            {
              "$ref": "#/$defs/VerificationState"
            },
            {
              "description": "The verification state of the violation (detect alarm)."
            }
          ]
        },
        "verificationStateDescription": {
          "allOf": [
            {
              "$ref": "#/$defs/VerificationStateDescription"
            },
            {
              "description": "The description of the verification state of the violation."
            }
          ]
        },
        "lastViolationTime": {
          "allOf": [
            {
              "$ref": "#/$defs/Timestamp"
            },
            {
              "description": "The time the most recent violation occurred."
            }
          ]
        },
        "violationStartTime": {
          "allOf": [
            {
              "$ref": "#/$defs/Timestamp"
            },
            {
              "description": "The time the violation started."
            }
          ]
        }
      },
      "description": "Information about an active Device Defender security profile behavior violation."
    },
    "ActiveViolations": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ActiveViolation"
      }
    },
    "Behavior": {
      "type": "object",
      "required": [
        "name"
      ],
      "properties": {
        "name": {
          "allOf": [
            {
              "$ref": "#/$defs/BehaviorName"
            },
            {
              "description": "The name you've given to the behavior."
            }
          ]
        },
        "metric": {
          "allOf": [
            {
              "$ref": "#/$defs/BehaviorMetric"
            },
            {
              "description": "What is measured by the behavior."
            }
          ]
        },
        "metricDimension": {
          "allOf": [
            {
              "$ref": "#/$defs/MetricDimension"
            },
            {
              "description": "The dimension for a metric in your behavior. For example, using a <code>TOPIC_FILTER</code> dimension, you can narrow down the scope of the metric to only MQTT topics where the name matches the pattern specified in the dimension. This can't be used with custom metrics."
            }
          ]
        },
        "criteria": {
          "allOf": [
            {
              "$ref": "#/$defs/BehaviorCriteria"
            },
            {
              "description": "The criteria that determine if a device is behaving normally in regard to the <code>metric</code>."
            }
          ]
        },
        "suppressAlerts": {
          "allOf": [
            {
              "$ref": "#/$defs/SuppressAlerts"
            },
            {
              "description": " Suppresses alerts. "
            }
          ]
        }
      },
      "description": "A Device Defender security profile behavior."
    },
    "BehaviorCriteria": {
      "type": "object",
      "properties": {
        "comparisonOperator": {
          "allOf": [
            {
              "$ref": "#/$defs/ComparisonOperator"
            },
            {
              "description": "<p>The operator that relates the thing measured (<code>metric</code>) to the criteria (containing a <code>value</code> or <code>statisticalThreshold</code>). Valid operators include:</p> <ul> <li> <p> <code>string-list</code>: <code>in-set</code> and <code>not-in-set</code> </p> </li> <li> <p> <code>number-list</code>: <code>in-set</code> and <code>not-in-set</code> </p> </li> <li> <p> <code>ip-address-list</code>: <code>in-cidr-set</code> and <code>not-in-cidr-set</code> </p> </li> <li> <p> <code>number</code>: <code>less-than</code>, <code>less-than-equals</code>, <code>greater-than</code>, and <code>greater-than-equals</code> </p> </li> </ul>"
            }
          ]
        },
        "value": {
          "allOf": [
            {
              "$ref": "#/$defs/MetricValue"
            },
            {
              "description": "The value to be compared with the <code>metric</code>."
            }
          ]
        },
        "durationSeconds": {
          "allOf": [
            {
              "$ref": "#/$defs/DurationSeconds"
            },
            {
              "description": "Use this to specify the time duration over which the behavior is evaluated, for those criteria that have a time dimension (for example, <code>NUM_MESSAGES_SENT</code>). For a <code>statisticalThreshhold</code> metric comparison, measurements from all devices are accumulated over this time duration before being used to calculate percentiles, and later, measurements from an individual device are also accumulated over this time duration before being given a percentile rank. Cannot be used with list-based metric datatypes."
            }
          ]
        },
        "consecutiveDatapointsToAlarm": {
          "allOf": [
            {
              "$ref": "#/$defs/ConsecutiveDatapointsToAlarm"
            },
            {
              "description": "If a device is in violation of the behavior for the specified number of consecutive datapoints, an alarm occurs. If not specified, the default is 1."
            }
          ]
        },
        "consecutiveDatapointsToClear": {
          "allOf": [
            {
              "$ref": "#/$defs/ConsecutiveDatapointsToClear"
            },
            {
              "description": "If an alarm has occurred and the offending device is no longer in violation of the behavior for the specified number of consecutive datapoints, the alarm is cleared. If not specified, the default is 1."
            }
          ]
        },
        "statisticalThreshold": {
          "allOf": [
            {
              "$ref": "#/$defs/StatisticalThreshold"
            },
            {
              "description": "A statistical ranking (percentile)that indicates a threshold value by which a behavior is determined to be in compliance or in violation of the behavior."
            }
          ]
        },
        "mlDetectionConfig": {
          "allOf": [
            {
              "$ref": "#/$defs/MachineLearningDetectionConfig"
            },
            {
              "description": " The configuration of an ML Detect "
            }
          ]
        }
      },
      "description": "The criteria by which the behavior is determined to be normal."
    },
    "BehaviorMetric": {
      "type": "string"
    },
    "BehaviorName": {
      "type": "string",
      "pattern": "[a-zA-Z0-9:_-]+",
      "minLength": 1,
      "maxLength": 128
    },
    "Cidr": {
      "type": "string",
      "pattern": "[a-fA-F0-9:\\.\\/]+",
      "minLength": 2,
      "maxLength": 43
    },
    "Cidrs": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Cidr"
      }
    },
    "ComparisonOperator": {
      "type": "string",
      "enum": [
        "less-than",
        "less-than-equals",
        "greater-than",
        "greater-than-equals",
        "in-cidr-set",
        "not-in-cidr-set",
        "in-port-set",
        "not-in-port-set",
        "in-set",
        "not-in-set"
      ]
    },
    "ConfidenceLevel": {
      "type": "string",
      "enum": [
        "LOW",
        "MEDIUM",
        "HIGH"
      ]
    },
    "ConsecutiveDatapointsToAlarm": {
      "type": "integer",
      "minimum": 1,
      "maximum": 10
    },
    "ConsecutiveDatapointsToClear": {
      "type": "integer",
      "minimum": 1,
      "maximum": 10
    },
    "DeviceDefenderThingName": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128
    },
    "DimensionName": {
      "type": "string",
      "pattern": "[a-zA-Z0-9:_-]+",
      "minLength": 1,
      "maxLength": 128
    },
    "DimensionValueOperator": {
      "type": "string",
      "enum": [
        "IN",
        "NOT_IN"
      ]
    },
    "DurationSeconds": {
      "type": "integer"
    },
    "EvaluationStatistic": {
      "type": "string",
      "pattern": "(p0|p0\\.1|p0\\.01|p1|p10|p50|p90|p99|p99\\.9|p99\\.99|p100)"
    },
    "MachineLearningDetectionConfig": {
      "type": "object",
      "required": [
        "confidenceLevel"
      ],
      "properties": {
        "confidenceLevel": {
          "allOf": [
            {
              "$ref": "#/$defs/ConfidenceLevel"
            },
            {
              "description": " The sensitivity of anomalous behavior evaluation. Can be <code>Low</code>, <code>Medium</code>, or <code>High</code>. "
            }
          ]
        }
      },
      "description": " The configuration of an ML Detect Security Profile. "
    },
    "MetricDimension": {
      "type": "object",
      "required": [
        "dimensionName"
      ],
      "properties": {
        "dimensionName": {
          "allOf": [
            {
              "$ref": "#/$defs/DimensionName"
            },
            {
              "description": "A unique identifier for the dimension."
            }
          ]
        },
        "operator": {
          "allOf": [
            {
              "$ref": "#/$defs/DimensionValueOperator"
            },
            {
              "description": "Defines how the <code>dimensionValues</code> of a dimension are interpreted. For example, for dimension type TOPIC_FILTER, the <code>IN</code> operator, a message will be counted only if its topic matches one of the topic filters. With <code>NOT_IN</code> operator, a message will be counted only if it doesn't match any of the topic filters. The operator is optional: if it's not provided (is <code>null</code>), it will be interpreted as <code>IN</code>."
            }
          ]
        }
      },
      "description": "The dimension of a metric."
    },
    "MetricValue": {
      "type": "object",
      "properties": {
        "count": {
          "allOf": [
            {
              "$ref": "#/$defs/UnsignedLong"
            },
            {
              "description": "If the <code>comparisonOperator</code> calls for a numeric value, use this to specify that numeric value to be compared with the <code>metric</code>."
            }
          ]
        },
        "cidrs": {
          "allOf": [
            {
              "$ref": "#/$defs/Cidrs"
            },
            {
              "description": "If the <code>comparisonOperator</code> calls for a set of CIDRs, use this to specify that set to be compared with the <code>metric</code>."
            }
          ]
        },
        "ports": {
          "allOf": [
            {
              "$ref": "#/$defs/Ports"
            },
            {
              "description": "If the <code>comparisonOperator</code> calls for a set of ports, use this to specify that set to be compared with the <code>metric</code>."
            }
          ]
        },
        "number": {
          "allOf": [
            {
              "$ref": "#/$defs/Number"
            },
            {
              "description": " The numeral value of a metric. "
            }
          ]
        },
        "numbers": {
          "allOf": [
            {
              "$ref": "#/$defs/NumberList"
            },
            {
              "description": " The numeral values of a metric. "
            }
          ]
        },
        "strings": {
          "allOf": [
            {
              "$ref": "#/$defs/StringList"
            },
            {
              "description": " The string values of a metric. "
            }
          ]
        }
      },
      "description": "The value to be compared with the <code>metric</code>."
    },
    "NextToken": {
      "type": "string"
    },
    "Number": {
      "type": "number",
      "format": "double"
    },
    "NumberList": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Number"
      }
    },
    "Port": {
      "type": "integer",
      "minimum": 0,
      "maximum": 65535
    },
    "Ports": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Port"
      }
    },
    "SecurityProfileName": {
      "type": "string",
      "pattern": "[a-zA-Z0-9:_-]+",
      "minLength": 1,
      "maxLength": 128
    },
    "StatisticalThreshold": {
      "type": "object",
      "properties": {
        "statistic": {
          "allOf": [
            {
              "$ref": "#/$defs/EvaluationStatistic"
            },
            {
              "description": "The percentile that resolves to a threshold value by which compliance with a behavior is determined. Metrics are collected over the specified period (<code>durationSeconds</code>) from all reporting devices in your account and statistical ranks are calculated. Then, the measurements from a device are collected over the same period. If the accumulated measurements from the device fall above or below (<code>comparisonOperator</code>) the value associated with the percentile specified, then the device is considered to be in compliance with the behavior, otherwise a violation occurs."
            }
          ]
        }
      },
      "description": "A statistical ranking (percentile) that indicates a threshold value by which a behavior is determined to be in compliance or in violation of the behavior."
    },
    "StringList": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/stringValue"
      }
    },
    "SuppressAlerts": {
      "type": "boolean"
    },
    "Timestamp": {
      "type": "string",
      "format": "date-time"
    },
    "UnsignedLong": {
      "type": "integer",
      "minimum": 0
    },
    "VerificationState": {
      "type": "string",
      "enum": [
        "FALSE_POSITIVE",
        "BENIGN_POSITIVE",
        "TRUE_POSITIVE",
        "UNKNOWN"
      ]
    },
    "VerificationStateDescription": {
      "type": "string",
      "pattern": "[^\\p{Cntrl}]*",
      "maxLength": 1000
    },
    "ViolationEventAdditionalInfo": {
      "type": "object",
      "properties": {
        "confidenceLevel": {
          "allOf": [
            {
              "$ref": "#/$defs/ConfidenceLevel"
            },
            {
              "description": " The sensitivity of anomalous behavior evaluation. Can be <code>Low</code>, <code>Medium</code>, or <code>High</code>. "
            }
          ]
        }
      },
      "description": " The details of a violation event. "
    },
    "ViolationId": {
      "type": "string",
      "pattern": "[a-zA-Z0-9\\-]+",
      "minLength": 1,
      "maxLength": 128
    },
    "stringValue": {
      "type": "string"
    }
  }
}