Sha256: c9b3804e773903471cf286cb8e2db6c58be611fa5f30d4c00cd95fef3efb7e28

Contents?: true

Size: 565 Bytes

Versions: 13

Compression:

Stored size: 565 Bytes

Contents

# frozen_string_literal: true

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

    def resource_via_client
      @resource_via_client ||= find_msk_cluster_by_name(@display_name)
    end

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

    STATES = %w[
      active creating updating
      deleting failed
    ]

    STATES.each do |state|
      define_method "#{state}?" do
        resource_via_client.state == state.upcase
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

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