Menu
AWS CloudFormation
User Guide (API Version 2010-05-15)

AWS::SSM::MaintenanceWindowTask

The AWS::SSM::MaintenanceWindowTask resource defines information about a task for a Maintenance Window for Amazon EC2 Systems Manager. For more information, see RegisterTaskWithMaintenanceWindow in the Amazon EC2 Systems Manager API Reference.

Syntax

To declare this entity in your AWS CloudFormation template, use the following syntax:

JSON

Copy
{ "Type" : "AWS::SSM::MaintenanceWindowTask", "Properties" : { "MaxErrors" : String, "Description" : String, "ServiceRoleArn" : String, "Priority" : Integer, "MaxConcurrency" : String, "Targets" : [ Target, ... ], "Name" : String, "TaskArn" : String, "TaskInvocationParameters" : TaskInvocationParameters, "WindowId" : String, "TaskParameters" : JSON object, "TaskType" : String, "LoggingInfo" : LoggingInfo } }

YAML

Copy
Type: "AWS::SSM::MaintenanceWindowTask" Properties: MaxErrors: String Description: String ServiceRoleArn: String Priority: Integer MaxConcurrency: String Targets: - Target Name: String TaskArn: String TaskInvocationParameters: TaskInvocationParameters WindowId: String TaskParameters: JSON object TaskType: String LoggingInfo: LoggingInfo

Properties

MaxErrors

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

Required: Yes

Type: String

Update requires: No interruption

Description

A description of the task.

Required: No

Type: String

Update requires: No interruption

ServiceRoleArn

The role that's used when the task is executed.

Required: Yes

Type: String

Update requires: No interruption

Priority

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.

Required: Yes

Type: Integer

Update requires: No interruption

MaxConcurrency

The maximum number of targets that you can run this task for, in parallel.

Required: Yes

Type: String

Update requires: No interruption

Targets

The targets, either instances or tags.

  • Specify instances using Key=instanceids,Values=instanceid1,instanceid2.

  • Specify tags using Key=tag name,Values=tag value.

Required: Yes

Type: List of SSM MaintenanceWindowTask Target

Update requires: No interruption

Name

The task name.

Required: No

Type: String

Update requires: No interruption

TaskArn

The resource that the task uses during execution.

For RUN_COMMAND and AUTOMATION task types, TaskArn is the SSM document name or Amazon Resource Name (ARN).

For LAMBDA tasks, TaskArn is the function name or ARN.

For STEP_FUNCTION tasks, TaskArn is the state machine ARN.

Required: Yes

Type: String

Update requires: No interruption

TaskInvocationParameters

The parameters for task execution.

Required: No

Type: SSM MaintenanceWindowTask TaskInvocationParameters

Update requires: No interruption

WindowId

The ID of the Maintenance Window where the task is registered.

Required: No

Type: String

Update requires: Replacement

TaskParameters

The parameters to pass to the task when it's executed.

Required: No

Type: JSON object

Update requires: No interruption

TaskType

The type of task. Valid values: RUN_COMMAND, AUTOMATION, LAMBDA, STEP_FUNCTION.

Required: Yes

Type: String

Update requires: No interruption

LoggingInfo

Information about an Amazon S3 bucket to write task-level logs to.

Required: No

Type: SSM MaintenanceWindowTask LoggingInfo

Update requires: No interruption

See Also

On this page: