Tagging maintenance windows
The topics in this section describe how to work with tags on maintenance windows.
Topics
Creating maintenance windows with tags
You can add tags to maintenance windows at the time you create them.
For information, see the following topics:
Adding tags to existing maintenance windows
You can add tags to maintenance windows that you own by using the AWS Systems Manager console or the command line.
Topics
Adding tags to an existing maintenance window (console)
Open the AWS Systems Manager console at https://console.aws.amazon.com/systems-manager/
. In the navigation pane, choose Maintenance Windows.
-
Choose the name of a maintenance window you have already created, and then choose the Tags tabs.
-
Choose Edit tags, and then choose Add tag.
-
For Key, enter a key for the tag, such as
Environment
. -
For Value, enter a value for the tag, such as
Test
. -
Choose Save changes.
Adding tags to an existing maintenance window (AWS CLI)
-
Using your preferred command line tool, run the following command to view the list of maintenance windows that you can tag.
aws ssm describe-maintenance-windows
Note the ID of a maintenance window that you want to tag.
-
Run the following command to tag a maintenance window. Replace each
example resource placeholder
with your own information.If successful, the command has no output.
-
Run the following command to verify the maintenance window tags.
Tag a maintenance window (AWS Tools for PowerShell)
-
Run the following command to list maintenance windows that you can tag.
Get-SSMMaintenanceWindow
-
Run the following commands to tag a maintenance window.
$tag = New-Object Amazon.SimpleSystemsManagement.Model.Tag
$tag.Key = "
tag-key
"$tag.Value = "
tag-value
"Add-SSMResourceTag ` -ResourceType "MaintenanceWindow" ` -ResourceId "
window-id
" ` -Tag $tagwindow-id
the ID of the maintenance window you want to tag.tag-key
is the name of a custom key you supply. For example, Environment or Project.tag-value
is the custom content for the value you want to supply for that key. For example, Production or Q321. -
Run the following command to verify the maintenance window tags.
Get-SSMResourceTag ` -ResourceType "MaintenanceWindow" ` -ResourceId "
window-id
"
Removing tags from maintenance windows
You can use the Systems Manager console or the command line to remove tags from maintenance windows.
Topics
Removing tags from maintenance windows (console)
Open the AWS Systems Manager console at https://console.aws.amazon.com/systems-manager/
. In the navigation pane, choose Maintenance Windows.
-
Choose the name of the maintenance window to remove tags from, and then choose Tags tab.
-
Choose Edit tags, and then choose Remove tag next to the tag pair you no longer need.
-
Choose Save changes.
Removing tags from maintenance windows (command line)
-
Using your preferred command line tool, run the following command to list the maintenance windows in your account.
Note the ID of a maintenance window from which you want to remove tags.
-
Run the following command to remove tags from a maintenance window. Replace each
example resource placeholder
with your own information.If successful, the command has no output.
-
Run the following command to verify the maintenance window tags.