Skip to main content

db_parameter_groups

Creates, updates, deletes, gets or lists a db_parameter_groups resource.

Overview

Namedb_parameter_groups
TypeResource
Idaws.rds.db_parameter_groups

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
db_parameter_group_arnstringThe Amazon Resource Name (ARN) for the DB parameter group.
db_parameter_group_familystringThe name of the DB parameter group family that this DB parameter group is compatible with.
db_parameter_group_namestringThe name of the DB parameter group.
descriptionstringProvides the customer-specified description for this DB parameter group.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_db_parameter_groupsselectregionDBParameterGroupName, Filters, MaxRecords, MarkerReturns a list of DBParameterGroup descriptions. If a DBParameterGroupName is specified, the list will contain only the description of the specified DB parameter group.
create_db_parameter_groupinsertDBParameterGroupName, DBParameterGroupFamily, regionDescription, TagsCreates 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.
modify_db_parameter_groupupdateDBParameterGroupName, regionParametersModifies the parameters of a DB parameter group. To modify more than one parameter, submit a list of the following: ParameterName, ParameterValue, and ApplyMethod. A maximum of 20 parameters can be modified in a single request. After you modify a DB parameter group, you should wait at least 5 minutes before creating your first DB instance that uses that DB parameter group as the default parameter group. This allows Amazon RDS to fully complete the modify operation before the parameter group is used as the default for a new DB instance. This is especially important for parameters that are critical when creating the default database for a DB instance, such as the character set for the default database defined by the character_set_database parameter. You can use the Parameter Groups option of the Amazon RDS console or the DescribeDBParameters command to verify that your DB parameter group has been created or modified.
delete_db_parameter_groupdeleteDBParameterGroupName, regionDeletes a specified DB parameter group. The DB parameter group to be deleted can't be associated with any DB instances.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
DBParameterGroupFamilystringThe 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 output contains duplicates. The following are the valid DB engine values: aurora-mysql aurora-postgresql db2-ae db2-ce db2-se mysql oracle-ee oracle-ee-cdb oracle-se2 oracle-se2-cdb postgres sqlserver-ee sqlserver-se sqlserver-ex sqlserver-web
DBParameterGroupNamestringThe name of the DB parameter group. Constraints: Must be the name of an existing DB parameter group You can't delete a default DB parameter group Can't be associated with any DB instances
regionstringAWS region (default: us-east-1)
DBParameterGroupNamestringThe name of a specific DB parameter group to return details for. Constraints: If supplied, must match the name of an existing DBClusterParameterGroup.
DescriptionstringThe description for the DB parameter group.
FiltersarrayThis parameter isn't currently supported.
MarkerstringAn optional pagination token provided by a previous DescribeDBParameterGroups request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by MaxRecords.
MaxRecordsintegerThe maximum number of records to include in the response. If more records exist than the specified MaxRecords value, a pagination token called a marker is included in the response so that you can retrieve the remaining results. Default: 100 Constraints: Minimum 20, maximum 100.
ParametersarrayAn array of parameter names, values, and the application methods for the parameter update. At least one parameter name, value, and application method must be supplied; later arguments are optional. A maximum of 20 parameters can be modified in a single request. Valid Values (for the application method): immediate | pending-reboot You can use the immediate value with dynamic parameters only. You can use the pending-reboot value for both dynamic and static parameters. When the application method is immediate, changes to dynamic parameters are applied immediately to the DB instances associated with the parameter group. When the application method is pending-reboot, changes to dynamic and static parameters are applied after a reboot without failover to the DB instances associated with the parameter group. You can't use pending-reboot with dynamic parameters on RDS for SQL Server DB instances. Use immediate. For more information on modifying DB parameters, see Working with DB parameter groups in the Amazon RDS User Guide.
TagsarrayTags to assign to the DB parameter group.

SELECT examples

Returns a list of DBParameterGroup descriptions. If a DBParameterGroupName is specified, the list will contain only the description of the specified DB parameter group.

SELECT
db_parameter_group_arn,
db_parameter_group_family,
db_parameter_group_name,
description
FROM aws.rds.db_parameter_groups
WHERE region = '{{ region }}' -- required
AND DBParameterGroupName = '{{ DBParameterGroupName }}'
AND Filters = '{{ Filters }}'
AND MaxRecords = '{{ MaxRecords }}'
AND Marker = '{{ Marker }}'
;

INSERT examples

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.

INSERT INTO aws.rds.db_parameter_groups (
DBParameterGroupName,
DBParameterGroupFamily,
region,
Description,
Tags
)
SELECT
'{{ DBParameterGroupName }}',
'{{ DBParameterGroupFamily }}',
'{{ region }}',
'{{ Description }}',
'{{ Tags }}'
RETURNING
db_parameter_group_arn,
db_parameter_group_family,
db_parameter_group_name,
description
;

UPDATE examples

Modifies the parameters of a DB parameter group. To modify more than one parameter, submit a list of the following: ParameterName, ParameterValue, and ApplyMethod. A maximum of 20 parameters can be modified in a single request. After you modify a DB parameter group, you should wait at least 5 minutes before creating your first DB instance that uses that DB parameter group as the default parameter group. This allows Amazon RDS to fully complete the modify operation before the parameter group is used as the default for a new DB instance. This is especially important for parameters that are critical when creating the default database for a DB instance, such as the character set for the default database defined by the character_set_database parameter. You can use the Parameter Groups option of the Amazon RDS console or the DescribeDBParameters command to verify that your DB parameter group has been created or modified.

UPDATE aws.rds.db_parameter_groups
SET
-- No updatable properties
WHERE
DBParameterGroupName = '{{ DBParameterGroupName }}' --required
AND region = '{{ region }}' --required
AND Parameters = '{{ Parameters}}'
RETURNING
db_parameter_group_name;

DELETE examples

Deletes a specified DB parameter group. The DB parameter group to be deleted can't be associated with any DB instances.

DELETE FROM aws.rds.db_parameter_groups
WHERE DBParameterGroupName = '{{ DBParameterGroupName }}' --required
AND region = '{{ region }}' --required
;