createDomain method

Future<CreateDomainResponse> createDomain({
  1. required String domainName,
})

Creates a new search domain. For more information, see Creating a Search Domain in the Amazon CloudSearch Developer Guide.

May throw BaseException. May throw InternalException. May throw LimitExceededException. May throw ResourceAlreadyExistsException. May throw ValidationException.

Parameter domainName : A name for the domain you are creating. Allowed characters are a-z (lower-case letters), 0-9, and hyphen (-). Domain names must start with a letter or number and be at least 3 and no more than 28 characters long.

Implementation

Future<CreateDomainResponse> createDomain({
  required String domainName,
}) async {
  final $request = <String, String>{
    'DomainName': domainName,
  };
  final $result = await _protocol.send(
    $request,
    action: 'CreateDomain',
    version: '2013-01-01',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    resultWrapper: 'CreateDomainResult',
  );
  return CreateDomainResponse.fromXml($result);
}