def zone_exists(zone, region=None, key=None, keyid=None, profile=None, retry_on_rate_limit=True, rate_limit_retries=5):
 if (region is None):
  region = 'universal'
 conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
 while (rate_limit_retries > 0):
  try:
   return bool(conn.get_zone(zone))
  except DNSServerError as e:
   if (retry_on_rate_limit and ('Throttling' == e.code)):
    log.debug('Throttled by AWS API.')
    time.sleep(2)
    rate_limit_retries -= 1
    continue
   raise e

def zone_exists ( zone , region = None , key = None , keyid = None , profile = None , retry_on_rate_limit = True , rate_limit_retries = 5 ) : if ( region is None ) : region = 'universal' conn = _get_conn ( region = region , key = key , keyid = keyid , profile = profile ) while ( rate_limit_retries > 0 ) : try : return bool ( conn . get_zone ( zone ) ) except DNSServerError as e : if ( retry_on_rate_limit and ( 'Throttling' == e . code ) ) : log . debug ( 'Throttled by AWS API.' ) time . sleep ( 2 ) rate_limit_retries -= 1 continue raise e
check for the existence of a route53 hosted zone .