Sha256: 1fbc193d0f0cf15a0d85c7669545ed94557d82ea8ac3559b990c180d695f00b0

Contents?: true

Size: 675 Bytes

Versions: 61

Compression:

Stored size: 675 Bytes

Contents

module Awspec::Type
  class Firehose < ResourceBase
    def initialize(name)
      super
      @delivery_stream_name = name
    end

    def resource_via_client
      @resource_via_client ||= find_delivery_stream(@delivery_stream_name)
    end

    def id
      @id ||= @delivery_stream_name if resource_via_client
    end

    STATES = %w(ACTIVE CREATING DELETING)

    STATES.each do |state|
      define_method state.downcase + '?' do
        resource_via_client.delivery_stream_status == state
      end
    end

    def has_splunk_destination?
      resource_via_client.destinations.find do |dest|
        dest.splunk_destination_description
      end
    end
  end
end

Version data entries

61 entries across 61 versions & 3 rubygems

Version Path
awspec-1.25.1 lib/awspec/type/firehose.rb
awspec-1.25.0 lib/awspec/type/firehose.rb
awspec-1.24.4 lib/awspec/type/firehose.rb
awspec-1.24.3 lib/awspec/type/firehose.rb
awspec-1.24.2 lib/awspec/type/firehose.rb
awspec-1.24.1 lib/awspec/type/firehose.rb
awspec-1.24.0 lib/awspec/type/firehose.rb
awspec-1.23.0 lib/awspec/type/firehose.rb
awspec-1.22.1 lib/awspec/type/firehose.rb
awspec-1.22.0 lib/awspec/type/firehose.rb
awspec-1.21.1 lib/awspec/type/firehose.rb
awspec-1.21.0 lib/awspec/type/firehose.rb
awspec-1.20.0 lib/awspec/type/firehose.rb
awspec-1.19.2 lib/awspec/type/firehose.rb
awspec-1.19.1 lib/awspec/type/firehose.rb
awspec-1.19.0 lib/awspec/type/firehose.rb
cthiesfork-awspec-1.2.4 lib/awspec/type/firehose.rb
awspec-api_gateway_extended-1.2.4 lib/awspec/type/firehose.rb
awspec-api_gateway_extended-1.2.3 lib/awspec/type/firehose.rb
awspec-1.18.6 lib/awspec/type/firehose.rb