describeEvents method
Returns events related to clusters, security groups, and parameter groups. You can obtain events specific to a particular cluster, security group, or parameter group by providing the name as a parameter. By default, only the events occurring within the last hour are returned; however, you can retrieve up to 14 days' worth of events if necessary.
May throw InvalidParameterCombinationException.
May throw InvalidParameterValueException.
May throw ServiceLinkedRoleNotFoundFault.
Parameter duration :
The number of minutes worth of events to retrieve.
Parameter endTime :
The end of the time interval for which to retrieve events, specified in
ISO 8601 format. Example: 2017-03-30T07:03:49.555Z
Parameter maxResults :
The maximum number of records to include in the response. If more records
exist than the specified MaxResults value, a token is included in the
response so that the remaining results can be retrieved.
Parameter nextToken :
An optional argument to pass in case the total number of records exceeds
the value of MaxResults. If nextToken is returned, there are more results
available. The value of nextToken is a unique pagination token for each
page. Make the call again using the returned token to retrieve the next
page. Keep all other arguments unchanged.
Parameter sourceName :
The identifier of the event source for which events are returned. If not
specified, all sources are included in the response.
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: 2017-03-30T07:03:49.555Z
Implementation
Future<DescribeEventsResponse> describeEvents({
int? duration,
DateTime? endTime,
int? maxResults,
String? nextToken,
String? sourceName,
SourceType? sourceType,
DateTime? startTime,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AmazonMemoryDB.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 (maxResults != null) 'MaxResults': maxResults,
if (nextToken != null) 'NextToken': nextToken,
if (sourceName != null) 'SourceName': sourceName,
if (sourceType != null) 'SourceType': sourceType.value,
if (startTime != null) 'StartTime': unixTimestampToJson(startTime),
},
);
return DescribeEventsResponse.fromJson(jsonResponse.body);
}