db_parameter_groups
Creates, updates, deletes, gets or lists a db_parameter_groups resource.
Overview
| Name | db_parameter_groups |
| Type | Resource |
| Id | aws.rds.db_parameter_groups |
Fields
The following fields are returned by SELECT queries:
- describe_db_parameter_groups
| Name | Datatype | Description |
|---|---|---|
db_parameter_group_arn | string | The Amazon Resource Name (ARN) for the DB parameter group. |
db_parameter_group_family | string | The name of the DB parameter group family that this DB parameter group is compatible with. |
db_parameter_group_name | string | The name of the DB parameter group. |
description | string | Provides the customer-specified description for this DB parameter group. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_db_parameter_groups | select | region | DBParameterGroupName, Filters, MaxRecords, Marker | Returns 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_group | insert | DBParameterGroupName, DBParameterGroupFamily, region | Description, 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. This command doesn't apply to RDS Custom. |
modify_db_parameter_group | update | DBParameterGroupName, region | Parameters | 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. |
delete_db_parameter_group | delete | DBParameterGroupName, region | Deletes 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.
| Name | Datatype | Description |
|---|---|---|
DBParameterGroupFamily | string | 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 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 |
DBParameterGroupName | string | The 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 |
region | string | AWS region (default: us-east-1) |
DBParameterGroupName | string | The name of a specific DB parameter group to return details for. Constraints: If supplied, must match the name of an existing DBClusterParameterGroup. |
Description | string | The description for the DB parameter group. |
Filters | array | This parameter isn't currently supported. |
Marker | string | An 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. |
MaxRecords | integer | The 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. |
Parameters | array | An 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. |
Tags | array | Tags to assign to the DB parameter group. |
SELECT examples
- describe_db_parameter_groups
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
- create_db_parameter_group
- Manifest
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
;
# Description fields are for documentation purposes
- name: db_parameter_groups
props:
- name: DBParameterGroupName
value: "{{ DBParameterGroupName }}"
description: Required parameter for the db_parameter_groups resource.
- name: DBParameterGroupFamily
value: "{{ DBParameterGroupFamily }}"
description: Required parameter for the db_parameter_groups resource.
- name: region
value: "{{ region }}"
description: Required parameter for the db_parameter_groups resource.
- name: Description
value: "{{ Description }}"
description: The description for the DB parameter group.
description: The description for the DB parameter group.
- name: Tags
value: "{{ Tags }}"
description: Tags to assign to the DB parameter group.
description: Tags to assign to the DB parameter group.
UPDATE examples
- modify_db_parameter_group
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
- delete_db_parameter_group
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
;