{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-iot-device-defender/json-schema/amazon-iot-device-defender-describe-mitigation-action-response-schema.json",
  "title": "DescribeMitigationActionResponse",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-iot-device-defender-mitigationactions-api-openapi.yml#/components/schemas/DescribeMitigationActionResponse",
  "type": "object",
  "properties": {
    "actionName": {
      "allOf": [
        {
          "$ref": "#/$defs/MitigationActionName"
        },
        {
          "description": "The friendly name that uniquely identifies the mitigation action."
        }
      ]
    },
    "actionType": {
      "allOf": [
        {
          "$ref": "#/$defs/MitigationActionType"
        },
        {
          "description": "The type of mitigation action."
        }
      ]
    },
    "actionArn": {
      "allOf": [
        {
          "$ref": "#/$defs/MitigationActionArn"
        },
        {
          "description": "The ARN that identifies this migration action."
        }
      ]
    },
    "actionId": {
      "allOf": [
        {
          "$ref": "#/$defs/MitigationActionId"
        },
        {
          "description": "A unique identifier for this action."
        }
      ]
    },
    "roleArn": {
      "allOf": [
        {
          "$ref": "#/$defs/RoleArn"
        },
        {
          "description": "The ARN of the IAM role used to apply this action."
        }
      ]
    },
    "actionParams": {
      "allOf": [
        {
          "$ref": "#/$defs/MitigationActionParams"
        },
        {
          "description": "Parameters that control how the mitigation action is applied, specific to the type of mitigation action."
        }
      ]
    },
    "creationDate": {
      "allOf": [
        {
          "$ref": "#/$defs/Timestamp"
        },
        {
          "description": "The date and time when the mitigation action was added to your Amazon Web Services accounts."
        }
      ]
    },
    "lastModifiedDate": {
      "allOf": [
        {
          "$ref": "#/$defs/Timestamp"
        },
        {
          "description": "The date and time when the mitigation action was last changed."
        }
      ]
    }
  },
  "$defs": {
    "AddThingsToThingGroupParams": {
      "type": "object",
      "required": [
        "thingGroupNames"
      ],
      "properties": {
        "thingGroupNames": {
          "allOf": [
            {
              "$ref": "#/$defs/ThingGroupNames"
            },
            {
              "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": {
          "allOf": [
            {
              "$ref": "#/$defs/NullableBoolean"
            },
            {
              "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."
            }
          ]
        }
      },
      "description": "Parameters used when defining a mitigation action that move a set of things to a thing group."
    },
    "CACertificateUpdateAction": {
      "type": "string",
      "enum": [
        "DEACTIVATE"
      ]
    },
    "DeviceCertificateUpdateAction": {
      "type": "string",
      "enum": [
        "DEACTIVATE"
      ]
    },
    "EnableIoTLoggingParams": {
      "type": "object",
      "required": [
        "roleArnForLogging",
        "logLevel"
      ],
      "properties": {
        "roleArnForLogging": {
          "allOf": [
            {
              "$ref": "#/$defs/RoleArn"
            },
            {
              "description": "The Amazon Resource Name (ARN) of the IAM role used for logging."
            }
          ]
        },
        "logLevel": {
          "allOf": [
            {
              "$ref": "#/$defs/LogLevel"
            },
            {
              "description": "Specifies the type of information to be logged."
            }
          ]
        }
      },
      "description": "Parameters used when defining a mitigation action that enable Amazon Web Services IoT Core logging."
    },
    "LogLevel": {
      "type": "string",
      "enum": [
        "DEBUG",
        "INFO",
        "ERROR",
        "WARN",
        "DISABLED"
      ]
    },
    "MitigationActionArn": {
      "type": "string"
    },
    "MitigationActionId": {
      "type": "string"
    },
    "MitigationActionName": {
      "type": "string",
      "pattern": "[a-zA-Z0-9_-]+",
      "maxLength": 128
    },
    "MitigationActionParams": {
      "type": "object",
      "properties": {
        "updateDeviceCertificateParams": {
          "allOf": [
            {
              "$ref": "#/$defs/UpdateDeviceCertificateParams"
            },
            {
              "description": "Parameters to define a mitigation action that changes the state of the device certificate to inactive."
            }
          ]
        },
        "updateCACertificateParams": {
          "allOf": [
            {
              "$ref": "#/$defs/UpdateCACertificateParams"
            },
            {
              "description": "Parameters to define a mitigation action that changes the state of the CA certificate to inactive."
            }
          ]
        },
        "addThingsToThingGroupParams": {
          "allOf": [
            {
              "$ref": "#/$defs/AddThingsToThingGroupParams"
            },
            {
              "description": "Parameters to define a mitigation action that moves devices associated with a certificate to one or more specified thing groups, typically for quarantine."
            }
          ]
        },
        "replaceDefaultPolicyVersionParams": {
          "allOf": [
            {
              "$ref": "#/$defs/ReplaceDefaultPolicyVersionParams"
            },
            {
              "description": "Parameters to define a mitigation action that adds a blank policy to restrict permissions."
            }
          ]
        },
        "enableIoTLoggingParams": {
          "allOf": [
            {
              "$ref": "#/$defs/EnableIoTLoggingParams"
            },
            {
              "description": "Parameters to define a mitigation action that enables Amazon Web Services IoT Core logging at a specified level of detail."
            }
          ]
        },
        "publishFindingToSnsParams": {
          "allOf": [
            {
              "$ref": "#/$defs/PublishFindingToSnsParams"
            },
            {
              "description": "Parameters to define a mitigation action that publishes findings to Amazon Simple Notification Service (Amazon SNS. You can implement your own custom actions in response to the Amazon SNS messages."
            }
          ]
        }
      },
      "description": "The set of parameters for this mitigation action. You can specify only one type of parameter (in other words, you can apply only one action for each defined mitigation action)."
    },
    "MitigationActionType": {
      "type": "string",
      "enum": [
        "UPDATE_DEVICE_CERTIFICATE",
        "UPDATE_CA_CERTIFICATE",
        "ADD_THINGS_TO_THING_GROUP",
        "REPLACE_DEFAULT_POLICY_VERSION",
        "ENABLE_IOT_LOGGING",
        "PUBLISH_FINDING_TO_SNS"
      ]
    },
    "NullableBoolean": {
      "type": "boolean"
    },
    "PolicyTemplateName": {
      "type": "string",
      "enum": [
        "BLANK_POLICY"
      ]
    },
    "PublishFindingToSnsParams": {
      "type": "object",
      "required": [
        "topicArn"
      ],
      "properties": {
        "topicArn": {
          "allOf": [
            {
              "$ref": "#/$defs/SnsTopicArn"
            },
            {
              "description": "The ARN of the topic to which you want to publish the findings."
            }
          ]
        }
      },
      "description": "Parameters to define a mitigation action that publishes findings to Amazon SNS. You can implement your own custom actions in response to the Amazon SNS messages."
    },
    "ReplaceDefaultPolicyVersionParams": {
      "type": "object",
      "required": [
        "templateName"
      ],
      "properties": {
        "templateName": {
          "allOf": [
            {
              "$ref": "#/$defs/PolicyTemplateName"
            },
            {
              "description": "The name of the template to be applied. The only supported value is <code>BLANK_POLICY</code>."
            }
          ]
        }
      },
      "description": "Parameters to define a mitigation action that adds a blank policy to restrict permissions."
    },
    "RoleArn": {
      "type": "string",
      "minLength": 20,
      "maxLength": 2048
    },
    "SnsTopicArn": {
      "type": "string",
      "maxLength": 350
    },
    "ThingGroupName": {
      "type": "string",
      "pattern": "[a-zA-Z0-9:_-]+",
      "minLength": 1,
      "maxLength": 128
    },
    "ThingGroupNames": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ThingGroupName"
      },
      "minItems": 1,
      "maxItems": 10
    },
    "Timestamp": {
      "type": "string",
      "format": "date-time"
    },
    "UpdateCACertificateParams": {
      "type": "object",
      "required": [
        "action"
      ],
      "properties": {
        "action": {
          "allOf": [
            {
              "$ref": "#/$defs/CACertificateUpdateAction"
            },
            {
              "description": "The action that you want to apply to the CA certificate. The only supported value is <code>DEACTIVATE</code>."
            }
          ]
        }
      },
      "description": "Parameters to define a mitigation action that changes the state of the CA certificate to inactive."
    },
    "UpdateDeviceCertificateParams": {
      "type": "object",
      "required": [
        "action"
      ],
      "properties": {
        "action": {
          "allOf": [
            {
              "$ref": "#/$defs/DeviceCertificateUpdateAction"
            },
            {
              "description": "The action that you want to apply to the device certificate. The only supported value is <code>DEACTIVATE</code>."
            }
          ]
        }
      },
      "description": "Parameters to define a mitigation action that changes the state of the device certificate to inactive."
    }
  }
}