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.
Parameters:
-
parameter_group_name
(Optional[String], default:
None
)
–
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 Amazon Web Services account.
This value is stored as a lower-case string.
-
parameter_group_family
(Optional[String], default:
None
)
–
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 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".
-
description
(Optional[String], default:
None
)
–
A description of the parameter group.
-
tags
(Optional[TagList], default:
None
)
–
Raises:
Source code in docs_src/capo_redshift/_services/async_redshift.py
| async def create_cluster_parameter_group(
self,
*,
config_overrides: Optional[AsyncRedshiftClientConfig] = None,
parameter_group_name: Optional["capo_redshift.types.string.String"] = None,
parameter_group_family: Optional["capo_redshift.types.string.String"] = None,
description: Optional["capo_redshift.types.string.String"] = None,
tags: Optional["capo_redshift.types.tag_list.TagList"] = None,
) -> "capo_redshift.types.create_cluster_parameter_group_result.CreateClusterParameterGroupResult":
"""<p>Creates an Amazon Redshift parameter group.</p> <p>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 <a>ModifyCluster</a>. </p> <p>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 <a href="https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-parameter-groups.html">Amazon Redshift Parameter Groups</a> in the <i>Amazon Redshift Cluster Management Guide</i>.</p>
Args:
parameter_group_name: <p>The name of the cluster parameter group.</p> <p>Constraints:</p> <ul> <li> <p>Must be 1 to 255 alphanumeric characters or hyphens</p> </li> <li> <p>First character must be a letter.</p> </li> <li> <p>Cannot end with a hyphen or contain two consecutive hyphens.</p> </li> <li> <p>Must be unique withing your Amazon Web Services account.</p> </li> </ul> <note> <p>This value is stored as a lower-case string.</p> </note>
parameter_group_family: <p>The Amazon Redshift engine version to which the cluster parameter group applies. The cluster engine version determines the set of parameters.</p> <p>To get a list of valid parameter group family names, you can call <a>DescribeClusterParameterGroups</a>. 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". </p>
description: <p>A description of the parameter group.</p>
tags: <p>A list of tag instances.</p>
Raises:
capo_redshift.errors.cluster_parameter_group_already_exists_fault.ClusterParameterGroupAlreadyExistsFault: <p>A cluster parameter group with the same name already exists.</p>
capo_redshift.errors.cluster_parameter_group_quota_exceeded_fault.ClusterParameterGroupQuotaExceededFault: <p>The request would result in the user exceeding the allowed number of cluster parameter groups. For information about increasing your quota, go to <a href="https://docs.aws.amazon.com/redshift/latest/mgmt/amazon-redshift-limits.html">Limits in Amazon Redshift</a> in the <i>Amazon Redshift Cluster Management Guide</i>. </p>
capo_redshift.errors.invalid_tag_fault.InvalidTagFault: <p>The tag is invalid.</p>
capo_redshift.errors.tag_limit_exceeded_fault.TagLimitExceededFault: <p>You have exceeded the number of tags allowed.</p>
capo_redshift.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_redshift.types.create_cluster_parameter_group_message.CreateClusterParameterGroupMessage]",
) -> AsyncOperationResponse[
"capo_redshift.types.create_cluster_parameter_group_result.CreateClusterParameterGroupResult"
]:
import capo_redshift._operations.redshift_service_version20121201.create_cluster_parameter_group
(
output,
http_response,
) = await capo_redshift._operations.redshift_service_version20121201.create_cluster_parameter_group.async_create_cluster_parameter_group(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("CreateClusterParameterGroup")
)
input_: capo_redshift.types.create_cluster_parameter_group_message.CreateClusterParameterGroupMessage = {}
if parameter_group_name is not None:
input_["parameter_group_name"] = parameter_group_name
if parameter_group_family is not None:
input_["parameter_group_family"] = parameter_group_family
if description is not None:
input_["description"] = description
if tags is not None:
input_["tags"] = tags
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|