postLineageEvent method

Future<PostLineageEventOutput> postLineageEvent({
  1. required String domainIdentifier,
  2. required Uint8List event,
  3. String? clientToken,
})

Posts a data lineage event.

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

Parameter domainIdentifier : The ID of the domain where you want to post a data lineage event.

Parameter event : The data lineage event that you want to post. Only open-lineage run event are supported as events.

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

Implementation

Future<PostLineageEventOutput> postLineageEvent({
  required String domainIdentifier,
  required Uint8List event,
  String? clientToken,
}) async {
  final headers = <String, String>{
    if (clientToken != null) 'Client-Token': clientToken.toString(),
  };
  final response = await _protocol.send(
    payload: event,
    method: 'POST',
    requestUri:
        '/v2/domains/${Uri.encodeComponent(domainIdentifier)}/lineage/events',
    headers: headers,
    exceptionFnMap: _exceptionFns,
  );
  return PostLineageEventOutput.fromJson(response);
}