Skip to main content

cluster_parameter_groups

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

Overview

Namecluster_parameter_groups
TypeResource
Idaws.redshift.cluster_parameter_groups

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
descriptionstringThe description of the parameter group.
parameter_group_familystringThe name of the cluster parameter group family that this cluster parameter group is compatible with.
parameter_group_namestringThe name of the cluster parameter group.
tagsstringThe list of tags for the cluster parameter group.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_cluster_parameter_groupsselectregionParameterGroupName, MaxRecords, Marker, TagKeys, TagValuesReturns a list of Amazon Redshift parameter groups, including parameter groups you created and the default parameter group. For each parameter group, the response includes the parameter group name, description, and parameter group family name. You can optionally specify a name to retrieve the description of a specific parameter group. For more information about parameters and parameter groups, go to Amazon Redshift Parameter Groups in the Amazon Redshift Cluster Management Guide. If you specify both tag keys and tag values in the same request, Amazon Redshift returns all parameter groups that match any combination of the specified keys and values. For example, if you have owner and environment for tag keys, and admin and test for tag values, all parameter groups that have any combination of those values are returned. If both tag keys and values are omitted from the request, parameter groups are returned regardless of whether they have tag keys or values associated with them.
create_cluster_parameter_groupinsertParameterGroupName, ParameterGroupFamily, regionDescription, TagsCreates an Amazon Redshift parameter group. Creating parameter groups is independent of creating clusters. You can associate a cluster with a parameter group when you create the cluster. You can also associate an existing cluster with a parameter group after the cluster is created by using ModifyCluster. Parameters in the parameter group define specific behavior that applies to the databases you create on the cluster. For more information about parameters and parameter groups, go to Amazon Redshift Parameter Groups in the Amazon Redshift Cluster Management Guide.
modify_cluster_parameter_groupupdateParameterGroupName, regionParametersModifies the parameters of a parameter group. For the parameters parameter, it can't contain ASCII characters. For more information about parameters and parameter groups, go to Amazon Redshift Parameter Groups in the Amazon Redshift Cluster Management Guide.
delete_cluster_parameter_groupdeleteParameterGroupName, regionDeletes a specified Amazon Redshift parameter group. You cannot delete a parameter group if it is associated with a cluster.

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
ParameterGroupFamilystringThe Amazon Redshift engine version to which the cluster parameter group applies. The cluster engine version determines the set of parameters. To get a list of valid parameter group family names, you can call DescribeClusterParameterGroups. By default, Amazon Redshift returns a list of all the parameter groups that are owned by your Amazon Web Services account, including the default parameter groups for each Amazon Redshift engine version. The parameter group family names associated with the default parameter groups provide you the valid values. For example, a valid family name is "redshift-1.0".
ParameterGroupNamestringThe name of the parameter group to be deleted. Constraints: Must be the name of an existing cluster parameter group. Cannot delete a default cluster parameter group.
regionstringAWS region (default: us-east-1)
DescriptionstringA description of the parameter group.
MarkerstringAn optional parameter that specifies the starting point to return a set of response records. When the results of a DescribeClusterParameterGroups request exceed the value specified in MaxRecords, Amazon Web Services returns a value in the Marker field of the response. You can retrieve the next set of response records by providing the returned marker value in the Marker parameter and retrying the request.
MaxRecordsintegerThe maximum number of response records to return in each call. If the number of remaining response records exceeds the specified MaxRecords value, a value is returned in a marker field of the response. You can retrieve the next set of records by retrying the command with the returned marker value. Default: 100 Constraints: minimum 20, maximum 100.
ParameterGroupNamestringThe name of a specific parameter group for which to return details. By default, details about all parameter groups and the default parameter group are returned.
ParametersarrayAn array of parameters to be modified. A maximum of 20 parameters can be modified in a single request. For each parameter to be modified, you must supply at least the parameter name and parameter value; other name-value pairs of the parameter are optional. For the workload management (WLM) configuration, you must supply all the name-value pairs in the wlm_json_configuration parameter.
TagKeysarrayA tag key or keys for which you want to return all matching cluster parameter groups that are associated with the specified key or keys. For example, suppose that you have parameter groups that are tagged with keys called owner and environment. If you specify both of these tag keys in the request, Amazon Redshift returns a response with the parameter groups that have either or both of these tag keys associated with them.
TagValuesarrayA tag value or values for which you want to return all matching cluster parameter groups that are associated with the specified tag value or values. For example, suppose that you have parameter groups that are tagged with values called admin and test. If you specify both of these tag values in the request, Amazon Redshift returns a response with the parameter groups that have either or both of these tag values associated with them.
TagsarrayA list of tag instances.

SELECT examples

Returns a list of Amazon Redshift parameter groups, including parameter groups you created and the default parameter group. For each parameter group, the response includes the parameter group name, description, and parameter group family name. You can optionally specify a name to retrieve the description of a specific parameter group. For more information about parameters and parameter groups, go to Amazon Redshift Parameter Groups in the Amazon Redshift Cluster Management Guide. If you specify both tag keys and tag values in the same request, Amazon Redshift returns all parameter groups that match any combination of the specified keys and values. For example, if you have owner and environment for tag keys, and admin and test for tag values, all parameter groups that have any combination of those values are returned. If both tag keys and values are omitted from the request, parameter groups are returned regardless of whether they have tag keys or values associated with them.

SELECT
description,
parameter_group_family,
parameter_group_name,
tags
FROM aws.redshift.cluster_parameter_groups
WHERE region = '{{ region }}' -- required
AND ParameterGroupName = '{{ ParameterGroupName }}'
AND MaxRecords = '{{ MaxRecords }}'
AND Marker = '{{ Marker }}'
AND TagKeys = '{{ TagKeys }}'
AND TagValues = '{{ TagValues }}'
;

INSERT examples

Creates an Amazon Redshift parameter group. Creating parameter groups is independent of creating clusters. You can associate a cluster with a parameter group when you create the cluster. You can also associate an existing cluster with a parameter group after the cluster is created by using ModifyCluster. Parameters in the parameter group define specific behavior that applies to the databases you create on the cluster. For more information about parameters and parameter groups, go to Amazon Redshift Parameter Groups in the Amazon Redshift Cluster Management Guide.

INSERT INTO aws.redshift.cluster_parameter_groups (
ParameterGroupName,
ParameterGroupFamily,
region,
Description,
Tags
)
SELECT
'{{ ParameterGroupName }}',
'{{ ParameterGroupFamily }}',
'{{ region }}',
'{{ Description }}',
'{{ Tags }}'
RETURNING
description,
parameter_group_family,
parameter_group_name,
tags
;

UPDATE examples

Modifies the parameters of a parameter group. For the parameters parameter, it can't contain ASCII characters. For more information about parameters and parameter groups, go to Amazon Redshift Parameter Groups in the Amazon Redshift Cluster Management Guide.

UPDATE aws.redshift.cluster_parameter_groups
SET
-- No updatable properties
WHERE
ParameterGroupName = '{{ ParameterGroupName }}' --required
AND region = '{{ region }}' --required
AND Parameters = '{{ Parameters}}'
RETURNING
parameter_group_name,
parameter_group_status;

DELETE examples

Deletes a specified Amazon Redshift parameter group. You cannot delete a parameter group if it is associated with a cluster.

DELETE FROM aws.redshift.cluster_parameter_groups
WHERE ParameterGroupName = '{{ ParameterGroupName }}' --required
AND region = '{{ region }}' --required
;