createDBParameterGroup method

Future<CreateDBParameterGroupResult> createDBParameterGroup({
  1. required String dBParameterGroupFamily,
  2. required String dBParameterGroupName,
  3. required String description,
  4. List<Tag>? tags,
})

Creates a new DB parameter group.

A DB parameter group is initially created with the default parameters for the database engine used by the DB instance. To provide custom values for any of the parameters, you must modify the group after creating it using ModifyDBParameterGroup. Once you've created a DB parameter group, you need to associate it with your DB instance using ModifyDBInstance. When you associate a new DB parameter group with a running DB instance, you need to reboot the DB instance without failover for the new DB parameter group and associated settings to take effect.

May throw DBParameterGroupQuotaExceededFault. May throw DBParameterGroupAlreadyExistsFault.

Parameter dBParameterGroupFamily : The DB parameter group family name. A DB parameter group can be associated with one and only one DB parameter group family, and can be applied only to a DB instance running a database engine and engine version compatible with that DB parameter group family.

Parameter dBParameterGroupName : The name of the DB parameter group.

Constraints:

  • Must be 1 to 255 letters, numbers, or hyphens.
  • First character must be a letter
  • Cannot end with a hyphen or contain two consecutive hyphens

Parameter description : The description for the DB parameter group.

Parameter tags : The tags to be assigned to the new DB parameter group.

Implementation

Future<CreateDBParameterGroupResult> createDBParameterGroup({
  required String dBParameterGroupFamily,
  required String dBParameterGroupName,
  required String description,
  List<Tag>? tags,
}) async {
  ArgumentError.checkNotNull(
      dBParameterGroupFamily, 'dBParameterGroupFamily');
  ArgumentError.checkNotNull(dBParameterGroupName, 'dBParameterGroupName');
  ArgumentError.checkNotNull(description, 'description');
  final $request = <String, dynamic>{};
  $request['DBParameterGroupFamily'] = dBParameterGroupFamily;
  $request['DBParameterGroupName'] = dBParameterGroupName;
  $request['Description'] = description;
  tags?.also((arg) => $request['Tags'] = arg);
  final $result = await _protocol.send(
    $request,
    action: 'CreateDBParameterGroup',
    version: '2014-10-31',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    shape: shapes['CreateDBParameterGroupMessage'],
    shapes: shapes,
    resultWrapper: 'CreateDBParameterGroupResult',
  );
  return CreateDBParameterGroupResult.fromXml($result);
}