getRelationalDatabaseEvents method
Returns a list of events for a specific database in Amazon Lightsail.
May throw AccessDeniedException.
May throw AccountSetupInProgressException.
May throw InvalidInputException.
May throw NotFoundException.
May throw OperationFailureException.
May throw RegionSetupInProgressException.
May throw ServiceException.
May throw UnauthenticatedException.
Parameter relationalDatabaseName :
The name of the database from which to get events.
Parameter durationInMinutes :
The number of minutes in the past from which to retrieve events. For
example, to get all events from the past 2 hours, enter 120.
Default: 60
The minimum is 1 and the maximum is 14 days (20160 minutes).
Parameter pageToken :
The token to advance to the next page of results from your request.
To get a page token, perform an initial
GetRelationalDatabaseEvents request. If your results are
paginated, the response will return a next page token that you can specify
as the page token in a subsequent request.
Implementation
Future<GetRelationalDatabaseEventsResult> getRelationalDatabaseEvents({
required String relationalDatabaseName,
int? durationInMinutes,
String? pageToken,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'Lightsail_20161128.GetRelationalDatabaseEvents'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'relationalDatabaseName': relationalDatabaseName,
if (durationInMinutes != null) 'durationInMinutes': durationInMinutes,
if (pageToken != null) 'pageToken': pageToken,
},
);
return GetRelationalDatabaseEventsResult.fromJson(jsonResponse.body);
}