getDomainName method
Represents a domain name that is contained in a simpler, more intuitive URL that can be called.
May throw BadRequestException.
May throw NotFoundException.
May throw TooManyRequestsException.
May throw UnauthorizedException.
Parameter domainName :
The name of the DomainName resource.
Parameter domainNameId :
The identifier for the domain name resource. Required for private custom
domain names.
Implementation
Future<DomainName> getDomainName({
required String domainName,
String? domainNameId,
}) async {
final $query = <String, List<String>>{
if (domainNameId != null) 'domainNameId': [domainNameId],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri: '/domainnames/${Uri.encodeComponent(domainName)}',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return DomainName.fromJson(response);
}