updateRelationalDatabaseParameters method

Future<UpdateRelationalDatabaseParametersResult> updateRelationalDatabaseParameters({
  1. required List<RelationalDatabaseParameter> parameters,
  2. required String relationalDatabaseName,
})

Allows the update of one or more parameters of a database in Amazon Lightsail.

Parameter updates don't cause outages; therefore, their application is not subject to the preferred maintenance window. However, there are two ways in which parameter updates are applied: dynamic or pending-reboot. Parameters marked with a dynamic apply type are applied immediately. Parameters marked with a pending-reboot apply type are applied only after the database is rebooted using the reboot relational database operation.

The update relational database parameters operation supports tag-based access control via resource tags applied to the resource identified by relationalDatabaseName. For more information, see the Lightsail Dev Guide.

May throw ServiceException. May throw InvalidInputException. May throw NotFoundException. May throw OperationFailureException. May throw AccessDeniedException. May throw AccountSetupInProgressException. May throw UnauthenticatedException.

Parameter parameters : The database parameters to update.

Parameter relationalDatabaseName : The name of your database for which to update parameters.

Implementation

Future<UpdateRelationalDatabaseParametersResult>
    updateRelationalDatabaseParameters({
  required List<RelationalDatabaseParameter> parameters,
  required String relationalDatabaseName,
}) async {
  ArgumentError.checkNotNull(parameters, 'parameters');
  ArgumentError.checkNotNull(
      relationalDatabaseName, 'relationalDatabaseName');
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'Lightsail_20161128.UpdateRelationalDatabaseParameters'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'parameters': parameters,
      'relationalDatabaseName': relationalDatabaseName,
    },
  );

  return UpdateRelationalDatabaseParametersResult.fromJson(jsonResponse.body);
}