createClusterParameterGroup method
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.
May throw ClusterParameterGroupQuotaExceededFault. May throw ClusterParameterGroupAlreadyExistsFault. May throw TagLimitExceededFault. May throw InvalidTagFault.
Parameter description
:
A description of the parameter group.
Parameter parameterGroupFamily
:
The 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 AWS 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".
Parameter parameterGroupName
:
The name of the cluster parameter group.
Constraints:
- Must be 1 to 255 alphanumeric characters or hyphens
- First character must be a letter.
- Cannot end with a hyphen or contain two consecutive hyphens.
- Must be unique withing your AWS account.
Parameter tags
:
A list of tag instances.
Implementation
Future<CreateClusterParameterGroupResult> createClusterParameterGroup({
required String description,
required String parameterGroupFamily,
required String parameterGroupName,
List<Tag>? tags,
}) async {
ArgumentError.checkNotNull(description, 'description');
_s.validateStringLength(
'description',
description,
0,
2147483647,
isRequired: true,
);
ArgumentError.checkNotNull(parameterGroupFamily, 'parameterGroupFamily');
_s.validateStringLength(
'parameterGroupFamily',
parameterGroupFamily,
0,
2147483647,
isRequired: true,
);
ArgumentError.checkNotNull(parameterGroupName, 'parameterGroupName');
_s.validateStringLength(
'parameterGroupName',
parameterGroupName,
0,
2147483647,
isRequired: true,
);
final $request = <String, dynamic>{};
$request['Description'] = description;
$request['ParameterGroupFamily'] = parameterGroupFamily;
$request['ParameterGroupName'] = parameterGroupName;
tags?.also((arg) => $request['Tags'] = arg);
final $result = await _protocol.send(
$request,
action: 'CreateClusterParameterGroup',
version: '2012-12-01',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
shape: shapes['CreateClusterParameterGroupMessage'],
shapes: shapes,
resultWrapper: 'CreateClusterParameterGroupResult',
);
return CreateClusterParameterGroupResult.fromXml($result);
}