copyOptionGroup method
Copies the specified option group.
May throw OptionGroupAlreadyExistsFault. May throw OptionGroupNotFoundFault. May throw OptionGroupQuotaExceededFault.
Parameter sourceOptionGroupIdentifier
:
The identifier for the source option group.
Constraints:
- Must specify a valid option group.
Parameter targetOptionGroupDescription
:
The description for the copied option group.
Parameter targetOptionGroupIdentifier
:
The identifier for the copied option group.
Constraints:
- Can't be null, empty, or blank
- Must contain from 1 to 255 letters, numbers, or hyphens
- First character must be a letter
- Can't end with a hyphen or contain two consecutive hyphens
my-option-group
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-10-31',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
shape: shapes['CopyOptionGroupMessage'],
shapes: shapes,
resultWrapper: 'CopyOptionGroupResult',
);
return CopyOptionGroupResult.fromXml($result);
}