createOptionGroup method

Future<CreateOptionGroupResult> createOptionGroup({
  1. required String engineName,
  2. required String majorEngineVersion,
  3. required String optionGroupDescription,
  4. required String optionGroupName,
  5. List<Tag>? tags,
})

Implementation

Future<CreateOptionGroupResult> createOptionGroup({
  required String engineName,
  required String majorEngineVersion,
  required String optionGroupDescription,
  required String optionGroupName,
  List<Tag>? tags,
}) async {
  ArgumentError.checkNotNull(engineName, 'engineName');
  ArgumentError.checkNotNull(majorEngineVersion, 'majorEngineVersion');
  ArgumentError.checkNotNull(
      optionGroupDescription, 'optionGroupDescription');
  ArgumentError.checkNotNull(optionGroupName, 'optionGroupName');
  final $request = <String, dynamic>{};
  $request['EngineName'] = engineName;
  $request['MajorEngineVersion'] = majorEngineVersion;
  $request['OptionGroupDescription'] = optionGroupDescription;
  $request['OptionGroupName'] = optionGroupName;
  tags?.also((arg) => $request['Tags'] = arg);
  final $result = await _protocol.send(
    $request,
    action: 'CreateOptionGroup',
    version: '2013-09-09',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    shape: shapes['CreateOptionGroupMessage'],
    shapes: shapes,
    resultWrapper: 'CreateOptionGroupResult',
  );
  return CreateOptionGroupResult.fromXml($result);
}