v1

latestOpenAPI 3.0.0Apache 2.0 License2026-07-141381,185842.7 KB

Retrieves the details of a maintenance window task.

For maintenance window tasks without a specified target, you can't supply values for --max-errors and --max-concurrency. Instead, the system inserts a placeholder value of 1, which may be reported in the response to this command. These values don't affect the running of your task and can be ignored.

To retrieve a list of tasks in a maintenance window, instead use the DescribeMaintenanceWindowTasks command.

post/#X-Amz-Target=AmazonSSM.GetMaintenanceWindowTask

Headers

X-Amz-Target'AmazonSSM.GetMaintenanceWindowTask' required

Request body

WindowIdstring required

The maintenance window ID that includes the task to retrieve.

WindowTaskIdstring required

The maintenance window task ID to retrieve.

Response

Success

WindowIdstring

The retrieved maintenance window ID.

WindowTaskIdstring

The retrieved maintenance window task ID.

TaskArnstring

The resource that the task used during execution. For <code>RUN_COMMAND</code> and <code>AUTOMATION</code> task types, the value of <code>TaskArn</code> is the SSM document name/ARN. For <code>LAMBDA</code> tasks, the value is the function name/ARN. For <code>STEP_FUNCTIONS</code> tasks, the value is the state machine ARN.

ServiceRoleArnstring

The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) service role to use to publish Amazon Simple Notification Service (Amazon SNS) notifications for maintenance window Run Command tasks.

TaskType'RUN_COMMAND' | 'AUTOMATION' | 'STEP_FUNCTIONS' | 'LAMBDA'

The type of task to run.

TaskParametersobject
<p>The parameters to pass to the task when it runs.</p> <note> <p> <code>TaskParameters</code> has been deprecated. To specify parameters to pass to a task when it runs, instead use the <code>Parameters</code> option in the <code>TaskInvocationParameters</code> structure. For information about how Systems Manager handles these options for the supported maintenance window task types, see <a>MaintenanceWindowTaskInvocationParameters</a>.</p> </note>
Priorityinteger

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

MaxConcurrencystring
<p>The maximum number of targets allowed to run this task in parallel.</p> <note> <p>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 <code>1</code>, which may be reported in the response to this command. This value doesn't affect the running of your task and can be ignored.</p> </note>
MaxErrorsstring
<p>The maximum number of errors allowed before the task stops being scheduled.</p> <note> <p>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 <code>1</code>, which may be reported in the response to this command. This value doesn't affect the running of your task and can be ignored.</p> </note>
Namestring

The retrieved task name.

Descriptionstring password

The retrieved task description.

CutoffBehavior'CONTINUE_TASK' | 'CANCEL_TASK'

The action to take on tasks when the maintenance window cutoff time is reached. <code>CONTINUE_TASK</code> means that tasks continue to run. For Automation, Lambda, Step Functions tasks, <code>CANCEL_TASK</code> means that currently running task invocations continue, but no new task invocations are started. For Run Command tasks, <code>CANCEL_TASK</code> means the system attempts to stop the task by sending a <code>CancelCommand</code> operation.