def set_default_policy_version(policy_name, version_id, region=None, key=None, keyid=None, profile=None):
 conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
 policy_arn = _get_policy_arn(policy_name, region, key, keyid, profile)
 try:
  conn.set_default_policy_version(policy_arn, version_id)
  log.info('Set {0} policy to version {1}.'.format(policy_name, version_id))
 except boto.exception.BotoServerError as e:
  aws = __utils__['boto.get_error'](e)
  log.debug(aws)
  msg = 'Failed to set {0} policy to version {1}: {2}'
  log.error(msg.format(policy_name, version_id, aws.get('message')))
  return False
 return True

def set_default_policy_version ( policy_name , version_id , region = None , key = None , keyid = None , profile = None ) : conn = _get_conn ( region = region , key = key , keyid = keyid , profile = profile ) policy_arn = _get_policy_arn ( policy_name , region , key , keyid , profile ) try : conn . set_default_policy_version ( policy_arn , version_id ) log . info ( 'Set {0} policy to version {1}.' . format ( policy_name , version_id ) ) except boto . exception . BotoServerError as e : aws = __utils__ [ 'boto.get_error' ] ( e ) log . debug ( aws ) msg = 'Failed to set {0} policy to version {1}: {2}' log . error ( msg . format ( policy_name , version_id , aws . get ( 'message' ) ) ) return False return True
sets the specified version of the specified policy as the policys default version .