createGlossary method

Future<CreateGlossaryResponse> createGlossary({
  1. required String name,
  2. String? clientToken,
  3. String? description,
})

Creates a business glossary in Glue Data Catalog. A glossary is a container for glossary terms that define business concepts.

May throw AccessDeniedException. May throw AlreadyExistsException. May throw ConcurrentModificationException. May throw InternalServiceException. May throw InvalidInputException. May throw ThrottlingException.

Parameter name : The name of the glossary.

Parameter clientToken : A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

Parameter description : The description of the glossary.

Implementation

Future<CreateGlossaryResponse> createGlossary({
  required String name,
  String? clientToken,
  String? description,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AWSGlue.CreateGlossary'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'Name': name,
      'ClientToken': clientToken ?? _s.generateIdempotencyToken(),
      if (description != null) 'Description': description,
    },
  );

  return CreateGlossaryResponse.fromJson(jsonResponse.body);
}