def thing_type_exists(thingTypeName, region=None, key=None, keyid=None, profile=None):
 try:
  conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
  res = conn.describe_thing_type(thingTypeName=thingTypeName)
  if res.get('thingTypeName'):
   return {'exists': True}
  else:
   return {'exists': False}
 except ClientError as e:
  err = salt.utils.boto3.get_error(e)
  if (e.response.get('Error', {}).get('Code') == 'ResourceNotFoundException'):
   return {'exists': False}
  return {'error': err}

def thing_type_exists ( thingTypeName , region = None , key = None , keyid = None , profile = None ) : try : conn = _get_conn ( region = region , key = key , keyid = keyid , profile = profile ) res = conn . describe_thing_type ( thingTypeName = thingTypeName ) if res . get ( 'thingTypeName' ) : return { 'exists' : True } else : return { 'exists' : False } except ClientError as e : err = salt . utils . boto3 . get_error ( e ) if ( e . response . get ( 'Error' , { } ) . get ( 'Code' ) == 'ResourceNotFoundException' ) : return { 'exists' : False } return { 'error' : err }
given a thing type name .