MaintenanceWindowTask - Amazon Systems Manager
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

MaintenanceWindowTask

Information about a task defined for a maintenance window.

Contents

AlarmConfiguration

The details for the CloudWatch alarm applied to your maintenance window task.

Type: AlarmConfiguration object

Required: No

CutoffBehavior

The specification for whether tasks should continue to run after the cutoff time specified in the maintenance windows is reached.

Type: String

Valid Values: CONTINUE_TASK | CANCEL_TASK

Required: No

Description

A description of the task.

Type: String

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

Required: No

LoggingInfo

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

Note

LoggingInfo has been deprecated. To specify an Amazon Simple Storage Service (Amazon S3) bucket to contain logs, instead use the OutputS3BucketName and OutputS3KeyPrefix options in the TaskInvocationParameters structure. For information about how Amazon Systems Manager handles these options for the supported maintenance window task types, see MaintenanceWindowTaskInvocationParameters.

Type: LoggingInfo object

Required: No

MaxConcurrency

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

Note

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.

Type: String

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

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

Required: No

MaxErrors

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

Note

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.

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%)$

Required: No

Name

The task name.

Type: String

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

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

Required: No

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.

Type: Integer

Valid Range: Minimum value of 0.

Required: No

ServiceRoleArn

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

Type: String

Required: No

Targets

The targets (either managed nodes or tags). Managed nodes are specified using Key=instanceids,Values=<instanceid1>,<instanceid2>. Tags are specified using Key=<tag name>,Values=<tag value>.

Type: Array of Target objects

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

Required: No

TaskArn

The resource that the task uses during execution. For RUN_COMMAND and AUTOMATION task types, TaskArn is the Amazon 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.

Type: String

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

Required: No

TaskParameters

The parameters that should be passed to the task when it is run.

Note

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.

Type: String to MaintenanceWindowTaskParameterValueExpression object map

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

Required: No

Type

The type of task.

Type: String

Valid Values: RUN_COMMAND | AUTOMATION | STEP_FUNCTIONS | LAMBDA

Required: No

WindowId

The ID of the maintenance window where the task is registered.

Type: String

Length Constraints: Fixed length of 20.

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

Required: No

WindowTaskId

The 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}$

Required: No

See Also

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