promoteReadReplica method

Future<PromoteReadReplicaResult> promoteReadReplica({
  1. required String dBInstanceIdentifier,
  2. int? backupRetentionPeriod,
  3. String? preferredBackupWindow,
})

Implementation

Future<PromoteReadReplicaResult> promoteReadReplica({
  required String dBInstanceIdentifier,
  int? backupRetentionPeriod,
  String? preferredBackupWindow,
}) async {
  ArgumentError.checkNotNull(dBInstanceIdentifier, 'dBInstanceIdentifier');
  final $request = <String, dynamic>{};
  $request['DBInstanceIdentifier'] = dBInstanceIdentifier;
  backupRetentionPeriod
      ?.also((arg) => $request['BackupRetentionPeriod'] = arg);
  preferredBackupWindow
      ?.also((arg) => $request['PreferredBackupWindow'] = arg);
  final $result = await _protocol.send(
    $request,
    action: 'PromoteReadReplica',
    version: '2013-02-12',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    shape: shapes['PromoteReadReplicaMessage'],
    shapes: shapes,
    resultWrapper: 'PromoteReadReplicaResult',
  );
  return PromoteReadReplicaResult.fromXml($result);
}