class Awful::WAF::Base

Public Instance Methods

change(token = nil) click to toggle source
# File lib/awful/waf.rb, line 29
def change(token = nil)
  if token
    waf.get_change_token_status(change_token: token).change_token_status.output(&method(:puts))
  else
    waf.get_change_token.change_token.output(&method(:puts))
  end
end
change_token() click to toggle source
# File lib/awful/waf.rb, line 23
def change_token
  waf.get_change_token.change_token
end
list_thing(thing) click to toggle source

boilerplate for handling paging in all list_ methods

# File lib/awful/waf.rb, line 11
def list_thing(thing)
  next_marker = nil
  things = []
  loop do
    response = waf.send("list_#{thing}", next_marker: next_marker, limit: 10)
    things += response.send(thing)
    next_marker = response.next_marker
    break unless next_marker
  end
  things
end
waf() click to toggle source
# File lib/awful/waf.rb, line 6
def waf
  @_waf ||= Aws::WAF::Client.new
end