

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

# 刪除詞彙清單
<a name="bda-library-deleting-cv"></a>

使用 [InvokeDataAutomationLibraryIngestionJob](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_data-automation_InvokeDataAutomationLibraryIngestionJob.html) 搭配 "DELETE" 操作類型，從您的程式庫移除特定實體。

## AWS CLI 範例：
<a name="bda-library-deleting-cv-cli"></a>

### 選項 1：使用 S3 資訊清單檔案
<a name="bda-library-deleting-cv-option1"></a>

#### 步驟 1：建立 JSONL 資訊清單檔案
<a name="bda-library-deleting-cv-option1-step1"></a>

使用 entityIds 清單建立簡單的 s3 資訊清單檔案。

範例：`cv-delete-manifest.json`

```
{"entityIds": ["medical-en", "medical-es"]}
```

#### 步驟 2：將資訊清單上傳至 S3
<a name="bda-library-deleting-cv-option1-step2"></a>

```
aws s3 cp vocabulary-manifest.json s3://my-bucket/manifests/
```

#### 步驟 3：啟動擷取任務
<a name="bda-library-deleting-cv-option1-step3"></a>

使用 [InvokeDataAutomationLibraryIngestionJob](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_data-automation_InvokeDataAutomationLibraryIngestionJob.html) 啟動具有操作類型 DELETE 的詞彙擷取任務

**請求**

```
aws bedrock-data-automation invoke-data-automation-library-ingestion-job \
    --library-arn "arn:aws:bedrock:us-east-1:123456789012:data-automation-library/healthcare-vocabulary" \
    --entity-type "VOCABULARY" \
    --operation-type "DELETE" \
    --input-configuration '{"s3Object":{"s3Uri":"s3://my-bucket/manifests/cv-delete-manifest.json"}}' \
    --output-configuration '{"s3Uri":"s3://my-bucket/outputs/"}'
```

**回應：**

```
{
  "jobArn": "arn:aws:bedrock:us-east-1:123456789012:data-automation-library-ingestion-job/job-12345"
}
```

### 選項 2：使用內嵌承載
<a name="bda-library-deleting-cv-option2"></a>

**請求**

```
aws bedrock-data-automation invoke-data-automation-library-ingestion-job \
    --library-arn "arn:aws:bedrock:us-east-1:123456789012:data-automation-library/healthcare-vocabulary" \
    --entity-type "VOCABULARY" \
    --operation-type "DELETE" \
    --input-configuration '{"inlinePayload":{"deleteEntitiesInfo":{"entityIds": ["medical-en"]}}}' \
    --output-configuration '{"s3Uri": "s3://my-bucket/outputs/"}'
```

## AWS 主控台範例：
<a name="bda-library-deleting-cv-console"></a>

1. 導覽至您程式庫的「程式庫詳細資訊」頁面

1. 從「自訂詞彙清單」中選擇所需的實體

1. 選擇「刪除自訂詞彙清單」