def volumes_tagged(name, tag_maps, authoritative=False, region=None, key=None, keyid=None, profile=None):
 ret = {'name': name, 'result': True, 'comment': '', 'changes': {}}
 args = {'tag_maps': tag_maps, 'authoritative': authoritative, 'region': region, 'key': key, 'keyid': keyid, 'profile': profile}
 if __opts__['test']:
  args['dry_run'] = True
  r = __salt__['boto_ec2.set_volumes_tags'](**args)
  if r.get('changes'):
   ret['comment'] = 'The following changes would be applied: {0}'.format(r)
  return ret
 r = __salt__['boto_ec2.set_volumes_tags'](**args)
 if (r['success'] is True):
  ret['comment'] = 'Tags applied.'
  ret['changes'] = r['changes']
 else:
  ret['comment'] = 'Error updating requested volume tags.'
  ret['result'] = False
 return ret

def volumes_tagged ( name , tag_maps , authoritative = False , region = None , key = None , keyid = None , profile = None ) : ret = { 'name' : name , 'result' : True , 'comment' : '' , 'changes' : { } } args = { 'tag_maps' : tag_maps , 'authoritative' : authoritative , 'region' : region , 'key' : key , 'keyid' : keyid , 'profile' : profile } if __opts__ [ 'test' ] : args [ 'dry_run' ] = True r = __salt__ [ 'boto_ec2.set_volumes_tags' ] ( ** args ) if r . get ( 'changes' ) : ret [ 'comment' ] = 'The following changes would be applied: {0}' . format ( r ) return ret r = __salt__ [ 'boto_ec2.set_volumes_tags' ] ( ** args ) if ( r [ 'success' ] is True ) : ret [ 'comment' ] = 'Tags applied.' ret [ 'changes' ] = r [ 'changes' ] else : ret [ 'comment' ] = 'Error updating requested volume tags.' ret [ 'result' ] = False return ret
ensure ec2 volume(s) matching the given filters have the defined tags .