def list_function_versions(FunctionName, region=None, key=None, keyid=None, profile=None):
 try:
  conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
  vers = []
  for ret in salt.utils.boto3.paged_call(conn.list_versions_by_function, FunctionName=FunctionName):
   vers.extend(ret['Versions'])
  if (not bool(vers)):
   log.warning('No versions found')
  return {'Versions': vers}
 except ClientError as e:
  return {'error': salt.utils.boto3.get_error(e)}

def list_function_versions ( FunctionName , region = None , key = None , keyid = None , profile = None ) : try : conn = _get_conn ( region = region , key = key , keyid = keyid , profile = profile ) vers = [ ] for ret in salt . utils . boto3 . paged_call ( conn . list_versions_by_function , FunctionName = FunctionName ) : vers . extend ( ret [ 'Versions' ] ) if ( not bool ( vers ) ) : log . warning ( 'No versions found' ) return { 'Versions' : vers } except ClientError as e : return { 'error' : salt . utils . boto3 . get_error ( e ) }
list the versions available for the given function .