createGlossary method

Future<CreateGlossaryOutput> createGlossary({
  1. required String domainIdentifier,
  2. required String name,
  3. required String owningProjectIdentifier,
  4. String? clientToken,
  5. String? description,
  6. GlossaryStatus? status,
  7. List<GlossaryUsageRestriction>? usageRestrictions,
})

Creates an Amazon DataZone business glossary.

Specifies that this is a create glossary policy.

A glossary serves as the central repository for business terminology and definitions within an organization. It helps establish and maintain a common language across different departments and teams, reducing miscommunication and ensuring consistent interpretation of business concepts. Glossaries can include hierarchical relationships between terms, cross-references, and links to actual data assets, making them invaluable for both business users and technical teams trying to understand and use data correctly.

Prerequisites:

  • Domain must exist and be in an active state.
  • Owning project must exist and be accessible by the caller.
  • The glossary name must be unique within the domain.

May throw AccessDeniedException. May throw ConflictException. May throw InternalServerException. May throw ServiceQuotaExceededException. May throw ThrottlingException. May throw ValidationException.

Parameter domainIdentifier : The ID of the Amazon DataZone domain in which this business glossary is created.

Parameter name : The name of this business glossary.

Parameter owningProjectIdentifier : The ID of the project that currently owns business glossary.

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

Parameter description : The description of this business glossary.

Parameter status : The status of this business glossary.

Parameter usageRestrictions : The usage restriction of the restricted glossary.

Implementation

Future<CreateGlossaryOutput> createGlossary({
  required String domainIdentifier,
  required String name,
  required String owningProjectIdentifier,
  String? clientToken,
  String? description,
  GlossaryStatus? status,
  List<GlossaryUsageRestriction>? usageRestrictions,
}) async {
  final $payload = <String, dynamic>{
    'name': name,
    'owningProjectIdentifier': owningProjectIdentifier,
    'clientToken': clientToken ?? _s.generateIdempotencyToken(),
    if (description != null) 'description': description,
    if (status != null) 'status': status.value,
    if (usageRestrictions != null)
      'usageRestrictions': usageRestrictions.map((e) => e.value).toList(),
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri:
        '/v2/domains/${Uri.encodeComponent(domainIdentifier)}/glossaries',
    exceptionFnMap: _exceptionFns,
  );
  return CreateGlossaryOutput.fromJson(response);
}