

翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。

# シソーラスを削除する
<a name="index-synonyms-delete"></a>

以下の手順は、シソーラスを削除する方法を示しています。

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

1. 左側のナビゲーションペインの変更するインデックスで、**[Synonyms]** (シノニム) を選択します。

1. **[Synonym]** (シノニム) ページで、削除するシソーラスを選択します。

1. **[Thesaurus detail]** (シソーラスの詳細) ページで、**[Delete]** (削除) を選択し、削除を確定します。

------
#### [ CLI ]

を使用してインデックスのサラスを削除するには AWS CLI、 を呼び出します`delete-thesaurus`。

```
aws kendra delete-thesaurus \
--index-id index-id \
--id thesaurus-id
```

------
#### [ Python ]

```
import boto3
from botocore.exceptions import ClientError

kendra = boto3.client("kendra")

print("Delete a thesaurus")

thesaurus_id = "thesaurus-id"
index_id = "index-id"

try:
    kendra.delete_thesaurus(
        Id = thesaurus_id,
        IndexId = index_id
    )

except ClientError as e:
        print("%s" % e)

print("Program ends.")
```

------
#### [ Java ]

```
package com.amazonaws.kendra;

import software.amazon.awssdk.services.kendra.KendraClient;
import software.amazon.awssdk.services.kendra.model.DeleteThesaurusRequest;

public class DeleteThesaurusExample {

  public static void main(String[] args) throws InterruptedException {

    KendraClient kendra = KendraClient.builder().build();

    String thesaurusId = "thesaurus-id";
    String indexId = "index-id";

    DeleteThesaurusRequest updateThesaurusRequest = DeleteThesaurusRequest
        .builder()
        .id(thesaurusId)
        .indexId(indexId)
        .build();
    kendra.deleteThesaurus(updateThesaurusRequest);
  }
}
```

------