AWS CloudFormation
User Guide (Version )

AWS::SSM::MaintenanceWindowTarget

The AWS::SSM::MaintenanceWindowTarget resource registers a target with a maintenance window for AWS Systems Manager. For more information, see RegisterTargetWithMaintenanceWindow 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::MaintenanceWindowTarget", "Properties" : { "Description" : String, "Name" : String, "OwnerInformation" : String, "ResourceType" : String, "Targets" : [ Targets, ... ], "WindowId" : String } }

YAML

Type: AWS::SSM::MaintenanceWindowTarget Properties: Description: String Name: String OwnerInformation: String ResourceType: String Targets: - Targets WindowId: String

Properties

Description

A description for the target.

Required: No

Type: String

Minimum: 1

Maximum: 128

Update requires: No interruption

Name

The name for the maintenance window target.

Required: No

Type: String

Minimum: 3

Maximum: 128

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

Update requires: No interruption

OwnerInformation

A user-provided value that will be included in any CloudWatch events that are raised while running tasks for these targets in this maintenance window.

Required: No

Type: String

Minimum: 1

Maximum: 128

Update requires: No interruption

ResourceType

The type of target that is being registered with the maintenance window.

Required: Yes

Type: String

Allowed Values: INSTANCE

Update requires: No interruption

Targets

The targets to register with the maintenance window. In other words, the instances to run commands on when the maintenance window runs.

You can specify targets using either instance IDs or tags that have been applied to instances.

Example 1: Specify instance IDs

Key=InstanceIds,Values=instance-id-1,instance-id-2,instance-id-3

Example 2: Use tag key-pairs applied to instances

Key=tag:my-tag-key,Values=my-tag-value-1,my-tag-value-2

Example 3: Use tag-keys applied to instances

Key=tag-key,Values=my-tag-key-1,my-tag-key-2

For more information about these examples formats, including the best use case for each one, see Examples: Register Targets with a Maintenance Window in the AWS Systems Manager User Guide.

Required: Yes

Type: List of Targets

Maximum: 5

Update requires: No interruption

WindowId

The ID of the maintenance window to register the target with.

Required: Yes

Type: String

Minimum: 20

Maximum: 20

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

Update requires: Replacement

Return Values

Ref

When you pass the logical ID of this resource to the intrinsic Ref function, Ref returns the maintenance window target ID, such as 12a345b6-bbb7-4bb6-90b0-8c9577a2d2b9.

For more information about using the Ref function, see Ref.

See Also