describeEvents method

Future<DescribeEventsResponse> describeEvents({
  1. int? duration,
  2. DateTime? endTime,
  3. List<String>? eventCategories,
  4. List<Filter>? filters,
  5. String? marker,
  6. int? maxRecords,
  7. String? sourceIdentifier,
  8. SourceType? sourceType,
  9. DateTime? startTime,
})

Lists events for a given source identifier and source type. You can also specify a start and end time. For more information on AWS DMS events, see Working with Events and Notifications in the AWS Database Migration User Guide.

Parameter duration : The duration of the events to be listed.

Parameter endTime : The end time for the events to be listed.

Parameter eventCategories : A list of event categories for the source type that you've chosen.

Parameter filters : Filters applied to events.

Parameter marker : An optional pagination token provided by a previous request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by MaxRecords.

Parameter maxRecords : The maximum number of records to include in the response. If more records exist than the specified MaxRecords value, a pagination token called a marker is included in the response so that the remaining results can be retrieved.

Default: 100

Constraints: Minimum 20, maximum 100.

Parameter sourceIdentifier : The identifier of an event source.

Parameter sourceType : The type of AWS DMS resource that generates events.

Valid values: replication-instance | replication-task

Parameter startTime : The start time for the events to be listed.

Implementation

Future<DescribeEventsResponse> describeEvents({
  int? duration,
  DateTime? endTime,
  List<String>? eventCategories,
  List<Filter>? filters,
  String? marker,
  int? maxRecords,
  String? sourceIdentifier,
  SourceType? sourceType,
  DateTime? startTime,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AmazonDMSv20160101.DescribeEvents'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (duration != null) 'Duration': duration,
      if (endTime != null) 'EndTime': unixTimestampToJson(endTime),
      if (eventCategories != null) 'EventCategories': eventCategories,
      if (filters != null) 'Filters': filters,
      if (marker != null) 'Marker': marker,
      if (maxRecords != null) 'MaxRecords': maxRecords,
      if (sourceIdentifier != null) 'SourceIdentifier': sourceIdentifier,
      if (sourceType != null) 'SourceType': sourceType.toValue(),
      if (startTime != null) 'StartTime': unixTimestampToJson(startTime),
    },
  );

  return DescribeEventsResponse.fromJson(jsonResponse.body);
}