AWS::SSM::MaintenanceWindowTask
The AWS::SSM::MaintenanceWindowTask resource defines information about a task
for a Maintenance Window for AWS Systems Manager. For more information, see RegisterTaskWithMaintenanceWindow in the AWS Systems Manager API
Reference.
Syntax
To declare this entity in your AWS CloudFormation template, use the following syntax:
JSON
{ "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
Type: "AWS::SSM::MaintenanceWindowTask" Properties: MaxErrors:StringDescription:StringServiceRoleArn:StringPriority:IntegerMaxConcurrency:StringTargets: - TargetName:StringTaskArn:StringTaskInvocationParameters: TaskInvocationParameters WindowId:StringTaskParameters:JSON objectTaskType:StringLoggingInfo: 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 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_COMMANDandAUTOMATIONtask types,TaskArnis the SSM document name or Amazon Resource Name (ARN).For
LAMBDAtasks,TaskArnis the function name or ARN.For
STEP_FUNCTIONtasks,TaskArnis the state machine ARN.Required: Yes
Type: String
Update requires: No interruption
TaskInvocationParameters-
The parameters for task execution.
Required: No
Type: 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.
Note
TaskParametershas been deprecated. To specify parameters to pass to a task when it runs, instead use theParametersoption in theTaskInvocationParametersstructure. For information about how Systems Manager handles these options for the supported Maintenance Window task types, see AWS Systems Manager MaintenanceWindowTask TaskInvocationParameters.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.
Note
LoggingInfohas been deprecated. To specify an S3 bucket to contain logs, instead use theOutputS3BucketNameandOutputS3KeyPrefixoptions in theTaskInvocationParametersstructure. For information about how Systems Manager handles these options for the supported Maintenance Window task types, see AWS Systems Manager MaintenanceWindowTask TaskInvocationParameters.Required: No
Type: LoggingInfo
Update requires: No interruption
Return Values
Ref
When you pass the logical ID of an AWS::SSM::MaintenanceWindowTask resource
to the intrinsic Ref function, the function returns the maintenance window task
ID, such as 12a345b6-bbb7-4bb6-90b0-8c9577a2d2b9.
For more information about using the Ref function, see Ref.
See Also
-
RegisterTaskWithMaintenanceWindow in the AWS Systems Manager API Reference
