

# 機密データの検出 API
<a name="aws-glue-api-sensitive-data-api"></a>

機密データ検出 API では、構造化データの列と行全体にある機密データを検出するために使用される API について説明します。

## データ型
<a name="aws-glue-api-sensitive-data-api-objects"></a>
+ [CustomentityType 構造](#aws-glue-api-sensitive-data-api-CustomEntityType)

## CustomentityType 構造
<a name="aws-glue-api-sensitive-data-api-CustomEntityType"></a>

構造化データの列と行全体にある機密データを検出するためのカスタムパターンを表すオブジェクトです。

**フィールド**
+ `Name` – *必須:* UTF-8 文字列。1～255 バイト長。[Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) に一致。

  後で、取得したり削除したりすることができるカスタムパターンの名前です。この名前は AWS アカウントごとに一意である必要があります。
+ `RegexString` – *必須:* UTF-8 文字列。1～255 バイト長。[Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) に一致。

  カスタムパターン内にある機密データの検出に使用される正規表現の文字列。
+ `ContextWords` – UTF-8 文字列の配列、1～20 個の文字列。

  コンテキスト単語のリスト。正規表現の範囲内でこれらのコンテキスト単語が見つからない場合、データは機密データとして検出されません。

  コンテキスト単語が渡されない場合は、正規表現のみがチェックされます。

## 操作
<a name="aws-glue-api-sensitive-data-api-actions"></a>
+ [CreateCustomentType アクション (Python: create\_custom\_entity\_type)](#aws-glue-api-sensitive-data-api-CreateCustomEntityType)
+ [DeleteCustomEntityType アクション (Python: delete\_custom\_entity\_type)](#aws-glue-api-sensitive-data-api-DeleteCustomEntityType)
+ [GetCustomEntityType アクション (Python: get\_custom\_entity\_type)](#aws-glue-api-sensitive-data-api-GetCustomEntityType)
+ [BatchGetCustomEntityTypes アクション (Python: batch\_get\_custom\_entity\_types)](#aws-glue-api-sensitive-data-api-BatchGetCustomEntityTypes)
+ [ListCustomentTypes アクション (Python: list\_custom\_entity\_types)](#aws-glue-api-sensitive-data-api-ListCustomEntityTypes)

## CreateCustomentType アクション (Python: create\_custom\_entity\_type)
<a name="aws-glue-api-sensitive-data-api-CreateCustomEntityType"></a>

構造化データの列と行全体にある機密データを検出するために使用されるカスタムパターンを作成します。

作成するカスタムパターンごとに、正規表現とオプションのコンテキスト単語リストを作成し、指定します。コンテキスト単語が渡されない場合は、正規表現のみがチェックされます。

**リクエスト**
+ `Name` – *必須:* UTF-8 文字列。1～255 バイト長。[Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) に一致。

  後で、取得したり削除したりすることができるカスタムパターンの名前です。この名前は AWS アカウントごとに一意である必要があります。
+ `RegexString` – *必須:* UTF-8 文字列。1～255 バイト長。[Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) に一致。

  カスタムパターン内にある機密データの検出に使用される正規表現の文字列。
+ `ContextWords` – UTF-8 文字列の配列、1～20 個の文字列。

  コンテキスト単語のリスト。正規表現の範囲内でこれらのコンテキスト単語が見つからない場合、データは機密データとして検出されません。

  コンテキスト単語が渡されない場合は、正規表現のみがチェックされます。
+ `Tags` – キーと値のペアのマップ配列。50 ペア以下。

  各キーは UTF-8 文字列で、1～128 バイト長です。

  各値は UTF-8 文字列で、256 バイト長以下です。

  カスタムエンティティタイプに適用されるタグのリスト。

**レスポンス**
+ `Name` – UTF-8 文字列。1～255 バイト長。[Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) に一致。

  作成したカスタムパターンの名前。

**エラー**
+ `AccessDeniedException`
+ `AlreadyExistsException`
+ `IdempotentParameterMismatchException`
+ `InternalServiceException`
+ `InvalidInputException`
+ `OperationTimeoutException`
+ `ResourceNumberLimitExceededException`

## DeleteCustomEntityType アクション (Python: delete\_custom\_entity\_type)
<a name="aws-glue-api-sensitive-data-api-DeleteCustomEntityType"></a>

カスタムパターン名を指定して、カスタムパターンを削除します。

**リクエスト**
+ `Name` – *必須:* UTF-8 文字列。1～255 バイト長。[Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) に一致。

  削除するカスタムパターンの名前です。

**レスポンス**
+ `Name` – UTF-8 文字列。1～255 バイト長。[Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) に一致。

  削除したカスタムパターンの名前です。

**エラー**
+ `EntityNotFoundException`
+ `AccessDeniedException`
+ `InternalServiceException`
+ `InvalidInputException`
+ `OperationTimeoutException`

## GetCustomEntityType アクション (Python: get\_custom\_entity\_type)
<a name="aws-glue-api-sensitive-data-api-GetCustomEntityType"></a>

カスタムパターン名を指定して、カスタムパターンの詳細を取得します。

**リクエスト**
+ `Name` – *必須:* UTF-8 文字列。1～255 バイト長。[Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) に一致。

  取得するカスタムパターンの名前。

**レスポンス**
+ `Name` – UTF-8 文字列。1～255 バイト長。[Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) に一致。

  取得したカスタムパターンの名前。
+ `RegexString` – UTF-8 文字列。1～255 バイト長。[Single-line string pattern](aws-glue-api-common.md#aws-glue-api-regex-oneLine) に一致。

  カスタムパターン内にある機密データの検出に使用される正規表現の文字列。
+ `ContextWords` – UTF-8 文字列の配列、1～20 個の文字列。

  カスタムパターンを作成した時に指定している場合は、コンテキスト単語のリストです。正規表現の範囲内でこれらのコンテキスト単語が見つからない場合、データは機密データとして検出されません。

**エラー**
+ `EntityNotFoundException`
+ `AccessDeniedException`
+ `InternalServiceException`
+ `InvalidInputException`
+ `OperationTimeoutException`

## BatchGetCustomEntityTypes アクション (Python: batch\_get\_custom\_entity\_types)
<a name="aws-glue-api-sensitive-data-api-BatchGetCustomEntityTypes"></a>

名前リストで指定されたカスタムパターンの詳細を取得します。

**リクエスト**
+ `Names` – 必須: UTF-8 文字列の配列、1～50 個の文字列。

  取得するカスタムパターンの名前リストです。

**応答**
+ `CustomEntityTypes` – [CustomEntityType](#aws-glue-api-sensitive-data-api-CustomEntityType) オブジェクトの配列。

  作成したカスタムパターンを表す `CustomEntityType` オブジェクトのリストです。
+ `CustomEntityTypesNotFound` – UTF-8 文字列の配列、1～50 個の文字列。

  検出できなかったカスタムパターンの名前リストです。

**エラー**
+ `InvalidInputException`
+ `InternalServiceException`
+ `OperationTimeoutException`

## ListCustomentTypes アクション (Python: list\_custom\_entity\_types)
<a name="aws-glue-api-sensitive-data-api-ListCustomEntityTypes"></a>

作成したすべてのカスタムパターンをリスト表示します。

**リクエスト**
+ `NextToken` – UTF-8 文字列。

  結果をオフセットするページ分割されたトークン。
+ `MaxResults` – 1～1000 の数値 (整数)。

  返される結果の最大数。
+ `Tags` – キーと値のペアのマップ配列。50 ペア以下。

  各キーは UTF-8 文字列で、1～128 バイト長です。

  各値は UTF-8 文字列で、256 バイト長以下です。

  キーと値のペアタグのリスト。

**応答**
+ `CustomEntityTypes` – [CustomEntityType](#aws-glue-api-sensitive-data-api-CustomEntityType) オブジェクトの配列。

  カスタムパターンを表す `CustomEntityType` オブジェクトのリストです。
+ `NextToken` – UTF–8 文字列。

  ページネーショントークン (さらに結果がある場合)。

**エラー**
+ `InvalidInputException`
+ `OperationTimeoutException`
+ `InternalServiceException`