createParameterGroup method

Future<CreateParameterGroupResponse> createParameterGroup({
  1. required String parameterGroupName,
  2. String? description,
})

Creates a new parameter group. A parameter group is a collection of parameters that you apply to all of the nodes in a DAX cluster.

May throw ParameterGroupQuotaExceededFault. May throw ParameterGroupAlreadyExistsFault. May throw InvalidParameterGroupStateFault. May throw ServiceLinkedRoleNotFoundFault. May throw InvalidParameterValueException. May throw InvalidParameterCombinationException.

Parameter parameterGroupName : The name of the parameter group to apply to all of the clusters in this replication group.

Parameter description : A description of the parameter group.

Implementation

Future<CreateParameterGroupResponse> createParameterGroup({
  required String parameterGroupName,
  String? description,
}) async {
  ArgumentError.checkNotNull(parameterGroupName, 'parameterGroupName');
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AmazonDAXV3.CreateParameterGroup'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'ParameterGroupName': parameterGroupName,
      if (description != null) 'Description': description,
    },
  );

  return CreateParameterGroupResponse.fromJson(jsonResponse.body);
}