Tagging patch baselines
The topics in this section describe how to work with tags on patch baselines.
Topics
Creating patch baselines with tags
You can add tags to AWS Systems Manager patch baselines at the time you create them.
For information, see the following topics:
Adding tags to existing patch baselines
You can add tags to patch baselines that you own by using the Systems Manager console or the command line.
Topics
Adding tags to an existing patch baseline (console)
Open the AWS Systems Manager console at https://console.aws.amazon.com/systems-manager/
. In the navigation pane, choose Patch Manager.
-or-
If the AWS Systems Manager home page opens first, choose the menu icon (
) to open the navigation pane, and then choose Patch Manager.
-
Choose the name of a custom patch baseline you have already created, scroll down to the Tags table section, and then choose Edit tags.
-
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 patch baseline (AWS CLI)
-
Using your preferred command line tool, run the following command to view the list of patch baselines that you can tag.
aws ssm describe-patch-baselines --filters "Key=OWNER,Values=[Self]"
Note the ID of a patch baseline that you want to tag.
-
Run the following command to tag a patch baseline. Replace each
example resource placeholder
with your own information.If successful, the command has no output.
-
Run the following command to verify the patch baseline tags.
Tag a patch baseline (AWS Tools for PowerShell)
-
Run the following command to list patch baseline that you can tag.
Get-SSMPatchBaseline
-
Run the following commands to tag a patch baseline. Replace each
example resource placeholder
with your own information.$tag = New-Object Amazon.SimpleSystemsManagement.Model.Tag
$tag.Key = "
tag-key
"$tag.Value = "
tag-value
"Add-SSMResourceTag ` -ResourceType "PatchBaseline" ` -ResourceId "
baseline-id
" ` -Tag $tag ` -Force -
Run the following command to verify the patch baseline tags.
Get-SSMResourceTag ` -ResourceType "PatchBaseline" ` -ResourceId "
baseline-id
"
Removing tags from patch baselines
You can use the Systems Manager console or the command line to remove tags from a patch baseline.
Removing tags from patch baseline (console)
Open the AWS Systems Manager console at https://console.aws.amazon.com/systems-manager/
. In the navigation pane, choose Patch Manager.
-or-
If the AWS Systems Manager home page opens first, choose the menu icon (
) to open the navigation pane, and then choose Patch Manager.
-
Choose the name of the patch baseline to remove tags from, scroll down to the Tags table section, and then choose Edit tags tab.
-
Choose Remove tag next to the tag pair you no longer need.
-
Choose Save changes.
Removing tags from patch baselines (command line)
-
Using your preferred command line tool, run the following command to list the patch baselines in your account.
Note the ID of a patch baseline from which you want to remove tags.
-
Run the following command to remove tags from a patch baseline. Replace each
example resource placeholder
with your own information.If successful, the command has no output.
-
Run the following command to verify the patch baseline tags.