updateGlossaryTerm method

Future<UpdateGlossaryTermOutput> updateGlossaryTerm({
  1. required String domainIdentifier,
  2. required String identifier,
  3. String? glossaryIdentifier,
  4. String? longDescription,
  5. String? name,
  6. String? shortDescription,
  7. GlossaryTermStatus? status,
  8. TermRelations? termRelations,
})

Updates a business glossary term in Amazon DataZone.

Prerequisites:

  • Glossary term must exist in the specified domain.
  • New name must not conflict with existing terms in the same glossary.
  • User must have permissions on the term.
  • The term must not be in DELETED status.

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

Parameter domainIdentifier : The identifier of the Amazon DataZone domain in which a business glossary term is to be updated.

Parameter identifier : The identifier of the business glossary term that is to be updated.

Parameter glossaryIdentifier : The identifier of the business glossary in which a term is to be updated.

Parameter longDescription : The long description to be updated as part of the UpdateGlossaryTerm action.

Parameter name : The name to be updated as part of the UpdateGlossaryTerm action.

Parameter shortDescription : The short description to be updated as part of the UpdateGlossaryTerm action.

Parameter status : The status to be updated as part of the UpdateGlossaryTerm action.

Parameter termRelations : The term relations to be updated as part of the UpdateGlossaryTerm action.

Implementation

Future<UpdateGlossaryTermOutput> updateGlossaryTerm({
  required String domainIdentifier,
  required String identifier,
  String? glossaryIdentifier,
  String? longDescription,
  String? name,
  String? shortDescription,
  GlossaryTermStatus? status,
  TermRelations? termRelations,
}) async {
  final $payload = <String, dynamic>{
    if (glossaryIdentifier != null) 'glossaryIdentifier': glossaryIdentifier,
    if (longDescription != null) 'longDescription': longDescription,
    if (name != null) 'name': name,
    if (shortDescription != null) 'shortDescription': shortDescription,
    if (status != null) 'status': status.value,
    if (termRelations != null) 'termRelations': termRelations,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PATCH',
    requestUri:
        '/v2/domains/${Uri.encodeComponent(domainIdentifier)}/glossary-terms/${Uri.encodeComponent(identifier)}',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateGlossaryTermOutput.fromJson(response);
}