

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

# 在 Security Lake 中更新資料訂閱者
<a name="subscriber-update"></a>

您可以透過變更訂閱用戶使用的來源來更新訂閱用戶。您也可以為訂閱者指派或編輯標籤。*標籤*是您可以定義和指派給特定資源類型的標籤 AWS ，包括訂閱者。如需詳細資訊，請參閱 [標記 Security Lake 資源](tagging-resources.md)。

選擇其中一種存取方法，並依照下列步驟定義現有訂閱的新來源。

------
#### [ Console ]

1. 在 https：//[https://console.aws.amazon.com/securitylake/](https://console.aws.amazon.com/securitylake/) 開啟 Security Lake 主控台。

1. 在導覽窗格中，選擇**訂閱者**。

1. 選取訂閱者。

1. 選擇**編輯**，然後執行下列任一動作：
   + 若要更新訂閱者的來源，請在**日誌和事件來源**區段中輸入新設定。
   + 若要為訂閱者指派或編輯標籤，請視需要在標籤區段中變更**標籤**。

1. 完成後，請選擇**儲存**。

------
#### [ API ]

若要以程式設計方式更新訂閱者的資料存取來源，請使用 Security Lake API 的 [UpdateSubscriber](https://docs.aws.amazon.com/security-lake/latest/APIReference/API_UpdateSubscriber.html) 操作。如果您使用的是 AWS Command Line Interface (AWS CLI)，請執行 [update-subscriber](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/securitylake/update-subscriber.html) 命令。在您的請求中，使用 `sources` 參數來指定您希望訂閱者存取的每個來源。

```
$ aws securitylake update-subscriber --subscriber-id {{subscriber ID}}
```

如需與特定 AWS 帳戶 或組織相關聯的訂閱者清單，請使用 [ListSubscribers](https://docs.aws.amazon.com/security-lake/latest/APIReference/API_ListSubscribers.html) 操作。如果您使用的是 AWS Command Line Interface (AWS CLI)，請執行 [list-subscribers](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/securitylake/list-subscribers.html) 命令。

```
$ aws securitylake list-subscribers
```

若要檢閱特定訂閱者的目前設定，請使用 [GetSubscriber](https://docs.aws.amazon.com/security-lake/latest/APIReference/API_GetSubscriber.html) 操作。 執行 [get-subscriber](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/securitylake/get-subscriber.html) 命令。Security Lake 接著會傳回訂閱者的名稱和描述、外部 ID 和其他資訊。如果您使用的是 AWS Command Line Interface (AWS CLI)，請執行 [get-subscriber](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/securitylake/get-subscriber.html) 命令。

 若要更新訂閱者的通知方法，請使用 [UpdateSubscriberNotification](https://docs.aws.amazon.com/security-lake/latest/APIReference/API_UpdateSubscriberNotification.html) 操作。如果您使用的是 AWS Command Line Interface (AWS CLI)，請執行 [update-subscriber-notification](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/securitylake/update-subscriber-notification.html) 命令。例如，您可以為訂閱者指定新的 HTTPS 端點，或從 HTTPS 端點切換到 Amazon SQS 佇列。

------