{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-systems-manager/json-schema/amazon-systems-manager-describe-maintenance-window-tasks-result-schema.json",
  "title": "DescribeMaintenanceWindowTasksResult",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-systems-manager-maintenance-window-task-api-openapi.yml#/components/schemas/DescribeMaintenanceWindowTasksResult",
  "type": "object",
  "properties": {
    "Tasks": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/MaintenanceWindowTask"
      },
      "description": "Information about the tasks in the maintenance window."
    },
    "NextToken": {
      "type": "string",
      "description": "The token to use when requesting the next set of items. If there are no additional items to return, the string is empty."
    }
  },
  "$defs": {
    "Alarm": {
      "type": "object",
      "properties": {
        "Name": {
          "type": "string",
          "description": "The name of your CloudWatch alarm."
        }
      },
      "required": [
        "Name"
      ]
    },
    "AlarmConfiguration": {
      "type": "object",
      "properties": {
        "IgnorePollAlarmFailure": {
          "type": "boolean",
          "description": "When this value is true, your automation or command continues to run in cases where we can’t retrieve alarm status information from CloudWatch. In cases where we successfully retrieve an alarm status of OK or INSUFFICIENT_DATA, the automation or command continues to run, regardless of this value. Default is false."
        },
        "Alarms": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Alarm"
          },
          "description": "The name of the CloudWatch alarm specified in the configuration."
        }
      },
      "required": [
        "Alarms"
      ]
    },
    "LoggingInfo": {
      "type": "object",
      "properties": {
        "S3BucketName": {
          "type": "string",
          "description": "The name of an S3 bucket where execution logs are stored."
        },
        "S3KeyPrefix": {
          "type": "string",
          "description": "(Optional) The S3 bucket subfolder."
        },
        "S3Region": {
          "type": "string",
          "description": "The Amazon Web Services Region where the S3 bucket is located."
        }
      },
      "required": [
        "S3BucketName",
        "S3Region"
      ]
    },
    "MaintenanceWindowTask": {
      "type": "object",
      "properties": {
        "WindowId": {
          "type": "string",
          "description": "The ID of the maintenance window where the task is registered."
        },
        "WindowTaskId": {
          "type": "string",
          "description": "The task ID."
        },
        "TaskArn": {
          "type": "string",
          "description": "The resource that the task uses during execution. For RUN_COMMAND and AUTOMATION task types, TaskArn is the Amazon Web Services Systems Manager (SSM document) name or ARN. For LAMBDA tasks, it's the function name or ARN. For STEP_FUNCTIONS tasks, it's the state machine ARN. Maintenance Window does not validate the TaskArn when you register a task. A successful registration does not guarantee that the TaskArn is valid."
        },
        "Type": {
          "type": "string",
          "enum": [
            "RUN_COMMAND",
            "AUTOMATION",
            "STEP_FUNCTIONS",
            "LAMBDA"
          ],
          "description": "The type of task."
        },
        "Targets": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Target"
          },
          "description": "The targets (either managed nodes or tags). Managed nodes are specified using Key=instanceids,Values=,. Tags are specified using Key=,Values=."
        },
        "TaskParameters": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/MaintenanceWindowTaskParameterValueExpression"
          },
          "description": "The parameters that should be passed to the task when it is run. TaskParameters has been deprecated. To specify parameters to pass to a task when it runs, instead use the Parameters option in the TaskInvocationParameters structure. For information about how Systems Manager handles these options for the supported maintenance window task types, see MaintenanceWindowTaskInvocationParameters."
        },
        "Priority": {
          "type": "integer",
          "description": "The priority of the task in the maintenance window. The lower the number, the higher the priority. Tasks that have the same priority are scheduled in parallel."
        },
        "LoggingInfo": {
          "$ref": "#/$defs/LoggingInfo"
        },
        "ServiceRoleArn": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the IAM service role for Amazon Web Services Systems Manager to assume when running a maintenance window task. If you do not specify a service role ARN, Systems Manager uses a service-linked role in your account. If no appropriate service-linked role for Systems Manager exists in your account, it is created when you run RegisterTaskWithMaintenanceWindow. However, for an improved security posture, we strongly recommend creating a custom policy and custom service role for running your maintenance window tasks. The policy can be crafted to provide only the permis"
        },
        "MaxConcurrency": {
          "type": "string",
          "description": "The maximum number of targets this task can be run for, in parallel. Although this element is listed as \"Required: No\", a value can be omitted only when you are registering or updating a targetless task You must provide a value in all other cases. For maintenance window tasks without a target specified, you can't supply a value for this option. Instead, the system inserts a placeholder value of 1. This value doesn't affect the running of your task."
        },
        "MaxErrors": {
          "type": "string",
          "description": "The maximum number of errors allowed before this task stops being scheduled. Although this element is listed as \"Required: No\", a value can be omitted only when you are registering or updating a targetless task You must provide a value in all other cases. For maintenance window tasks without a target specified, you can't supply a value for this option. Instead, the system inserts a placeholder value of 1. This value doesn't affect the running of your task."
        },
        "Name": {
          "type": "string",
          "description": "The task name."
        },
        "Description": {
          "type": "string",
          "description": "A description of the task."
        },
        "CutoffBehavior": {
          "type": "string",
          "enum": [
            "CONTINUE_TASK",
            "CANCEL_TASK"
          ],
          "description": "The specification for whether tasks should continue to run after the cutoff time specified in the maintenance windows is reached."
        },
        "AlarmConfiguration": {
          "$ref": "#/$defs/AlarmConfiguration"
        }
      }
    },
    "MaintenanceWindowTaskParameterValueExpression": {
      "type": "object",
      "properties": {
        "Values": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "This field contains an array of 0 or more strings, each 1 to 255 characters in length."
        }
      }
    },
    "Target": {
      "type": "object",
      "properties": {
        "Key": {
          "type": "string",
          "description": "User-defined criteria for sending commands that target managed nodes that meet the criteria."
        },
        "Values": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "User-defined criteria that maps to Key. For example, if you specified tag:ServerRole, you could specify value:WebServer to run a command on instances that include EC2 tags of ServerRole,WebServer. Depending on the type of target, the maximum number of values for a key might be lower than the global maximum of 50."
        }
      }
    }
  }
}