putPartnerEvents method

Future<PutPartnerEventsResponse> putPartnerEvents({
  1. required List<PutPartnerEventsRequestEntry> entries,
})

This is used by SaaS partners to write events to a customer's partner event bus. AWS customers do not use this operation.

May throw InternalException. May throw OperationDisabledException.

Parameter entries : The list of events to write to the event bus.

Implementation

Future<PutPartnerEventsResponse> putPartnerEvents({
  required List<PutPartnerEventsRequestEntry> entries,
}) async {
  ArgumentError.checkNotNull(entries, 'entries');
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AWSEvents.PutPartnerEvents'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'Entries': entries,
    },
  );

  return PutPartnerEventsResponse.fromJson(jsonResponse.body);
}