describeEvents method

Future<EventsMessage> 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,
})

Returns events related to instances, security groups, snapshots, and DB parameter groups for the past 14 days. You can obtain events specific to a particular DB instance, security group, snapshot, or parameter group by providing the name as a parameter. By default, the events of the past hour are returned.

Parameter duration : The number of minutes to retrieve events for.

Default: 60

Parameter endTime : The end of the time interval for which to retrieve events, specified in ISO 8601 format.

Example: 2009-07-08T18:00Z

Parameter eventCategories : A list of event categories that trigger notifications for an event notification subscription.

Parameter filters : This parameter is not currently supported.

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 (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 the event source for which events are returned. If not specified, then all sources are included in the response.

Constraints:

  • If SourceIdentifier is provided, SourceType must also be provided.
  • If the source type is DBInstance, a DBInstanceIdentifier must be provided.
  • If the source type is DBSecurityGroup, a DBSecurityGroupName must be provided.
  • If the source type is DBParameterGroup, a DBParameterGroupName must be provided.
  • If the source type is DBSnapshot, a DBSnapshotIdentifier must be provided.
  • Cannot end with a hyphen or contain two consecutive hyphens.

Parameter sourceType : The event source to retrieve events for. If no value is specified, all events are returned.

Parameter startTime : The beginning of the time interval to retrieve events for, specified in ISO 8601 format.

Example: 2009-07-08T18:00Z

Implementation

Future<EventsMessage> describeEvents({
  int? duration,
  DateTime? endTime,
  List<String>? eventCategories,
  List<Filter>? filters,
  String? marker,
  int? maxRecords,
  String? sourceIdentifier,
  SourceType? sourceType,
  DateTime? startTime,
}) async {
  final $request = <String, dynamic>{};
  duration?.also((arg) => $request['Duration'] = arg);
  endTime?.also((arg) => $request['EndTime'] = _s.iso8601ToJson(arg));
  eventCategories?.also((arg) => $request['EventCategories'] = arg);
  filters?.also((arg) => $request['Filters'] = arg);
  marker?.also((arg) => $request['Marker'] = arg);
  maxRecords?.also((arg) => $request['MaxRecords'] = arg);
  sourceIdentifier?.also((arg) => $request['SourceIdentifier'] = arg);
  sourceType?.also((arg) => $request['SourceType'] = arg.toValue());
  startTime?.also((arg) => $request['StartTime'] = _s.iso8601ToJson(arg));
  final $result = await _protocol.send(
    $request,
    action: 'DescribeEvents',
    version: '2014-10-31',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    shape: shapes['DescribeEventsMessage'],
    shapes: shapes,
    resultWrapper: 'DescribeEventsResult',
  );
  return EventsMessage.fromXml($result);
}