modifyCacheParameterGroup method
Modifies the parameters of a cache parameter group. You can modify up to 20 parameters in a single request by submitting a list parameter name and value pairs.
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 modify.
Parameter parameterNameValues :
An array of parameter names and values for the parameter update. You must
supply at least one parameter name and value; subsequent arguments are
optional. A maximum of 20 parameters may be modified per request.
Implementation
Future<CacheParameterGroupNameMessage> modifyCacheParameterGroup({
required String cacheParameterGroupName,
required List<ParameterNameValue> parameterNameValues,
}) async {
final $request = <String, String>{
'CacheParameterGroupName': cacheParameterGroupName,
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,
};
final $result = await _protocol.send(
$request,
action: 'ModifyCacheParameterGroup',
version: '2015-02-02',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
resultWrapper: 'ModifyCacheParameterGroupResult',
);
return CacheParameterGroupNameMessage.fromXml($result);
}