checkDNSAvailability method

Future<CheckDNSAvailabilityResultMessage> checkDNSAvailability({
  1. required String cNAMEPrefix,
})

Checks if the specified CNAME is available.

Parameter cNAMEPrefix : The prefix used when this CNAME is reserved.

Implementation

Future<CheckDNSAvailabilityResultMessage> checkDNSAvailability({
  required String cNAMEPrefix,
}) async {
  ArgumentError.checkNotNull(cNAMEPrefix, 'cNAMEPrefix');
  _s.validateStringLength(
    'cNAMEPrefix',
    cNAMEPrefix,
    4,
    63,
    isRequired: true,
  );
  final $request = <String, dynamic>{};
  $request['CNAMEPrefix'] = cNAMEPrefix;
  final $result = await _protocol.send(
    $request,
    action: 'CheckDNSAvailability',
    version: '2010-12-01',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    shape: shapes['CheckDNSAvailabilityMessage'],
    shapes: shapes,
    resultWrapper: 'CheckDNSAvailabilityResult',
  );
  return CheckDNSAvailabilityResultMessage.fromXml($result);
}