resetCacheParameterGroup method
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 CacheParameterGroupNotFoundFault.
May throw InvalidCacheParameterGroupStateFault.
May throw InvalidGlobalReplicationGroupStateFault.
May throw InvalidParameterCombinationException.
May throw InvalidParameterValueException.
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 {
final $request = <String, String>{
'CacheParameterGroupName': cacheParameterGroupName,
if (parameterNameValues != null)
if (parameterNameValues.isEmpty)
'ParameterNameValues': ''
else
for (var i1 = 0; i1 < parameterNameValues.length; i1++)
for (var e3 in parameterNameValues[i1].toQueryMap().entries)
'ParameterNameValues.ParameterNameValue.${i1 + 1}.${e3.key}':
e3.value,
if (resetAllParameters != null)
'ResetAllParameters': resetAllParameters.toString(),
};
final $result = await _protocol.send(
$request,
action: 'ResetCacheParameterGroup',
version: '2015-02-02',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
resultWrapper: 'ResetCacheParameterGroupResult',
);
return CacheParameterGroupNameMessage.fromXml($result);
}