getDomain method

Future<GetDomainResult> getDomain({
  1. required String domainName,
})

Returns information about a specific domain recordset.

May throw ServiceException. May throw InvalidInputException. May throw NotFoundException. May throw OperationFailureException. May throw AccessDeniedException. May throw AccountSetupInProgressException. May throw UnauthenticatedException.

Parameter domainName : The domain name for which your want to return information about.

Implementation

Future<GetDomainResult> getDomain({
  required String domainName,
}) async {
  ArgumentError.checkNotNull(domainName, 'domainName');
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'Lightsail_20161128.GetDomain'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'domainName': domainName,
    },
  );

  return GetDomainResult.fromJson(jsonResponse.body);
}