describeEngineVersions method

Future<DescribeEngineVersionsResponse> describeEngineVersions({
  1. bool? defaultOnly,
  2. String? engine,
  3. String? engineVersion,
  4. int? maxResults,
  5. String? nextToken,
  6. String? parameterGroupFamily,
})

Returns a list of the available Redis OSS engine versions.

May throw InvalidParameterCombinationException. May throw InvalidParameterValueException. May throw ServiceLinkedRoleNotFoundFault.

Parameter defaultOnly : If true, specifies that only the default version of the specified engine or engine and major version combination is to be returned.

Parameter engine : The name of the engine for which to list available versions.

Parameter engineVersion : The Redis OSS engine version

Parameter maxResults : The maximum number of records to include in the response. If more records exist than the specified MaxResults value, a token is included in the response so that the remaining results can be retrieved.

Parameter nextToken : An optional argument to pass in case the total number of records exceeds the value of MaxResults. If nextToken is returned, there are more results available. The value of nextToken is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged.

Parameter parameterGroupFamily : The name of a specific parameter group family to return details for.

Implementation

Future<DescribeEngineVersionsResponse> describeEngineVersions({
  bool? defaultOnly,
  String? engine,
  String? engineVersion,
  int? maxResults,
  String? nextToken,
  String? parameterGroupFamily,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AmazonMemoryDB.DescribeEngineVersions'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (defaultOnly != null) 'DefaultOnly': defaultOnly,
      if (engine != null) 'Engine': engine,
      if (engineVersion != null) 'EngineVersion': engineVersion,
      if (maxResults != null) 'MaxResults': maxResults,
      if (nextToken != null) 'NextToken': nextToken,
      if (parameterGroupFamily != null)
        'ParameterGroupFamily': parameterGroupFamily,
    },
  );

  return DescribeEngineVersionsResponse.fromJson(jsonResponse.body);
}