def describe_thing_type(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:
   res.pop('ResponseMetadata', None)
   thingTypeMetadata = res.get('thingTypeMetadata')
   if thingTypeMetadata:
    for dtype in ('creationDate', 'deprecationDate'):
     dval = thingTypeMetadata.get(dtype)
     if (dval and isinstance(dval, datetime.date)):
      thingTypeMetadata[dtype] = '{0}'.format(dval)
   return {'thing_type': res}
  else:
   return {'thing_type': None}
 except ClientError as e:
  err = salt.utils.boto3.get_error(e)
  if (e.response.get('Error', {}).get('Code') == 'ResourceNotFoundException'):
   return {'thing_type': None}
  return {'error': err}

def describe_thing_type ( 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 : res . pop ( 'ResponseMetadata' , None ) thingTypeMetadata = res . get ( 'thingTypeMetadata' ) if thingTypeMetadata : for dtype in ( 'creationDate' , 'deprecationDate' ) : dval = thingTypeMetadata . get ( dtype ) if ( dval and isinstance ( dval , datetime . date ) ) : thingTypeMetadata [ dtype ] = '{0}' . format ( dval ) return { 'thing_type' : res } else : return { 'thing_type' : None } except ClientError as e : err = salt . utils . boto3 . get_error ( e ) if ( e . response . get ( 'Error' , { } ) . get ( 'Code' ) == 'ResourceNotFoundException' ) : return { 'thing_type' : None } return { 'error' : err }
given a thing type name describe its properties .