

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# 啟用或停用通知規則的通知
<a name="notification-rule-enable-disable"></a>

當您建立通知規則時，預設會啟用通知。您不需要為了防止傳送通知而刪除規則。只要變更其通知狀態即可。<a name="notification-rule-enable-disable-console"></a>

# 變更通知規則的通知狀態 (主控台)
<a name="notification-rule-enable-disable-console"></a>

1. 開啟位於 https：//[https://console.aws.amazon.com/codesuite/settings/notifications](https://console.aws.amazon.com/codesuite/settings/notifications/) 的 AWS 開發人員工具主控台。

1. 在導覽列中，展開 **Settings (設定)**，然後選擇 **Notification rules (通知規則)**。

1. 在**通知規則**中，檢閱 AWS 區域 您目前登入之 中針對您 AWS 帳戶中資源設定的規則。使用選擇器變更 AWS 區域。

1. 尋找您要啟用或停用的通知規則，然後選擇它以顯示其詳細資訊。

1. 在 **Notification status (通知狀態)** 中，選擇滑桿以變更規則狀態：
   + **Sending notifications (傳送通知)**：這是預設值。
   + **Notifications paused (通知暫停)**：不會將通知傳送至指定的目標。<a name="notification-rule-enable-cli"></a>

# 變更通知規則的通知狀態 (AWS CLI)
<a name="notification-rule-enable-cli"></a>

1. 按照[編輯通知規則 (AWS CLI)](notification-rule-edit.md#notification-rule-edit-cli) 中的步驟，取得通知規則的 JSON。

1. 將 `Status` 欄位編輯為 `ENABLED` (預設值) 或 `DISABLED` (無通知)，然後執行 **update-notification-rule** 命令以變更狀態。

   ```
   "Status": "ENABLED"
   ```