

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

# 從 Security Lake 移除 AWS 服務 做為來源
<a name="remove-internal-sources"></a>

選擇您的存取方法，並依照下列步驟移除原生支援的 AWS 服務 Security Lake 來源。您可以移除一或多個區域的來源。當您移除來源時，Security Lake 會停止從指定區域和帳戶中的來源收集資料，而且訂閱者無法再從來源取用新資料。不過，訂閱者仍然可以使用 Security Lake 在移除之前從來源收集的資料。您只能使用這些指示來移除原生支援的 AWS 服務 來源。如需移除自訂來源的相關資訊，請參閱 [從 Security Lake 中的自訂來源收集資料](custom-sources.md)。

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

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

1. 從導覽窗格中選擇**來源**。

1. 選取來源，然後選擇**停用**。

1. 選取您要停止從此來源收集資料的 區域。Security Lake 將停止從來源收集所選區域中*所有*帳戶的資料。

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

若要以程式設計方式移除 AWS 服務 做為來源，請使用 Security Lake API 的 [DeleteAwsLogSource](https://docs.aws.amazon.com/security-lake/latest/APIReference/API_DeleteAwsLogSource.html) 操作。如果您使用的是 AWS Command Line Interface (AWS CLI)，請執行 [delete-aws-log-source](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/securitylake/delete-aws-log-source.html) 命令。`sourceName` 和 `regions` 是必要參數。或者，您可以將移除的範圍限制為特定 `accounts`或特定 `sourceVersion`。

**重要**  
當您未在命令中提供參數時，Security Lake 會假設缺少的參數參照整個集合。例如，如果您不提供 `accounts` 參數 ，則 命令會套用至組織中的整組帳戶。

下列範例會移除 VPC 流程日誌，做為指定帳戶和區域中的來源。

```
$ aws securitylake delete-aws-log-source \
--sources sourceName=VPC_FLOW,accounts='["123456789012", "111122223333"]',regions='["us-east-1", "us-east-2"]',sourceVersion="2.0"
```

下列範例會移除 Route 53 做為指定帳戶和區域中的來源。

```
$ aws securitylake delete-aws-log-source \
--sources sourceName=ROUTE53,accounts='["123456789012"]',regions='["us-east-1", "us-east-2"]',sourceVersion="2.0"
```

上述範例已針對 Linux、macOS 或 Unix 進行格式化，並使用反斜線 (\$1) 換行字元來改善可讀性。

------