def delete_api(name, description=None, region=None, key=None, keyid=None, profile=None):
 try:
  conn_params = dict(region=region, key=key, keyid=keyid, profile=profile)
  r = _find_apis_by_name(name, description=description, **conn_params)
  apis = r.get('restapi')
  if apis:
   conn = _get_conn(**conn_params)
   for api in apis:
    conn.delete_rest_api(restApiId=api['id'])
   return {'deleted': True, 'count': len(apis)}
  else:
   return {'deleted': False}
 except ClientError as e:
  return {'deleted': False, 'error': salt.utils.boto3.get_error(e)}

def delete_api ( name , description = None , region = None , key = None , keyid = None , profile = None ) : try : conn_params = dict ( region = region , key = key , keyid = keyid , profile = profile ) r = _find_apis_by_name ( name , description = description , ** conn_params ) apis = r . get ( 'restapi' ) if apis : conn = _get_conn ( ** conn_params ) for api in apis : conn . delete_rest_api ( restApiId = api [ 'id' ] ) return { 'deleted' : True , 'count' : len ( apis ) } else : return { 'deleted' : False } except ClientError as e : return { 'deleted' : False , 'error' : salt . utils . boto3 . get_error ( e ) }
delete all rest api service with the given name and an optional api description returns {deleted: true .