Sha256: 2a765be802262fc1a13a9d75aea87668dddf870f127e875c5b363dd93eecdb78

Contents?: true

Size: 730 Bytes

Versions: 12

Compression:

Stored size: 730 Bytes

Contents

# frozen_string_literal: true

module Awspec::Type
  class WafregionalWebAcl < ResourceBase
    def resource_via_client
      @resource_via_client ||= find_wafregional_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_wafregional_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/wafregional_web_acl.rb
awspec-1.29.3 lib/awspec/type/wafregional_web_acl.rb
awspec-1.29.2 lib/awspec/type/wafregional_web_acl.rb
awspec-1.29.1 lib/awspec/type/wafregional_web_acl.rb
awspec-1.29.0 lib/awspec/type/wafregional_web_acl.rb
awspec-1.28.2 lib/awspec/type/wafregional_web_acl.rb
awspec-1.28.1 lib/awspec/type/wafregional_web_acl.rb
awspec-1.28.0 lib/awspec/type/wafregional_web_acl.rb
awspec-1.27.1 lib/awspec/type/wafregional_web_acl.rb
awspec-1.27.0 lib/awspec/type/wafregional_web_acl.rb
awspec-1.26.0 lib/awspec/type/wafregional_web_acl.rb
awspec-1.25.2 lib/awspec/type/wafregional_web_acl.rb