modifyCacheParameterGroup method

Future<CacheParameterGroupNameMessage> modifyCacheParameterGroup({
  1. required String cacheParameterGroupName,
  2. required List<ParameterNameValue> parameterNameValues,
})

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 InvalidParameterValueException. May throw InvalidParameterCombinationException. May throw InvalidGlobalReplicationGroupStateFault.

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 {
  ArgumentError.checkNotNull(
      cacheParameterGroupName, 'cacheParameterGroupName');
  ArgumentError.checkNotNull(parameterNameValues, 'parameterNameValues');
  final $request = <String, dynamic>{};
  $request['CacheParameterGroupName'] = cacheParameterGroupName;
  $request['ParameterNameValues'] = parameterNameValues;
  final $result = await _protocol.send(
    $request,
    action: 'ModifyCacheParameterGroup',
    version: '2015-02-02',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    shape: shapes['ModifyCacheParameterGroupMessage'],
    shapes: shapes,
    resultWrapper: 'ModifyCacheParameterGroupResult',
  );
  return CacheParameterGroupNameMessage.fromXml($result);
}