Creates a new MemoryDB parameter group. A parameter group is a collection of parameters and their values that are applied to all of the nodes in any cluster. For more information, see Configuring engine parameters using parameter groups.
Parameters:
-
parameter_group_name
(String)
–
The name of the parameter group.
-
family
(String)
–
The name of the parameter group family that the parameter group can be used with.
-
description
(Optional[String], default:
None
)
–
An optional description of the parameter group.
-
tags
(Optional[TagList], default:
None
)
–
A list of tags to be added to this resource. A tag is a key-value pair. A tag key must be accompanied by a tag value, although null is accepted.
Raises:
Source code in docs_src/capo_memorydb/_services/memory_db.py
| def create_parameter_group(
self,
parameter_group_name: "capo_memorydb.types.string.String",
family: "capo_memorydb.types.string.String",
*,
config_overrides: Optional[MemoryDBClientConfig] = None,
description: Optional["capo_memorydb.types.string.String"] = None,
tags: Optional["capo_memorydb.types.tag_list.TagList"] = None,
) -> "capo_memorydb.types.create_parameter_group_response.CreateParameterGroupResponse":
"""<p>Creates a new MemoryDB parameter group. A parameter group is a collection of parameters and their values that are applied to all of the nodes in any cluster. For more information, see <a href="https://docs.aws.amazon.com/MemoryDB/latest/devguide/parametergroups.html">Configuring engine parameters using parameter groups</a>. </p>
Args:
parameter_group_name: <p>The name of the parameter group.</p>
family: <p>The name of the parameter group family that the parameter group can be used with.</p>
description: <p>An optional description of the parameter group.</p>
tags: <p>A list of tags to be added to this resource. A tag is a key-value pair. A tag key must be accompanied by a tag value, although null is accepted.</p>
Raises:
capo_memorydb.errors.invalid_parameter_combination_exception.InvalidParameterCombinationException: <p>The specified parameter combination is not valid.</p>
capo_memorydb.errors.invalid_parameter_group_state_fault.InvalidParameterGroupStateFault: <p>The parameter group is not in a valid state for the requested operation.</p>
capo_memorydb.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>The specified parameter value is not valid.</p>
capo_memorydb.errors.parameter_group_already_exists_fault.ParameterGroupAlreadyExistsFault: <p>A parameter group with the specified name already exists.</p>
capo_memorydb.errors.parameter_group_quota_exceeded_fault.ParameterGroupQuotaExceededFault: <p>The request cannot be processed because it would exceed the maximum number of parameter groups allowed.</p>
capo_memorydb.errors.service_linked_role_not_found_fault.ServiceLinkedRoleNotFoundFault: <p>The required service-linked role was not found.</p>
capo_memorydb.errors.tag_quota_per_resource_exceeded.TagQuotaPerResourceExceeded: <p>The request cannot be processed because it would exceed the maximum number of tags allowed per resource.</p>
capo_memorydb.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_memorydb.types.create_parameter_group_request.CreateParameterGroupRequest]",
) -> OperationResponse[
"capo_memorydb.types.create_parameter_group_response.CreateParameterGroupResponse"
]:
import capo_memorydb._operations.amazon_memory_db.create_parameter_group
output, http_response = (
capo_memorydb._operations.amazon_memory_db.create_parameter_group.create_parameter_group(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("CreateParameterGroup")
)
input_: capo_memorydb.types.create_parameter_group_request.CreateParameterGroupRequest = {
"parameter_group_name": parameter_group_name,
"family": family,
}
if description is not None:
input_["description"] = description
if tags is not None:
input_["tags"] = tags
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|