listDbBackups method

Future<ListDbBackupsOutput> listDbBackups({
  1. String? dbResourceId,
  2. int? maxResults,
  3. String? nextToken,
})

Returns a list of Timestream for InfluxDB backups.

May throw AccessDeniedException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter dbResourceId : The identifier of the DB instance or DB cluster to list backups for. If not specified, returns all backups in the account and region.

Parameter maxResults : The maximum number of items to return in the output. If the total number of items available is more than the value specified, a nextToken is provided in the output. To resume pagination, provide the nextToken value as an argument of a subsequent API invocation.

Parameter nextToken : The pagination token. To resume pagination, provide the nextToken value as an argument of a subsequent API invocation.

Implementation

Future<ListDbBackupsOutput> listDbBackups({
  String? dbResourceId,
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    100,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target': 'AmazonTimestreamInfluxDB.ListDbBackups'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (dbResourceId != null) 'dbResourceId': dbResourceId,
      if (maxResults != null) 'maxResults': maxResults,
      if (nextToken != null) 'nextToken': nextToken,
    },
  );

  return ListDbBackupsOutput.fromJson(jsonResponse.body);
}