deleteDBInstance method

Future<DeleteDBInstanceResult> deleteDBInstance({
  1. required String dBInstanceIdentifier,
  2. String? finalDBSnapshotIdentifier,
  3. bool? skipFinalSnapshot,
})

Implementation

Future<DeleteDBInstanceResult> deleteDBInstance({
  required String dBInstanceIdentifier,
  String? finalDBSnapshotIdentifier,
  bool? skipFinalSnapshot,
}) async {
  ArgumentError.checkNotNull(dBInstanceIdentifier, 'dBInstanceIdentifier');
  final $request = <String, dynamic>{};
  $request['DBInstanceIdentifier'] = dBInstanceIdentifier;
  finalDBSnapshotIdentifier
      ?.also((arg) => $request['FinalDBSnapshotIdentifier'] = arg);
  skipFinalSnapshot?.also((arg) => $request['SkipFinalSnapshot'] = arg);
  final $result = await _protocol.send(
    $request,
    action: 'DeleteDBInstance',
    version: '2013-02-12',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    shape: shapes['DeleteDBInstanceMessage'],
    shapes: shapes,
    resultWrapper: 'DeleteDBInstanceResult',
  );
  return DeleteDBInstanceResult.fromXml($result);
}