{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-iot-core/json-schema/amazon-iot-core-list-detect-mitigation-actions-tasks-response-schema.json",
  "title": "ListDetectMitigationActionsTasksResponse",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-iot-core-detect-api-openapi.yml#/components/schemas/ListDetectMitigationActionsTasksResponse",
  "type": "object",
  "properties": {
    "tasks": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/DetectMitigationActionsTaskSummary"
      },
      "description": "The collection of ML Detect mitigation tasks that matched the filter criteria."
    },
    "nextToken": {
      "type": "string",
      "description": "A token that can be used to retrieve the next set of results, or null if there are no additional results."
    }
  },
  "$defs": {
    "AddThingsToThingGroupParams": {
      "type": "object",
      "properties": {
        "thingGroupNames": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The list of groups to which you want to add the things that triggered the mitigation action. You can add a thing to a maximum of 10 groups, but you can't add a thing to more than one group in the same hierarchy."
        },
        "overrideDynamicGroups": {
          "type": "boolean",
          "description": "Specifies if this mitigation action can move the things that triggered the mitigation action even if they are part of one or more dynamic thing groups."
        }
      },
      "required": [
        "thingGroupNames"
      ]
    },
    "DetectMitigationActionsTaskStatistics": {
      "type": "object",
      "properties": {
        "actionsExecuted": {
          "type": "integer",
          "description": "The actions that were performed."
        },
        "actionsSkipped": {
          "type": "integer",
          "description": "The actions that were skipped."
        },
        "actionsFailed": {
          "type": "integer",
          "description": "The actions that failed."
        }
      }
    },
    "DetectMitigationActionsTaskSummary": {
      "type": "object",
      "properties": {
        "taskId": {
          "type": "string",
          "description": "The unique identifier of the task."
        },
        "taskStatus": {
          "type": "string",
          "enum": [
            "IN_PROGRESS",
            "SUCCESSFUL",
            "FAILED",
            "CANCELED"
          ],
          "description": "The status of the task."
        },
        "taskStartTime": {
          "type": "string",
          "format": "date-time",
          "description": "The date the task started."
        },
        "taskEndTime": {
          "type": "string",
          "format": "date-time",
          "description": "The date the task ended."
        },
        "target": {
          "$ref": "#/$defs/DetectMitigationActionsTaskTarget"
        },
        "violationEventOccurrenceRange": {
          "$ref": "#/$defs/ViolationEventOccurrenceRange"
        },
        "onlyActiveViolationsIncluded": {
          "type": "boolean",
          "description": "Includes only active violations."
        },
        "suppressedAlertsIncluded": {
          "type": "boolean",
          "description": "Includes suppressed alerts."
        },
        "actionsDefinition": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/MitigationAction"
          },
          "description": "The definition of the actions."
        },
        "taskStatistics": {
          "$ref": "#/$defs/DetectMitigationActionsTaskStatistics"
        }
      }
    },
    "DetectMitigationActionsTaskTarget": {
      "type": "object",
      "properties": {
        "violationIds": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The unique identifiers of the violations."
        },
        "securityProfileName": {
          "type": "string",
          "description": "The name of the security profile."
        },
        "behaviorName": {
          "type": "string",
          "description": "The name of the behavior."
        }
      }
    },
    "EnableIoTLoggingParams": {
      "type": "object",
      "properties": {
        "roleArnForLogging": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the IAM role used for logging."
        },
        "logLevel": {
          "type": "string",
          "enum": [
            "DEBUG",
            "INFO",
            "ERROR",
            "WARN",
            "DISABLED"
          ],
          "description": "Specifies the type of information to be logged."
        }
      },
      "required": [
        "roleArnForLogging",
        "logLevel"
      ]
    },
    "MitigationAction": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "A user-friendly name for the mitigation action."
        },
        "id": {
          "type": "string",
          "description": "A unique identifier for the mitigation action."
        },
        "roleArn": {
          "type": "string",
          "description": "The IAM role ARN used to apply this mitigation action."
        },
        "actionParams": {
          "$ref": "#/$defs/MitigationActionParams"
        }
      }
    },
    "MitigationActionParams": {
      "type": "object",
      "properties": {
        "updateDeviceCertificateParams": {
          "$ref": "#/$defs/UpdateDeviceCertificateParams"
        },
        "updateCACertificateParams": {
          "$ref": "#/$defs/UpdateCACertificateParams"
        },
        "addThingsToThingGroupParams": {
          "$ref": "#/$defs/AddThingsToThingGroupParams"
        },
        "replaceDefaultPolicyVersionParams": {
          "$ref": "#/$defs/ReplaceDefaultPolicyVersionParams"
        },
        "enableIoTLoggingParams": {
          "$ref": "#/$defs/EnableIoTLoggingParams"
        },
        "publishFindingToSnsParams": {
          "$ref": "#/$defs/PublishFindingToSnsParams"
        }
      }
    },
    "PublishFindingToSnsParams": {
      "type": "object",
      "properties": {
        "topicArn": {
          "type": "string",
          "description": "The ARN of the topic to which you want to publish the findings."
        }
      },
      "required": [
        "topicArn"
      ]
    },
    "ReplaceDefaultPolicyVersionParams": {
      "type": "object",
      "properties": {
        "templateName": {
          "type": "string",
          "enum": [
            "BLANK_POLICY"
          ],
          "description": "The name of the template to be applied. The only supported value is BLANK_POLICY."
        }
      },
      "required": [
        "templateName"
      ]
    },
    "UpdateCACertificateParams": {
      "type": "object",
      "properties": {
        "action": {
          "type": "string",
          "enum": [
            "DEACTIVATE"
          ],
          "description": "The action that you want to apply to the CA certificate. The only supported value is DEACTIVATE."
        }
      },
      "required": [
        "action"
      ]
    },
    "UpdateDeviceCertificateParams": {
      "type": "object",
      "properties": {
        "action": {
          "type": "string",
          "enum": [
            "DEACTIVATE"
          ],
          "description": "The action that you want to apply to the device certificate. The only supported value is DEACTIVATE."
        }
      },
      "required": [
        "action"
      ]
    },
    "ViolationEventOccurrenceRange": {
      "type": "object",
      "properties": {
        "startTime": {
          "type": "string",
          "format": "date-time",
          "description": "The start date and time of a time period in which violation events occurred."
        },
        "endTime": {
          "type": "string",
          "format": "date-time",
          "description": "The end date and time of a time period in which violation events occurred."
        }
      },
      "required": [
        "startTime",
        "endTime"
      ]
    }
  }
}