describeEvents method
Returns events related to DB instances, DB clusters, DB parameter groups, DB security groups, DB snapshots, DB cluster snapshots, and RDS Proxies for the past 14 days. Events specific to a particular DB instance, DB cluster, DB parameter group, DB security group, DB snapshot, DB cluster snapshot group, or RDS Proxy can be obtained by providing the name as a parameter.
For more information on working with events, see Monitoring Amazon RDS events in the Amazon RDS User Guide and Monitoring Amazon Aurora events in the Amazon Aurora User Guide.
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. For more information about ISO 8601, go to the ISO8601 Wikipedia page.
Example: 2009-07-08T18:00Z
Parameter eventCategories :
A list of event categories that trigger notifications for a event
notification subscription.
Parameter filters :
This parameter isn't currently supported.
Parameter marker :
An optional pagination token provided by a previous DescribeEvents
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 you can retrieve the
remaining results.
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
SourceIdentifieris supplied,SourceTypemust also be provided. -
If the source type is a DB instance, a
DBInstanceIdentifiervalue must be supplied. -
If the source type is a DB cluster, a
DBClusterIdentifiervalue must be supplied. -
If the source type is a DB parameter group, a
DBParameterGroupNamevalue must be supplied. -
If the source type is a DB security group, a
DBSecurityGroupNamevalue must be supplied. -
If the source type is a DB snapshot, a
DBSnapshotIdentifiervalue must be supplied. -
If the source type is a DB cluster snapshot, a
DBClusterSnapshotIdentifiervalue must be supplied. -
If the source type is an RDS Proxy, a
DBProxyNamevalue must be supplied. - Can't 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. For more information about ISO 8601, go to the ISO8601 Wikipedia page.
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, String>{
if (duration != null) 'Duration': duration.toString(),
if (endTime != null) 'EndTime': _s.iso8601ToJson(endTime),
if (eventCategories != null)
if (eventCategories.isEmpty)
'EventCategories': ''
else
for (var i1 = 0; i1 < eventCategories.length; i1++)
'EventCategories.EventCategory.${i1 + 1}': eventCategories[i1],
if (filters != null)
if (filters.isEmpty)
'Filters': ''
else
for (var i1 = 0; i1 < filters.length; i1++)
for (var e3 in filters[i1].toQueryMap().entries)
'Filters.Filter.${i1 + 1}.${e3.key}': e3.value,
if (marker != null) 'Marker': marker,
if (maxRecords != null) 'MaxRecords': maxRecords.toString(),
if (sourceIdentifier != null) 'SourceIdentifier': sourceIdentifier,
if (sourceType != null) 'SourceType': sourceType.value,
if (startTime != null) 'StartTime': _s.iso8601ToJson(startTime),
};
final $result = await _protocol.send(
$request,
action: 'DescribeEvents',
version: '2014-10-31',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
resultWrapper: 'DescribeEventsResult',
);
return EventsMessage.fromXml($result);
}