createOptionGroup method
Creates a new option group. You can create up to 20 option groups.
May throw OptionGroupAlreadyExistsFault. May throw OptionGroupQuotaExceededFault.
Parameter engineName
:
Specifies the name of the engine that this option group should be
associated with.
Parameter majorEngineVersion
:
Specifies the major version of the engine that this option group should be
associated with.
Parameter optionGroupDescription
:
The description of the option group.
Parameter optionGroupName
:
Specifies the name of the option group to be created.
Constraints:
- Must be 1 to 255 letters, numbers, or hyphens
- First character must be a letter
- Can't end with a hyphen or contain two consecutive hyphens
myoptiongroup
Parameter tags
:
Tags to assign to the option group.
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: '2014-10-31',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
shape: shapes['CreateOptionGroupMessage'],
shapes: shapes,
resultWrapper: 'CreateOptionGroupResult',
);
return CreateOptionGroupResult.fromXml($result);
}