def get_scaling_policy_arn(as_group, scaling_policy_name, region=None, key=None, keyid=None, profile=None):
 conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
 policies = conn.get_all_policies(as_group=as_group)
 for policy in policies:
  if (policy.name == scaling_policy_name):
   return policy.policy_arn
 log.error('Could not convert: {0}'.format(as_group))
 return None

def get_scaling_policy_arn ( as_group , scaling_policy_name , region = None , key = None , keyid = None , profile = None ) : conn = _get_conn ( region = region , key = key , keyid = keyid , profile = profile ) policies = conn . get_all_policies ( as_group = as_group ) for policy in policies : if ( policy . name == scaling_policy_name ) : return policy . policy_arn log . error ( 'Could not convert: {0}' . format ( as_group ) ) return None
return the arn for a scaling policy in a specific autoscale group or none if not found .