deleteTenantDatabase method
Deletes a tenant database from your DB instance. This command only applies to RDS for Oracle container database (CDB) instances.
You can't delete a tenant database when it is the only tenant in the DB instance.
May throw DBInstanceNotFoundFault.
May throw DBSnapshotAlreadyExistsFault.
May throw InvalidDBInstanceStateFault.
May throw TenantDatabaseNotFoundFault.
Parameter dBInstanceIdentifier :
The user-supplied identifier for the DB instance that contains the tenant
database that you want to delete.
Parameter tenantDBName :
The user-supplied name of the tenant database that you want to remove from
your DB instance. Amazon RDS deletes the tenant database with this name.
This parameter isn’t case-sensitive.
Parameter finalDBSnapshotIdentifier :
The DBSnapshotIdentifier of the new DBSnapshot
created when the SkipFinalSnapshot parameter is disabled.
Parameter skipFinalSnapshot :
Specifies whether to skip the creation of a final DB snapshot before
removing the tenant database from your DB instance. If you enable this
parameter, RDS doesn't create a DB snapshot. If you don't enable this
parameter, RDS creates a DB snapshot before it deletes the tenant
database. By default, RDS doesn't skip the final snapshot. If you don't
enable this parameter, you must specify the
FinalDBSnapshotIdentifier parameter.
Implementation
Future<DeleteTenantDatabaseResult> deleteTenantDatabase({
required String dBInstanceIdentifier,
required String tenantDBName,
String? finalDBSnapshotIdentifier,
bool? skipFinalSnapshot,
}) async {
final $request = <String, String>{
'DBInstanceIdentifier': dBInstanceIdentifier,
'TenantDBName': tenantDBName,
if (finalDBSnapshotIdentifier != null)
'FinalDBSnapshotIdentifier': finalDBSnapshotIdentifier,
if (skipFinalSnapshot != null)
'SkipFinalSnapshot': skipFinalSnapshot.toString(),
};
final $result = await _protocol.send(
$request,
action: 'DeleteTenantDatabase',
version: '2014-10-31',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
resultWrapper: 'DeleteTenantDatabaseResult',
);
return DeleteTenantDatabaseResult.fromXml($result);
}