def describe_usage_plans(name=None, plan_id=None, region=None, key=None, keyid=None, profile=None):
 try:
  conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
  plans = _multi_call(conn.get_usage_plans, 'items')
  if name:
   plans = _filter_plans('name', name, plans)
  if plan_id:
   plans = _filter_plans('id', plan_id, plans)
  return {'plans': [_convert_datetime_str(plan) for plan in plans]}
 except ClientError as e:
  return {'error': salt.utils.boto3.get_error(e)}

def describe_usage_plans ( name = None , plan_id = None , region = None , key = None , keyid = None , profile = None ) : try : conn = _get_conn ( region = region , key = key , keyid = keyid , profile = profile ) plans = _multi_call ( conn . get_usage_plans , 'items' ) if name : plans = _filter_plans ( 'name' , name , plans ) if plan_id : plans = _filter_plans ( 'id' , plan_id , plans ) return { 'plans' : [ _convert_datetime_str ( plan ) for plan in plans ] } except ClientError as e : return { 'error' : salt . utils . boto3 . get_error ( e ) }
returns a list of existing usage plans .