Sha256: 01b0e28f973c26efef6633adca7b0748d987798805a79b3b95f1c91b997f863e

Contents?: true

Size: 666 Bytes

Versions: 26

Compression:

Stored size: 666 Bytes

Contents

module Awspec::Type
  class WafWebAcl < Base
    def resource_via_client
      @resource_via_client ||= find_waf_web_acl(@display_name)
    end

    def id
      @id ||= resource_via_client.web_acl_id if resource_via_client
    end

    def default_action
      resource_via_client.default_action.type
    end

    def has_rule?(rule_id, priority = nil, action = nil)
      resource_via_client.rules.find do |rule|
        next false if !priority.nil? && rule.priority != priority
        next false if !action.nil? && rule.action.type != action
        next true if rule.rule_id == rule_id
        find_waf_rule(rule_id).name == rule_id
      end
    end
  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
awspec-0.69.1 lib/awspec/type/waf_web_acl.rb
awspec-0.69.0 lib/awspec/type/waf_web_acl.rb
awspec-0.68.0 lib/awspec/type/waf_web_acl.rb
awspec-0.67.1 lib/awspec/type/waf_web_acl.rb
awspec-0.67.0 lib/awspec/type/waf_web_acl.rb
awspec-0.66.2 lib/awspec/type/waf_web_acl.rb
awspec-0.66.1 lib/awspec/type/waf_web_acl.rb
awspec-0.66.0 lib/awspec/type/waf_web_acl.rb
awspec-0.65.2 lib/awspec/type/waf_web_acl.rb
awspec-0.65.1 lib/awspec/type/waf_web_acl.rb
awspec-0.65.0 lib/awspec/type/waf_web_acl.rb
awspec-0.64.0 lib/awspec/type/waf_web_acl.rb
awspec-0.63.1 lib/awspec/type/waf_web_acl.rb
awspec-0.63.0 lib/awspec/type/waf_web_acl.rb
awspec-0.62.1 lib/awspec/type/waf_web_acl.rb
awspec-0.62.0 lib/awspec/type/waf_web_acl.rb
awspec-0.61.1 lib/awspec/type/waf_web_acl.rb
awspec-0.61.0 lib/awspec/type/waf_web_acl.rb
awspec-0.60.1 lib/awspec/type/waf_web_acl.rb
awspec-0.60.0 lib/awspec/type/waf_web_acl.rb