Sha256: 79505c77ca75bc775b90f1c2640fade8559de77f4b3d797be220c00959b18101

Contents?: true

Size: 577 Bytes

Versions: 13

Compression:

Stored size: 577 Bytes

Contents

# frozen_string_literal: true

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

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

    def id
      @id ||= "#{resource_via_client.family}:#{resource_via_client.revision}" if resource_via_client
    end

    STATES = %w[ACTIVE INACTIVE]

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

Version data entries

13 entries across 13 versions & 1 rubygems

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