modifyOptionGroup method
May throw InvalidOptionGroupStateFault. May throw OptionGroupNotFoundFault.
Implementation
Future<ModifyOptionGroupResult> modifyOptionGroup({
required String optionGroupName,
bool? applyImmediately,
List<OptionConfiguration>? optionsToInclude,
List<String>? optionsToRemove,
}) async {
ArgumentError.checkNotNull(optionGroupName, 'optionGroupName');
final $request = <String, dynamic>{};
$request['OptionGroupName'] = optionGroupName;
applyImmediately?.also((arg) => $request['ApplyImmediately'] = arg);
optionsToInclude?.also((arg) => $request['OptionsToInclude'] = arg);
optionsToRemove?.also((arg) => $request['OptionsToRemove'] = arg);
final $result = await _protocol.send(
$request,
action: 'ModifyOptionGroup',
version: '2013-02-12',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
shape: shapes['ModifyOptionGroupMessage'],
shapes: shapes,
resultWrapper: 'ModifyOptionGroupResult',
);
return ModifyOptionGroupResult.fromXml($result);
}