Sha256: b625f837d8438f7ab35d780547badd83111c093c373a60c5940648c054ef5af2

Contents?: true

Size: 706 Bytes

Versions: 12

Compression:

Stored size: 706 Bytes

Contents

# frozen_string_literal: true

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

12 entries across 12 versions & 1 rubygems

Version Path
awspec-1.30.0 lib/awspec/type/waf_web_acl.rb
awspec-1.29.3 lib/awspec/type/waf_web_acl.rb
awspec-1.29.2 lib/awspec/type/waf_web_acl.rb
awspec-1.29.1 lib/awspec/type/waf_web_acl.rb
awspec-1.29.0 lib/awspec/type/waf_web_acl.rb
awspec-1.28.2 lib/awspec/type/waf_web_acl.rb
awspec-1.28.1 lib/awspec/type/waf_web_acl.rb
awspec-1.28.0 lib/awspec/type/waf_web_acl.rb
awspec-1.27.1 lib/awspec/type/waf_web_acl.rb
awspec-1.27.0 lib/awspec/type/waf_web_acl.rb
awspec-1.26.0 lib/awspec/type/waf_web_acl.rb
awspec-1.25.2 lib/awspec/type/waf_web_acl.rb