module Swa::CLI::TagFilterOptions
Protected Instance Methods
append_to_tag_blacklist(arg)
click to toggle source
# File lib/swa/cli/tag_filter_options.rb, line 26 def append_to_tag_blacklist(arg) key, value_pattern = arg.split("=", 2) if value_pattern selector.add do |resource| value = resource.tags[key] value.nil? || !File.fnmatch(value_pattern, value) end else selector.add do |resource| resource.tags[key].nil? end end end
append_to_tag_list(arg)
click to toggle source
# File lib/swa/cli/tag_filter_options.rb, line 21 def append_to_tag_list(arg) key, value_pattern = arg.split("=", 2) add_tag_filter(key, value_pattern) end
stack=(name)
click to toggle source
# File lib/swa/cli/tag_filter_options.rb, line 40 def stack=(name) add_tag_filter("aws:cloudformation:stack-name", name) end
Private Instance Methods
add_tag_filter(key, value_pattern = nil)
click to toggle source
# File lib/swa/cli/tag_filter_options.rb, line 46 def add_tag_filter(key, value_pattern = nil) if value_pattern add_filter("tag:#{key}", value_pattern) else add_filter("tag-key", key) end end