

기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.

# 알림 규칙에 대한 대상 추가 또는 제거
<a name="notification-target-change-rule"></a>

알림 규칙을 편집하여 알림을 보낼 대상을 변경할 수 있습니다. 개발자 도구 콘솔 또는를 사용하여 알림 규칙의 대상 AWS CLI 을 변경할 수 있습니다.<a name="notification-target-change-rule-console"></a>

# 알림 규칙에 대한 대상을 변경하려면(콘솔)
<a name="notification-target-change-rule-console"></a>

1. [https://console.aws.amazon.com/codesuite/settings/notifications](https://console.aws.amazon.com/codesuite/settings/notifications/) AWS 개발자 도구 콘솔을 엽니다.

1. 탐색 창에서 **설정**을 선택한 다음 **Notification rules(알림 규칙)**를 선택합니다.

1. **알림 규칙**에서 현재 로그인한의 AWS 계정에 AWS 리전 있는 리소스에 대해 구성된 규칙 목록을 검토합니다. 선택기를 사용하여 AWS 리전을 변경합니다.

1. 규칙을 선택한 다음 **편집**을 선택합니다.

1. **대상**에서 다음 중 하나를 수행합니다.
   + 다른 대상을 추가하려면 **대상 추가**를 선택한 다음 목록에서 추가할 Amazon SNS 주제 또는 AWS Chatbot(Slack) 또는 AWS Chatbot(Microsoft Teams) 클라이언트를 선택합니다. **SNS 주제 생성**을 선택하여 주제를 생성하고 대상으로 추가할 수도 있습니다. 알림 규칙의 대상은 최대 10개까지 보유할 수 있습니다.
   + 대상을 제거하려면 제거하고자 하는 대상 옆에 있는 **Remove target(대상 제거)**을 선택합니다.

1. **제출**을 선택합니다.<a name="notification-target-change-rule-add-cli"></a>

# 알림 규칙에 대한 대상을 추가하려면(AWS CLI)
<a name="notification-target-change-rule-add-cli"></a>

1. 터미널 또는 명령 프롬프트에서 **subscribe** 명령을 실행하여 대상을 추가합니다. 예를 들어 다음 명령은 Amazon SNS 주제를 알림 규칙의 대상으로 추가합니다.

   ```
   aws codestar-notifications subscribe --arn arn:aws:codestar-notifications:us-east-1:123456789012:notificationrule/dc82df7a-EXAMPLE --target TargetType=SNS,TargetAddress=arn:aws:sns:us-east-1:123456789012:MyNotificationTopic
   ```

1. 성공한 경우 명령에서 다음과 유사한 업데이트된 알림 규칙의 ARN을 반환합니다.

   ```
   {
       "Arn": "arn:aws:codestar-notifications:us-east-1:123456789012:notificationrule/dc82df7a-EXAMPLE"
   }
   ```<a name="notification-target-change-rule-remove-cli"></a>

# 알림 규칙에서 대상을 제거하려면(AWS CLI)
<a name="notification-target-change-rule-remove-cli"></a>

1. 터미널 또는 명령 프롬프트에서 **unsubscribe** 명령을 실행하여 대상을 제거합니다. 예를 들어 다음 명령은 알림 규칙의 대상으로 Amazon SNS 주제를 제거합니다.

   ```
   aws codestar-notifications unsubscribe --arn arn:aws:codestar-notifications:us-east-1:123456789012:notificationrule/dc82df7a-EXAMPLE --target TargetType=SNS,TargetAddress=arn:aws:sns:us-east-1:123456789012:MyNotificationTopic
   ```

1. 성공한 경우 명령에서 다음과 유사한 업데이트된 알림 규칙의 ARN과 제거된 대상 관련 정보를 반환합니다.

   ```
   {
       "Arn": "arn:aws:codestar-notifications:us-east-1:123456789012:notificationrule/dc82df7a-EXAMPLE"
       "TargetAddress": "arn:aws:sns:us-east-1:123456789012:MyNotificationTopic"
   }
   ```

## 다음 사항도 참조하세요.
<a name="notification-target-change-also"></a>
+ [알림 규칙 편집](notification-rule-edit.md)
+ [알림 규칙에 대한 알림 사용 또는 사용 중지](notification-rule-enable-disable.md)