createDBParameterGroup method
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.
This command doesn't apply to RDS Custom.
May throw DBParameterGroupAlreadyExistsFault.
May throw DBParameterGroupQuotaExceededFault.
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.
To list all of the available parameter group families for a DB engine, use the following command:
aws rds describe-db-engine-versions --query
"DBEngineVersions[].DBParameterGroupFamily" --engine
<engine>
For example, to list all of the available parameter group families for the MySQL DB engine, use the following command:
aws rds describe-db-engine-versions --query
"DBEngineVersions[].DBParameterGroupFamily" --engine mysql
The following are the valid DB engine values:
-
aurora-mysql -
aurora-postgresql -
db2-ae -
db2-se -
mysql -
oracle-ee -
oracle-ee-cdb -
oracle-se2 -
oracle-se2-cdb -
postgres -
sqlserver-ee -
sqlserver-se -
sqlserver-ex -
sqlserver-web
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
- Can't end with a hyphen or contain two consecutive hyphens
Parameter description :
The description for the DB parameter group.
Parameter tags :
Tags to assign to the DB parameter group.
Implementation
Future<CreateDBParameterGroupResult> createDBParameterGroup({
required String dBParameterGroupFamily,
required String dBParameterGroupName,
required String description,
List<Tag>? tags,
}) async {
final $request = <String, String>{
'DBParameterGroupFamily': dBParameterGroupFamily,
'DBParameterGroupName': dBParameterGroupName,
'Description': description,
if (tags != null)
if (tags.isEmpty)
'Tags': ''
else
for (var i1 = 0; i1 < tags.length; i1++)
for (var e3 in tags[i1].toQueryMap().entries)
'Tags.Tag.${i1 + 1}.${e3.key}': e3.value,
};
final $result = await _protocol.send(
$request,
action: 'CreateDBParameterGroup',
version: '2014-10-31',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
resultWrapper: 'CreateDBParameterGroupResult',
);
return CreateDBParameterGroupResult.fromXml($result);
}