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.
Parameters:
-
parameter_group_name
(Optional[String], default:
None
)
–
The name of the parameter group to be modified.
-
parameters
(Optional[ParametersList], default:
None
)
–
An 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.
Raises:
Source code in docs_src/capo_redshift/_services/async_redshift.py
| async def modify_cluster_parameter_group(
self,
*,
config_overrides: Optional[AsyncRedshiftClientConfig] = None,
parameter_group_name: Optional["capo_redshift.types.string.String"] = None,
parameters: Optional[
"capo_redshift.types.parameters_list.ParametersList"
] = None,
) -> "capo_redshift.types.cluster_parameter_group_name_message.ClusterParameterGroupNameMessage":
"""<p>Modifies the parameters of a parameter group. For the parameters parameter, it can't contain ASCII characters.</p> <p> 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 parameter group to be modified.</p>
parameters: <p>An array of parameters to be modified. A maximum of 20 parameters can be modified in a single request.</p> <p>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.</p> <p>For the workload management (WLM) configuration, you must supply all the name-value pairs in the wlm_json_configuration parameter.</p>
Raises:
capo_redshift.errors.cluster_parameter_group_not_found_fault.ClusterParameterGroupNotFoundFault: <p>The parameter group name does not refer to an existing parameter group.</p>
capo_redshift.errors.invalid_cluster_parameter_group_state_fault.InvalidClusterParameterGroupStateFault: <p>The cluster parameter group action can not be completed because another task is in progress that involves the parameter group. Wait a few moments and try the operation again.</p>
capo_redshift.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_redshift.types.modify_cluster_parameter_group_message.ModifyClusterParameterGroupMessage]",
) -> AsyncOperationResponse[
"capo_redshift.types.cluster_parameter_group_name_message.ClusterParameterGroupNameMessage"
]:
import capo_redshift._operations.redshift_service_version20121201.modify_cluster_parameter_group
(
output,
http_response,
) = await capo_redshift._operations.redshift_service_version20121201.modify_cluster_parameter_group.async_modify_cluster_parameter_group(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ModifyClusterParameterGroup")
)
input_: capo_redshift.types.modify_cluster_parameter_group_message.ModifyClusterParameterGroupMessage = {}
if parameter_group_name is not None:
input_["parameter_group_name"] = parameter_group_name
if parameters is not None:
input_["parameters"] = parameters
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|