createGlossaryTerm method
Creates a glossary term within a business glossary in Glue Data Catalog.
May throw AccessDeniedException.
May throw AlreadyExistsException.
May throw ConcurrentModificationException.
May throw EntityNotFoundException.
May throw InternalServiceException.
May throw InvalidInputException.
May throw ThrottlingException.
Parameter glossaryIdentifier :
The unique identifier of the glossary in which to create the term.
Parameter name :
The name of the glossary term.
Parameter clientToken :
A unique, case-sensitive identifier that you provide to ensure the
idempotency of the request.
Parameter longDescription :
A long description of the glossary term.
Parameter shortDescription :
A short description of the glossary term.
Implementation
Future<CreateGlossaryTermResponse> createGlossaryTerm({
required String glossaryIdentifier,
required String name,
String? clientToken,
String? longDescription,
String? shortDescription,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSGlue.CreateGlossaryTerm'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'GlossaryIdentifier': glossaryIdentifier,
'Name': name,
'ClientToken': clientToken ?? _s.generateIdempotencyToken(),
if (longDescription != null) 'LongDescription': longDescription,
if (shortDescription != null) 'ShortDescription': shortDescription,
},
);
return CreateGlossaryTermResponse.fromJson(jsonResponse.body);
}