CmdID / aws / aws cloudwatch
aws cloudwatch tag-resource
Assigns one or more tags (key-value pairs) to the specified CloudWatch resource. AWS CLI reference
1 example 2 options Its page in the AWS CLI reference
Examples
To add one or more tags to the specified resource
The following tag-resource example adds 2 tags to the cloudwatch alarm named demo in the specified account.
aws cloudwatch tag-resource --resource-arn arn:aws:cloudwatch:us-west-2:123456789012:alarm:demo --tags Key=stack,Value=Production Key=team,Value=DevopsIdentify--resource-arnThe ARN of the CloudWatch resource that you're adding tags to.--tagsThe list of key-value pairs to associate with the alarm.This command produces no output.
For more information, see Tagging your Amazon CloudWatch resources in the Amazon CloudWatch User Guide.
Options
--resource-arnThe ARN of the CloudWatch resource that you're adding tags to.--tagsThe list of key-value pairs to associate with the alarm.