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
awspec-0.78.1 lib/awspec/type/ecs_service.rb
awspec-0.77.1 lib/awspec/type/ecs_service.rb
awspec-0.77.0 lib/awspec/type/ecs_service.rb
awspec-0.76.1 lib/awspec/type/ecs_service.rb
awspec-0.76.0 lib/awspec/type/ecs_service.rb
awspec-0.75.2 lib/awspec/type/ecs_service.rb
awspec-0.75.1 lib/awspec/type/ecs_service.rb
awspec-0.75.0 lib/awspec/type/ecs_service.rb
awspec-0.74.1 lib/awspec/type/ecs_service.rb
awspec-0.74.0 lib/awspec/type/ecs_service.rb
awspec-0.73.2 lib/awspec/type/ecs_service.rb
awspec-0.73.1 lib/awspec/type/ecs_service.rb
awspec-0.73.0 lib/awspec/type/ecs_service.rb
awspec-0.72.0 lib/awspec/type/ecs_service.rb
awspec-0.71.0 lib/awspec/type/ecs_service.rb
awspec-0.70.0 lib/awspec/type/ecs_service.rb