Skip to content

reset_cache_parameter_group

reset_cache_parameter_group(
    *,
    config_overrides: Optional[ElastiCacheClientConfig] = None,
    cache_parameter_group_name: Optional[String] = None,
    reset_all_parameters: Optional[Boolean] = None,
    parameter_name_values: Optional[ParameterNameValueList] = None,
) -> CacheParameterGroupNameMessage

Modifies the parameters of a cache parameter group to the engine or system default value. You can reset specific parameters by submitting a list of parameter names. To reset the entire cache parameter group, specify the ResetAllParameters and CacheParameterGroupName parameters.

Parameters:

  • cache_parameter_group_name (Optional[String], default: None ) –

    The name of the cache parameter group to reset.

  • reset_all_parameters (Optional[Boolean], default: None ) –

    If true, all parameters in the cache parameter group are reset to their default values. If false, only the parameters listed by ParameterNameValues are reset to their default values.

    Valid values: true | false

  • parameter_name_values (Optional[ParameterNameValueList], default: None ) –

    An array of parameter names to reset to their default values. If ResetAllParameters is true, do not use ParameterNameValues. If ResetAllParameters is false, you must specify the name of at least one parameter to reset.

Raises:

Examples:

ResetCacheParameterGroup Modifies the parameters of a cache parameter group to the engine or system default value.

>>> client.reset_cache_parameter_group(cache_parameter_group_name='custom-mem1-4', reset_all_parameters=True)
Source code in docs_src/capo_elasticache/_services/elasti_cache.py
def reset_cache_parameter_group(
    self,
    *,
    config_overrides: Optional[ElastiCacheClientConfig] = None,
    cache_parameter_group_name: Optional[
        "capo_elasticache.types.string.String"
    ] = None,
    reset_all_parameters: Optional["capo_elasticache.types.boolean.Boolean"] = None,
    parameter_name_values: Optional[
        "capo_elasticache.types.parameter_name_value_list.ParameterNameValueList"
    ] = None,
) -> "capo_elasticache.types.cache_parameter_group_name_message.CacheParameterGroupNameMessage":
    """<p>Modifies the parameters of a cache parameter group to the engine or system default value. You can reset specific parameters by submitting a list of parameter names. To reset the entire cache parameter group, specify the <code>ResetAllParameters</code> and <code>CacheParameterGroupName</code> parameters.</p>

    Args:
        cache_parameter_group_name: <p>The name of the cache parameter group to reset.</p>
        reset_all_parameters: <p>If <code>true</code>, all parameters in the cache parameter group are reset to their default values. If <code>false</code>, only the parameters listed by <code>ParameterNameValues</code> are reset to their default values.</p> <p>Valid values: <code>true</code> | <code>false</code> </p>
        parameter_name_values: <p>An array of parameter names to reset to their default values. If <code>ResetAllParameters</code> is <code>true</code>, do not use <code>ParameterNameValues</code>. If <code>ResetAllParameters</code> is <code>false</code>, you must specify the name of at least one parameter to reset.</p>

    Raises:
        capo_elasticache.errors.cache_parameter_group_not_found_fault.CacheParameterGroupNotFoundFault: <p>The requested cache parameter group name does not refer to an existing cache parameter group.</p>
        capo_elasticache.errors.invalid_cache_parameter_group_state_fault.InvalidCacheParameterGroupStateFault: <p>The current state of the cache parameter group does not allow the requested operation to occur.</p>
        capo_elasticache.errors.invalid_global_replication_group_state_fault.InvalidGlobalReplicationGroupStateFault: <p>The Global datastore is not available or in primary-only state.</p>
        capo_elasticache.errors.invalid_parameter_combination_exception.InvalidParameterCombinationException: <p>Two or more incompatible parameters were specified.</p>
        capo_elasticache.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>The value for a parameter is invalid.</p>
        capo_elasticache.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        ResetCacheParameterGroup
        Modifies the parameters of a cache parameter group to the engine or system default value.

        >>> client.reset_cache_parameter_group(cache_parameter_group_name='custom-mem1-4', reset_all_parameters=True)
    """

    def _handler(
        req: "OperationRequest[capo_elasticache.types.reset_cache_parameter_group_message.ResetCacheParameterGroupMessage]",
    ) -> OperationResponse[
        "capo_elasticache.types.cache_parameter_group_name_message.CacheParameterGroupNameMessage"
    ]:
        import capo_elasticache._operations.amazon_elasti_cache_v9.reset_cache_parameter_group

        output, http_response = (
            capo_elasticache._operations.amazon_elasti_cache_v9.reset_cache_parameter_group.reset_cache_parameter_group(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ResetCacheParameterGroup")
    )
    input_: capo_elasticache.types.reset_cache_parameter_group_message.ResetCacheParameterGroupMessage = {}
    if cache_parameter_group_name is not None:
        input_["cache_parameter_group_name"] = cache_parameter_group_name
    if reset_all_parameters is not None:
        input_["reset_all_parameters"] = reset_all_parameters
    if parameter_name_values is not None:
        input_["parameter_name_values"] = parameter_name_values

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output