def convert_to_arn(arns, region=None, key=None, keyid=None, profile=None):
 results = []
 for arn in arns:
  if arn.startswith('scaling_policy:'):
   (_, as_group, scaling_policy_name) = arn.split(':')
   policy_arn = __salt__['boto_asg.get_scaling_policy_arn'](as_group, scaling_policy_name, region, key, keyid, profile)
   if policy_arn:
    results.append(policy_arn)
   else:
    log.error('Could not convert: {0}'.format(arn))
  else:
   results.append(arn)
 return results

def convert_to_arn ( arns , region = None , key = None , keyid = None , profile = None ) : results = [ ] for arn in arns : if arn . startswith ( 'scaling_policy:' ) : ( _ , as_group , scaling_policy_name ) = arn . split ( ':' ) policy_arn = __salt__ [ 'boto_asg.get_scaling_policy_arn' ] ( as_group , scaling_policy_name , region , key , keyid , profile ) if policy_arn : results . append ( policy_arn ) else : log . error ( 'Could not convert: {0}' . format ( arn ) ) else : results . append ( arn ) return results
convert a list of strings into actual arns .