rebootDBInstance method

Future<RebootDBInstanceResult> rebootDBInstance({
  1. required String dBInstanceIdentifier,
  2. bool? forceFailover,
})

You might need to reboot your DB instance, usually for maintenance reasons. For example, if you make certain modifications, or if you change the DB parameter group associated with the DB instance, you must reboot the instance for the changes to take effect.

Rebooting a DB instance restarts the database engine service. Rebooting a DB instance results in a momentary outage, during which the DB instance status is set to rebooting.

For more information about rebooting, see Rebooting a DB Instance in the Amazon RDS User Guide.

May throw InvalidDBInstanceStateFault. May throw DBInstanceNotFoundFault.

Parameter dBInstanceIdentifier : The DB instance identifier. This parameter is stored as a lowercase string.

Constraints:

  • Must match the identifier of an existing DBInstance.

Parameter forceFailover : A value that indicates whether the reboot is conducted through a Multi-AZ failover.

Constraint: You can't enable force failover if the instance isn't configured for Multi-AZ.

Implementation

Future<RebootDBInstanceResult> rebootDBInstance({
  required String dBInstanceIdentifier,
  bool? forceFailover,
}) async {
  ArgumentError.checkNotNull(dBInstanceIdentifier, 'dBInstanceIdentifier');
  final $request = <String, dynamic>{};
  $request['DBInstanceIdentifier'] = dBInstanceIdentifier;
  forceFailover?.also((arg) => $request['ForceFailover'] = arg);
  final $result = await _protocol.send(
    $request,
    action: 'RebootDBInstance',
    version: '2014-10-31',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    shape: shapes['RebootDBInstanceMessage'],
    shapes: shapes,
    resultWrapper: 'RebootDBInstanceResult',
  );
  return RebootDBInstanceResult.fromXml($result);
}