resetCacheParameterGroup method

Future<CacheParameterGroupNameMessage> resetCacheParameterGroup({
  1. required String cacheParameterGroupName,
  2. List<ParameterNameValue>? parameterNameValues,
  3. bool? resetAllParameters,
})

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.

May throw InvalidCacheParameterGroupStateFault. May throw CacheParameterGroupNotFoundFault. May throw InvalidParameterValueException. May throw InvalidParameterCombinationException. May throw InvalidGlobalReplicationGroupStateFault.

Parameter cacheParameterGroupName : The name of the cache parameter group to reset.

Parameter parameterNameValues : 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.

Parameter resetAllParameters : 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

Implementation

Future<CacheParameterGroupNameMessage> resetCacheParameterGroup({
  required String cacheParameterGroupName,
  List<ParameterNameValue>? parameterNameValues,
  bool? resetAllParameters,
}) async {
  ArgumentError.checkNotNull(
      cacheParameterGroupName, 'cacheParameterGroupName');
  final $request = <String, dynamic>{};
  $request['CacheParameterGroupName'] = cacheParameterGroupName;
  parameterNameValues?.also((arg) => $request['ParameterNameValues'] = arg);
  resetAllParameters?.also((arg) => $request['ResetAllParameters'] = arg);
  final $result = await _protocol.send(
    $request,
    action: 'ResetCacheParameterGroup',
    version: '2015-02-02',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    shape: shapes['ResetCacheParameterGroupMessage'],
    shapes: shapes,
    resultWrapper: 'ResetCacheParameterGroupResult',
  );
  return CacheParameterGroupNameMessage.fromXml($result);
}