deleteDomain method

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

Permanently deletes the specified domain and all of its data. Once a domain is deleted, it cannot be recovered.

May throw BaseException. May throw InternalException. May throw ResourceNotFoundException. May throw ValidationException.

Parameter domainName : The name of the domain you want to permanently delete.

Implementation

Future<DeleteDomainResponse> deleteDomain({
  required String domainName,
}) async {
  ArgumentError.checkNotNull(domainName, 'domainName');
  _s.validateStringLength(
    'domainName',
    domainName,
    3,
    28,
    isRequired: true,
  );
  final response = await _protocol.send(
    payload: null,
    method: 'DELETE',
    requestUri:
        '/2021-01-01/opensearch/domain/${Uri.encodeComponent(domainName)}',
    exceptionFnMap: _exceptionFns,
  );
  return DeleteDomainResponse.fromJson(response);
}