Tagging Systems Manager associations
The topics in this section describe how to work with tags on State Manager associations. State Manager is a component of AWS Systems Manager.
Topics
Creating associations with tags
You can add tags to a State Manager association when you create it by using the AWS CLI. Adding tags to an association when you create it by using the Systems Manager console isn't supported. For information, see Create an association (command line).
Adding tags to an existing association
Use the following procedures add tags to an existing State Manager association by using the command line.
Topics
Adding tags to an existing association (AWS CLI)
-
Using the AWS CLI, run the following command to list associations that you can tag.
aws ssm describe-associations
Note the name of an association that you want to tag.
-
Run the following command to tag an association. Replace each
example resource placeholder
with your own information.aws ssm add-tags-to-resource \ --resource-type "Association" \ --resource-id "
association-ID
" \ --tags "Key=tag-key
,Value=tag-value
"If successful, the command has no output.
-
Run the following command to verify the association tags.
aws ssm list-tags-for-resource --resource-type "Association" --resource-id "
association-ID
"
Adding tags to an existing association (AWS Tools for PowerShell)
-
Run the following command to list associations that you can tag.
Get-SSMAssociationList
-
Run the following commands to tag a parameter. 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 "Association" ` -ResourceId "
association-ID
" ` -Tag $tag ` -Force -
Run the following command to verify the association tags.
Get-SSMResourceTag ` -ResourceType "Association" ` -ResourceId "
association-ID
"
Removing tags from an association
You can use the command line to remove tags from a State Manager association.
Removing tags from an association (command line)
-
Using your preferred command line tool, run the following command to list the associations in your account.
Note the name of the association from which you want to remove tags.
-
Run the following command to remove tags from an association. Replace each
example resource placeholder
with your own information.If successful, the command has no output.
-
Run the following command to verify the association tags.