Sha256: e202b15d00584d6833a6f3855cc588ce35803b580f7f24972baa7fb67ccc049e

Contents?: true

Size: 674 Bytes

Versions: 118

Compression:

Stored size: 674 Bytes

Contents

module Awspec::Type
  class WafWebAcl < ResourceBase
    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

118 entries across 118 versions & 4 rubygems

Version Path
awspec-0.79.1 lib/awspec/type/waf_web_acl.rb
awspec-0.79.0 lib/awspec/type/waf_web_acl.rb
awspec-0.78.1 lib/awspec/type/waf_web_acl.rb
awspec-0.77.1 lib/awspec/type/waf_web_acl.rb
awspec-0.77.0 lib/awspec/type/waf_web_acl.rb
awspec-0.76.1 lib/awspec/type/waf_web_acl.rb
awspec-0.76.0 lib/awspec/type/waf_web_acl.rb
awspec-0.75.2 lib/awspec/type/waf_web_acl.rb
awspec-0.75.1 lib/awspec/type/waf_web_acl.rb
awspec-0.75.0 lib/awspec/type/waf_web_acl.rb
awspec-0.74.1 lib/awspec/type/waf_web_acl.rb
awspec-0.74.0 lib/awspec/type/waf_web_acl.rb
awspec-0.73.2 lib/awspec/type/waf_web_acl.rb
awspec-0.73.1 lib/awspec/type/waf_web_acl.rb
awspec-0.73.0 lib/awspec/type/waf_web_acl.rb
awspec-0.72.0 lib/awspec/type/waf_web_acl.rb
awspec-0.71.0 lib/awspec/type/waf_web_acl.rb
awspec-0.70.0 lib/awspec/type/waf_web_acl.rb