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,
})

Creates a new option group. You can create up to 20 option groups.

This command doesn't apply to RDS Custom.

May throw OptionGroupAlreadyExistsFault. May throw OptionGroupQuotaExceededFault.

Parameter engineName : The name of the engine to associate this option group with.

Valid Values:

  • db2-ae
  • db2-se
  • mariadb
  • mysql
  • oracle-ee
  • oracle-ee-cdb
  • oracle-se2
  • oracle-se2-cdb
  • postgres
  • sqlserver-ee
  • sqlserver-se
  • sqlserver-ex
  • sqlserver-web

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
Example: 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 {
  final $request = <String, String>{
    'EngineName': engineName,
    'MajorEngineVersion': majorEngineVersion,
    'OptionGroupDescription': optionGroupDescription,
    'OptionGroupName': optionGroupName,
    if (tags != null)
      if (tags.isEmpty)
        'Tags': ''
      else
        for (var i1 = 0; i1 < tags.length; i1++)
          for (var e3 in tags[i1].toQueryMap().entries)
            'Tags.Tag.${i1 + 1}.${e3.key}': e3.value,
  };
  final $result = await _protocol.send(
    $request,
    action: 'CreateOptionGroup',
    version: '2014-10-31',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    resultWrapper: 'CreateOptionGroupResult',
  );
  return CreateOptionGroupResult.fromXml($result);
}