createCustomEntityType method
Creates a custom pattern that is used to detect sensitive data across the columns and rows of your structured data.
Each custom pattern you create specifies a regular expression and an optional list of context words. If no context words are passed only a regular expression is checked.
May throw AccessDeniedException.
May throw AlreadyExistsException.
May throw IdempotentParameterMismatchException.
May throw InternalServiceException.
May throw InvalidInputException.
May throw OperationTimeoutException.
May throw ResourceNumberLimitExceededException.
Parameter name :
A name for the custom pattern that allows it to be retrieved or deleted
later. This name must be unique per Amazon Web Services account.
Parameter regexString :
A regular expression string that is used for detecting sensitive data in a
custom pattern.
Parameter contextWords :
A list of context words. If none of these context words are found within
the vicinity of the regular expression the data will not be detected as
sensitive data.
If no context words are passed only a regular expression is checked.
Parameter tags :
A list of tags applied to the custom entity type.
Implementation
Future<CreateCustomEntityTypeResponse> createCustomEntityType({
required String name,
required String regexString,
List<String>? contextWords,
Map<String, String>? tags,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSGlue.CreateCustomEntityType'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'Name': name,
'RegexString': regexString,
if (contextWords != null) 'ContextWords': contextWords,
if (tags != null) 'Tags': tags,
},
);
return CreateCustomEntityTypeResponse.fromJson(jsonResponse.body);
}