Sha256: 74d4cc1f36b22c52c4ce057c16664308f6137d204158f614d1e6c0f98d183fbe

Contents?: true

Size: 509 Bytes

Versions: 36

Compression:

Stored size: 509 Bytes

Contents

module Awspec::Type
  class EcsService < ResourceBase
    def initialize(service)
      super
      @display_name = service
    end

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

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

    STATES = %w(ACTIVE DRAINING INACTIVE)

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

Version data entries

36 entries across 36 versions & 2 rubygems

Version Path
cmonson_2ndwatch_awspec-0.85.4 lib/awspec/type/ecs_service.rb
awspec-0.85.3 lib/awspec/type/ecs_service.rb
cmonson_2ndwatch_awspec-0.85.3 lib/awspec/type/ecs_service.rb
awspec-0.85.2 lib/awspec/type/ecs_service.rb
awspec-0.85.1 lib/awspec/type/ecs_service.rb
awspec-0.85.0 lib/awspec/type/ecs_service.rb
awspec-0.84.1 lib/awspec/type/ecs_service.rb
awspec-0.84.0 lib/awspec/type/ecs_service.rb
awspec-0.83.0 lib/awspec/type/ecs_service.rb
awspec-0.82.3 lib/awspec/type/ecs_service.rb
awspec-0.82.2 lib/awspec/type/ecs_service.rb
awspec-0.82.1 lib/awspec/type/ecs_service.rb
awspec-0.82.0 lib/awspec/type/ecs_service.rb
awspec-0.81.1 lib/awspec/type/ecs_service.rb
awspec-0.81.0 lib/awspec/type/ecs_service.rb
awspec-0.80.1 lib/awspec/type/ecs_service.rb
awspec-0.80.0 lib/awspec/type/ecs_service.rb
awspec-0.79.2 lib/awspec/type/ecs_service.rb
awspec-0.79.1 lib/awspec/type/ecs_service.rb
awspec-0.79.0 lib/awspec/type/ecs_service.rb