copyOptionGroup method
May throw OptionGroupAlreadyExistsFault. May throw OptionGroupNotFoundFault. May throw OptionGroupQuotaExceededFault.
Implementation
Future<CopyOptionGroupResult> copyOptionGroup({
required String sourceOptionGroupIdentifier,
required String targetOptionGroupDescription,
required String targetOptionGroupIdentifier,
List<Tag>? tags,
}) async {
ArgumentError.checkNotNull(
sourceOptionGroupIdentifier, 'sourceOptionGroupIdentifier');
ArgumentError.checkNotNull(
targetOptionGroupDescription, 'targetOptionGroupDescription');
ArgumentError.checkNotNull(
targetOptionGroupIdentifier, 'targetOptionGroupIdentifier');
final $request = <String, dynamic>{};
$request['SourceOptionGroupIdentifier'] = sourceOptionGroupIdentifier;
$request['TargetOptionGroupDescription'] = targetOptionGroupDescription;
$request['TargetOptionGroupIdentifier'] = targetOptionGroupIdentifier;
tags?.also((arg) => $request['Tags'] = arg);
final $result = await _protocol.send(
$request,
action: 'CopyOptionGroup',
version: '2014-09-01',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
shape: shapes['CopyOptionGroupMessage'],
shapes: shapes,
resultWrapper: 'CopyOptionGroupResult',
);
return CopyOptionGroupResult.fromXml($result);
}