db_parameters
Creates, updates, deletes, gets or lists a db_parameters resource.
Overview
| Name | db_parameters |
| Type | Resource |
| Id | aws.rds.db_parameters |
Fields
The following fields are returned by SELECT queries:
- describe_db_parameters
| Name | Datatype | Description |
|---|---|---|
allowed_values | string | Specifies the valid range of values for the parameter. |
apply_method | string | Indicates when to apply parameter updates. |
apply_type | string | Specifies the engine specific parameters type. |
data_type | string | Specifies the valid data type for the parameter. |
description | string | Provides a description of the parameter. |
is_modifiable | boolean | Indicates whether (true) or not (false) the parameter can be modified. Some parameters have security or operational implications that prevent them from being changed. |
minimum_engine_version | string | The earliest engine version to which the parameter can apply. |
parameter_name | string | The name of the parameter. |
parameter_value | string | The value of the parameter. |
source | string | The source of the parameter value. |
supported_engine_modes | string | The valid DB engine modes. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_db_parameters | select | DBParameterGroupName, region | Source, Filters, MaxRecords, Marker | Returns the detailed parameter list for a particular DB parameter group. |
copy_db_parameter_group | exec | SourceDBParameterGroupIdentifier, TargetDBParameterGroupIdentifier, TargetDBParameterGroupDescription, region | Tags | Copies the specified DB parameter group. You can't copy a default DB parameter group. Instead, create a new custom DB parameter group, which copies the default parameters and values for the specified DB parameter group family. |
reset_db_parameter_group | exec | DBParameterGroupName, region | ResetAllParameters, Parameters | Modifies the parameters of a DB parameter group to the engine/system default value. To reset specific parameters, provide a list of the following: ParameterName and ApplyMethod. To reset the entire DB parameter group, specify the DBParameterGroup name and ResetAllParameters parameters. When resetting the entire group, dynamic parameters are updated immediately and static parameters are set to pending-reboot to take effect on the next DB instance restart or RebootDBInstance request. |
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 |
|---|---|---|
DBParameterGroupName | string | The name of the DB parameter group. Constraints: Must match the name of an existing DBParameterGroup. |
SourceDBParameterGroupIdentifier | string | The identifier or ARN for the source DB parameter group. For information about creating an ARN, see Constructing an ARN for Amazon RDS in the Amazon RDS User Guide. Constraints: Must specify a valid DB parameter group. |
TargetDBParameterGroupDescription | string | A description for the copied DB parameter group. |
TargetDBParameterGroupIdentifier | string | The identifier for the copied DB parameter group. Constraints: Can't be null, empty, or blank Must contain from 1 to 255 letters, numbers, or hyphens First character must be a letter Can't end with a hyphen or contain two consecutive hyphens Example: my-db-parameter-group |
region | string | AWS region (default: us-east-1) |
Filters | array | A filter that specifies one or more DB parameters to describe. The only supported filter is parameter-name. The results list only includes information about the DB parameters with these names. |
Marker | string | An optional pagination token provided by a previous DescribeDBParameters 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 | To reset the entire DB parameter group, specify the DBParameterGroup name and ResetAllParameters parameters. To reset specific parameters, provide a list of the following: ParameterName and ApplyMethod. A maximum of 20 parameters can be modified in a single request. MySQL Valid Values (for Apply 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, and changes are applied when DB instance reboots. MariaDB Valid Values (for Apply 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, and changes are applied when DB instance reboots. Oracle Valid Values (for Apply method): pending-reboot |
ResetAllParameters | boolean | Specifies whether to reset all parameters in the DB parameter group to default values. By default, all parameters in the DB parameter group are reset to default values. |
Source | string | The parameter types to return. Default: All parameter types returned Valid Values: user | system | engine-default |
Tags | array |
SELECT examples
- describe_db_parameters
Returns the detailed parameter list for a particular DB parameter group.
SELECT
allowed_values,
apply_method,
apply_type,
data_type,
description,
is_modifiable,
minimum_engine_version,
parameter_name,
parameter_value,
source,
supported_engine_modes
FROM aws.rds.db_parameters
WHERE DBParameterGroupName = '{{ DBParameterGroupName }}' -- required
AND region = '{{ region }}' -- required
AND Source = '{{ Source }}'
AND Filters = '{{ Filters }}'
AND MaxRecords = '{{ MaxRecords }}'
AND Marker = '{{ Marker }}'
;
Lifecycle Methods
- copy_db_parameter_group
- reset_db_parameter_group
Copies the specified DB parameter group. You can't copy a default DB parameter group. Instead, create a new custom DB parameter group, which copies the default parameters and values for the specified DB parameter group family.
EXEC aws.rds.db_parameters.copy_db_parameter_group
@SourceDBParameterGroupIdentifier='{{ SourceDBParameterGroupIdentifier }}' --required,
@TargetDBParameterGroupIdentifier='{{ TargetDBParameterGroupIdentifier }}' --required,
@TargetDBParameterGroupDescription='{{ TargetDBParameterGroupDescription }}' --required,
@region='{{ region }}' --required,
@Tags='{{ Tags }}'
;
Modifies the parameters of a DB parameter group to the engine/system default value. To reset specific parameters, provide a list of the following: ParameterName and ApplyMethod. To reset the entire DB parameter group, specify the DBParameterGroup name and ResetAllParameters parameters. When resetting the entire group, dynamic parameters are updated immediately and static parameters are set to pending-reboot to take effect on the next DB instance restart or RebootDBInstance request.
EXEC aws.rds.db_parameters.reset_db_parameter_group
@DBParameterGroupName='{{ DBParameterGroupName }}' --required,
@region='{{ region }}' --required,
@ResetAllParameters={{ ResetAllParameters }},
@Parameters='{{ Parameters }}'
;