

# Amazon CloudWatch 리소스 태그 지정
<a name="CloudWatch-Tagging"></a>

 **태그는 사용자 또는 AWS에서 AWS 리소스에 할당하는 사용자 지정 속성 레이블입니다.

 태그는 다음을 지원합니다.
+  AWS 리소스를 식별하고 정리합니다. 많은 AWS 서비스에서 태깅을 지원합니다. 서로 다른 서비스의 리소스에 동일한 태그를 지정하여 리소스가 서로 연관되어 있음을 나타낼 수 있습니다. 예를 들어, CloudWatch 규칙에 할당한 태그를 EC2 인스턴스에 할당할 수 있습니다.

 태그는 다음 두 부분으로 구성됩니다.
+  *태그 키*(예: `CostCenter`, `Environment` 또는 `Project`). 태그 키는 대/소문자를 구별합니다.
+  *태그 값*(예: `111122223333` 또는 `Production`)으로 알려진 선택적 필드 태그 값을 생략하는 것은 빈 문자열을 사용하는 것과 같습니다. 태그 키처럼 태그 값은 대/소문자를 구별합니다.

 다음 단원에서는 CloudWatch의 태그에 관한 추가 정보를 제공합니다.

## CloudWatch에서 지원되는 리소스
<a name="supported-resources"></a>

CloudWatch의 다음 리소스는 태그 지정을 지원합니다.
+ 경보 - [tag-resource](https://docs.aws.amazon.com/cli/latest/reference/cloudwatch/tag-resource.html) AWS CLI 명령 및 [TagResource](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_TagResource.html) API를 사용하여 경보에 태그를 지정할 수 있습니다. CloudWatch 콘솔의 경보** 세부 정보 페이지를 참조하여 경보 태그를 보고 관리할 수도 있습니다.
+ canary - CloudWatch 콘솔을 사용하여 canary에 태그를 지정할 수 있습니다. 자세한 내용은 [canary 생성](CloudWatch_Synthetics_Canaries_Create.md) 단원을 참조하십시오.
+ Contributor Insights 규칙 - Contributor Insights 규칙을 생성할 때 [put-insight-rule](https://docs.aws.amazon.com/cli/latest/reference/cloudwatch/put-insight-rule.html) AWS CLI 명령 및 [PutInsightRule](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_PutInsightRule.html) API를 사용하여 해당 규칙에 태그를 지정할 수 있습니다. [tag-resource](https://docs.aws.amazon.com/cli/latest/reference/cloudwatch/tag-resource.html) AWS CLI 명령과 [TagResource](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_TagResource.html) API를 사용하여 기존 규칙에 태그를 추가할 수 있습니다.
+ 지표 스트림 – 지표 스트림을 생성할 때 [put-metric-stream](https://docs.aws.amazon.com/cli/latest/reference/cloudwatch/put-metric-stream.html) AWS CLI 명령 및 [PutMetricStream](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_PutMetricStream.html) API를 사용하여 지표 스트림에 태그를 지정할 수 있습니다. [tag-resource](https://docs.aws.amazon.com/cli/latest/reference/cloudwatch/tag-resource.html) AWS CLI 명령 및 [TagResource](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_TagResource.html) API를 사용하여 기존 지표 스트림에 태그를 추가할 수 있습니다.

태그 추가 및 관리에 대한 자세한 내용은 [태그 관리](#CloudWatch-tagging-add-edit-delete) 단원을 참조하세요.

## 태그 관리
<a name="CloudWatch-tagging-add-edit-delete"></a>

태그는 리소스의 `Key` 및 `Value` 속성으로 구성됩니다. CloudWatch 콘솔, AWS CLI 또는 CloudWatch API를 사용하여 이러한 속성의 값을 추가, 편집 또는 삭제할 수 있습니다. 태그 작업에 대한 자세한 내용은 다음을 참조하십시오.
+ *Amazon CloudWatch API 참조*의 [TagResource](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_TagResource.html), [UntagResource](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_UntagResource.html), [ListTagsForResource](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_ListTagsForResource.html)
+ *Amazon CloudWatch CLI 참조*의 [tag-resource](https://docs.aws.amazon.com/cli/latest/reference/cloudwatch/tag-resource.html), [untag-resource](https://docs.aws.amazon.com/cli/latest/reference/cloudwatch/untag-resource.html), [list-tags-for-resource](https://docs.aws.amazon.com/cli/latest/reference/cloudwatch/list-tags-for-resource.html)
+ *Resource Groups 사용 설명서*의 [Tag Editor 작업](https://docs.aws.amazon.com/ARG/latest/userguide/tag-editor.html)

## 태그 명칭 지정 및 사용 규칙
<a name="tagging-restrictions"></a>

CloudWatch 리소스에서 태그를 사용할 때 다음과 같은 기본 이름 지정 및 사용 규칙이 적용됩니다.
+ 각 리소스는 최대 50개의 태그를 보유할 수 있습니다.
+ 각 리소스에 대해 각 태그 키는 고유하며 하나의 값만 가질 수 있습니다.
+ 태그 키의 최대 길이는 UTF-8 형식의 유니코드 문자 128자입니다.
+ 태그 값의 최대 길이는 UTF-8 형식의 유니코드 문자 256자입니다.
+ 허용되는 문자는 UTF-8로 표현할 수 있는 문자, 숫자, 공백 및 ***. : \+ = @ \_ / -***(하이픈) 문자도 있습니다.
+ 태그 키와 값은 대소문자를 구분합니다. 모범 사례는 태그를 대문자로 사용할 것을 전략으로 결정하고 모든 리소스 유형에 대해 일관되게 해당 전략을 구현하는 것입니다. 예를 들어, `Costcenter`, `costcenter` 또는 `CostCenter`를 사용할지 결정하고 모든 태그에 대해 동일한 규칙을 사용합니다. 대/소문자가 일치하지 않는 유사한 태그를 사용하지 마세요.
+ `aws:` 접두사는 AWS가 사용하도록 예약되어 있으므로 태그 사용이 금지되어 있습니다. 이 접두사가 지정된 태그 키나 값은 편집하거나 삭제할 수 없습니다. 이 접두사가 지정된 태그는 리소스당 태그 수 제한에 포함되지 않습니다.