Custom Data Identifier Testing
The Custom Data Identifier Testing resource provides an environment for developing, testing, and refining a custom data identifier. A custom data identifier is a set of criteria that you define to detect sensitive data in a data source. By using custom data identifiers, you can detect sensitive data that reflects your particular scenarios, intellectual property, or proprietary data, and supplement the managed data identifiers that Amazon Macie provides.
When you develop a custom data identifier, you specify a regular expression (regex) that defines a text pattern to match in a data source. You can also specify character sequences, such as words and phrases, and a proximity rule to refine the analysis of data. The character sequences can be: keywords, which are words or phrases that must be in proximity of text that matches the regex, or ignore words, which are words or phrases to exclude from the results. For more information, see Building custom data identifiers in the Amazon Macie User Guide.
You can use the Custom Data Identifier Testing resource to develop, test, and refine a custom data identifier. Note that this resource doesn't create a persistent custom data identifier that you can later access and use in Macie. Instead, it provides a test environment that can help you optimize and refine a custom data identifier by using sample data. When you finish developing and testing a custom data identifier, use the Custom Data Identifier Creation resource to create it.
URI
/custom-data-identifiers/test
HTTP methods
POST
Operation ID: TestCustomDataIdentifier
Tests criteria for a custom data identifier.
Status code | Response model | Description |
---|---|---|
200 | TestCustomDataIdentifierResponse | The request succeeded. |
400 | ValidationException | The request failed because the input doesn't satisfy the constraints specified by the service. |
402 | ServiceQuotaExceededException | The request failed because fulfilling the request would exceed one or more service quotas for your account. |
403 | AccessDeniedException | The request was denied because you don't have sufficient access to the specified resource. |
404 | ResourceNotFoundException | The request failed because the specified resource wasn't found. |
409 | ConflictException | The request failed because it conflicts with the current state of the specified resource. |
429 | ThrottlingException | The request failed because you sent too many requests during a certain amount of time. |
500 | InternalServerException | The request failed due to an unknown internal server error, exception, or failure. |
Schemas
Request bodies
{ "ignoreWords": [ "string" ], "keywords": [ "string" ], "maximumMatchDistance": integer, "regex": "string", "sampleText": "string" }
{ "ignoreWords": [ "string" ], "keywords": [ "string" ], "maximumMatchDistance": integer, "regex": "string", "sampleText": "string" }
Response bodies
{ "matchCount": integer }
{ "message": "string" }
{ "message": "string" }
{ "message": "string" }
{ "message": "string" }
{ "message": "string" }
{ "message": "string" }
{ "message": "string" }
Properties
AccessDeniedException
Provides information about an error that occurred due to insufficient access to a specified resource.
Property | Type | Required | Description |
---|---|---|---|
message | string | False | The explanation of the error that occurred. |
ConflictException
Provides information about an error that occurred due to a versioning conflict for a specified resource.
Property | Type | Required | Description |
---|---|---|---|
message | string | False | The explanation of the error that occurred. |
InternalServerException
Provides information about an error that occurred due to an unknown internal server error, exception, or failure.
Property | Type | Required | Description |
---|---|---|---|
message | string | False | The explanation of the error that occurred. |
ResourceNotFoundException
Provides information about an error that occurred because a specified resource wasn't found.
Property | Type | Required | Description |
---|---|---|---|
message | string | False | The explanation of the error that occurred. |
ServiceQuotaExceededException
Provides information about an error that occurred due to one or more service quotas for an account.
Property | Type | Required | Description |
---|---|---|---|
message | string | False | The explanation of the error that occurred. |
TestCustomDataIdentifierRequest
Specifies the detection criteria of a custom data identifier to test.
Property | Type | Required | Description |
---|---|---|---|
ignoreWords | Array of type string | False | An array that lists specific character sequences (ignore words) to exclude from the results. If the text matched by the regular expression contains any string in this array, Amazon Macie ignores it. The array can contain as many as 10 ignore words. Each ignore word can contain 4-90 UTF-8 characters. Ignore words are case sensitive. |
keywords | Array of type string | False | An array that lists specific character sequences (keywords),
one of which must precede and be within proximity ( |
maximumMatchDistance | integer Format: int32 | False | The maximum number of characters that can exist between the end of at least one
complete character sequence specified by the |
regex | string | True | The regular expression (regex) that defines the pattern to match. The expression can contain as many as 512 characters. |
sampleText | string | True | The sample text to inspect by using the custom data identifier. The text can contain as many as 1,000 characters. |
TestCustomDataIdentifierResponse
Provides test results for a custom data identifier.
Property | Type | Required | Description |
---|---|---|---|
matchCount | integer Format: int32 | False | The number of occurrences of sample text that matched the criteria specified by the custom data identifier. |
ThrottlingException
Provides information about an error that occurred because too many requests were sent during a certain amount of time.
Property | Type | Required | Description |
---|---|---|---|
message | string | False | The explanation of the error that occurred. |
ValidationException
Provides information about an error that occurred due to a syntax error in a request.
Property | Type | Required | Description |
---|---|---|---|
message | string | False | The explanation of the error that occurred. |
See also
For more information about using this API in one of the language-specific AWS SDKs and references, see the following: