deleteDomain method

Future<DeleteDomainResponse> deleteDomain({
  1. required String domainName,
})

Permanently deletes a search domain and all of its data.

May throw BaseException. May throw InternalException.

Implementation

Future<DeleteDomainResponse> deleteDomain({
  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: 'DeleteDomain',
    version: '2011-02-01',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    shape: shapes['DeleteDomainRequest'],
    shapes: shapes,
    resultWrapper: 'DeleteDomainResult',
  );
  return DeleteDomainResponse.fromXml($result);
}