Menu
AWS Systems Manager
API Reference (API Version 2014-11-06)

GetMaintenanceWindowTask

Lists the tasks in a Maintenance Window.

Request Syntax

{
   "WindowId": "string",
   "WindowTaskId": "string"
}

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

WindowId

The Maintenance Window ID that includes the task to retrieve.

Type: String

Length Constraints: Fixed length of 20.

Pattern: ^mw-[0-9a-f]{17}$

Required: Yes

WindowTaskId

The Maintenance Window task ID to retrieve.

Type: String

Length Constraints: Fixed length of 36.

Pattern: ^[0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}$

Required: Yes

Response Syntax

{
   "Description": "string",
   "LoggingInfo": { 
      "S3BucketName": "string",
      "S3KeyPrefix": "string",
      "S3Region": "string"
   },
   "MaxConcurrency": "string",
   "MaxErrors": "string",
   "Name": "string",
   "Priority": number,
   "ServiceRoleArn": "string",
   "Targets": [ 
      { 
         "Key": "string",
         "Values": [ "string" ]
      }
   ],
   "TaskArn": "string",
   "TaskInvocationParameters": { 
      "Automation": { 
         "DocumentVersion": "string",
         "Parameters": { 
            "string" : [ "string" ]
         }
      },
      "Lambda": { 
         "ClientContext": "string",
         "Payload": blob,
         "Qualifier": "string"
      },
      "RunCommand": { 
         "Comment": "string",
         "DocumentHash": "string",
         "DocumentHashType": "string",
         "NotificationConfig": { 
            "NotificationArn": "string",
            "NotificationEvents": [ "string" ],
            "NotificationType": "string"
         },
         "OutputS3BucketName": "string",
         "OutputS3KeyPrefix": "string",
         "Parameters": { 
            "string" : [ "string" ]
         },
         "ServiceRoleArn": "string",
         "TimeoutSeconds": number
      },
      "StepFunctions": { 
         "Input": "string",
         "Name": "string"
      }
   },
   "TaskParameters": { 
      "string" : { 
         "Values": [ "string" ]
      }
   },
   "TaskType": "string",
   "WindowId": "string",
   "WindowTaskId": "string"
}

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

Description

The retrieved task description.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 128.

LoggingInfo

The location in Amazon S3 where the task results are logged.

Type: LoggingInfo object

MaxConcurrency

The maximum number of targets allowed to run this task in parallel.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 7.

Pattern: ^([1-9][0-9]*|[1-9][0-9]%|[1-9]%|100%)$

MaxErrors

The maximum number of errors allowed before the task stops being scheduled.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 7.

Pattern: ^([1-9][0-9]*|[0]|[1-9][0-9]%|[0-9]%|100%)$

Name

The retrieved task name.

Type: String

Length Constraints: Minimum length of 3. Maximum length of 128.

Pattern: ^[a-zA-Z0-9_\-.]{3,128}$

Priority

The priority of the task when it executes. The lower the number, the higher the priority. Tasks that have the same priority are scheduled in parallel.

Type: Integer

Valid Range: Minimum value of 0.

ServiceRoleArn

The IAM service role to assume during task execution.

Type: String

Targets

The targets where the task should execute.

Type: Array of Target objects

Array Members: Minimum number of 0 items. Maximum number of 5 items.

TaskArn

The resource that the task used during execution. For RUN_COMMAND and AUTOMATION task types, the TaskArn is the Systems Manager Document name/ARN. For LAMBDA tasks, the value is the function name/ARN. For STEP_FUNCTION tasks, the value is the state machine ARN.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1600.

TaskInvocationParameters

The parameters to pass to the task when it executes.

Type: MaintenanceWindowTaskInvocationParameters object

TaskParameters

The parameters to pass to the task when it executes.

Type: String to MaintenanceWindowTaskParameterValueExpression object map

Key Length Constraints: Minimum length of 1. Maximum length of 255.

TaskType

The type of task to execute.

Type: String

Valid Values: RUN_COMMAND | AUTOMATION | STEP_FUNCTIONS | LAMBDA

WindowId

The retrieved Maintenance Window ID.

Type: String

Length Constraints: Fixed length of 20.

Pattern: ^mw-[0-9a-f]{17}$

WindowTaskId

The retrieved Maintenance Window task ID.

Type: String

Length Constraints: Fixed length of 36.

Pattern: ^[0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}$

Errors

For information about the errors that are common to all actions, see Common Errors.

DoesNotExistException

Error returned when the ID specified for a resource (e.g. a Maintenance Window) doesn't exist.

HTTP Status Code: 400

InternalServerError

An error occurred on the server side.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: