createDomain method
Creates a new search domain.
May throw BaseException. May throw InternalException. May throw LimitExceededException.
Implementation
Future<CreateDomainResponse> createDomain({
required String domainName,
}) async {
ArgumentError.checkNotNull(domainName, 'domainName');
_s.validateStringLength(
'domainName',
domainName,
3,
28,
isRequired: true,
);
final $request = <String, dynamic>{};
$request['DomainName'] = domainName;
final $result = await _protocol.send(
$request,
action: 'CreateDomain',
version: '2011-02-01',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
shape: shapes['CreateDomainRequest'],
shapes: shapes,
resultWrapper: 'CreateDomainResult',
);
return CreateDomainResponse.fromXml($result);
}