deleteDbInstance method

Future<DeleteDbInstanceOutput> deleteDbInstance({
  1. required String identifier,
  2. bool? retainAutomatedBackups,
})

Deletes a Timestream for InfluxDB DB instance.

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

Parameter identifier : The id of the DB instance.

Parameter retainAutomatedBackups : Specifies whether to retain automated backups after the DB instance is deleted. If set to true, automated backups are not deleted and can be restored later.

Implementation

Future<DeleteDbInstanceOutput> deleteDbInstance({
  required String identifier,
  bool? retainAutomatedBackups,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target': 'AmazonTimestreamInfluxDB.DeleteDbInstance'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'identifier': identifier,
      if (retainAutomatedBackups != null)
        'retainAutomatedBackups': retainAutomatedBackups,
    },
  );

  return DeleteDbInstanceOutput.fromJson(jsonResponse.body);
}