Sha256: 87ca0f21148b19406bb00f1786703af4963e8e5384a795295f5f06d539c0b36e

Contents?: true

Size: 986 Bytes

Versions: 59

Compression:

Stored size: 986 Bytes

Contents

module Awspec::Type
  class CloudwatchLogs < ResourceBase
    def resource_via_client
      @resource_via_client ||= find_cloudwatch_logs_group(@display_name)
    end

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

    def has_log_stream?(stream_name)
      ret = find_cloudwatch_logs_stream_by_log_group_name(@id).log_stream_name
      return true if ret == stream_name
    end

    def has_metric_filter?(filter_name)
      ret = find_cloudwatch_logs_metric_fileter_by_log_group_name(@id, filter_name).filter_name
      return true if ret == filter_name
    end

    def has_subscription_filter?(filter_name, pattern = nil)
      ret = find_cloudwatch_logs_subscription_fileter_by_log_group_name(@id, filter_name)
      if pattern.nil?
        return true if ret.filter_name == filter_name
      else
        return false unless ret.filter_pattern == pattern
      end
      return true if ret.filter_name == filter_name
    end
  end
end

Version data entries

59 entries across 59 versions & 2 rubygems

Version Path
awspec-1.0.0 lib/awspec/type/cloudwatch_logs.rb
awspec-1.0.0.rc lib/awspec/type/cloudwatch_logs.rb
awspec-0.88.2 lib/awspec/type/cloudwatch_logs.rb
awspec-0.88.1 lib/awspec/type/cloudwatch_logs.rb
awspec-0.88.0 lib/awspec/type/cloudwatch_logs.rb
awspec-0.87.1 lib/awspec/type/cloudwatch_logs.rb
awspec-0.87.0 lib/awspec/type/cloudwatch_logs.rb
awspec-0.86.0 lib/awspec/type/cloudwatch_logs.rb
cmonson_2ndwatch_awspec-0.85.4 lib/awspec/type/cloudwatch_logs.rb
awspec-0.85.3 lib/awspec/type/cloudwatch_logs.rb
cmonson_2ndwatch_awspec-0.85.3 lib/awspec/type/cloudwatch_logs.rb
awspec-0.85.2 lib/awspec/type/cloudwatch_logs.rb
awspec-0.85.1 lib/awspec/type/cloudwatch_logs.rb
awspec-0.85.0 lib/awspec/type/cloudwatch_logs.rb
awspec-0.84.1 lib/awspec/type/cloudwatch_logs.rb
awspec-0.84.0 lib/awspec/type/cloudwatch_logs.rb
awspec-0.83.0 lib/awspec/type/cloudwatch_logs.rb
awspec-0.82.3 lib/awspec/type/cloudwatch_logs.rb
awspec-0.82.2 lib/awspec/type/cloudwatch_logs.rb
awspec-0.82.1 lib/awspec/type/cloudwatch_logs.rb