Sha256: 499cf3a10215a5640fbb8c76490a23f5652156b653b082f0ba75f49e0ee34caf

Contents?: true

Size: 585 Bytes

Versions: 12

Compression:

Stored size: 585 Bytes

Contents

module Awspec::Type
  class EcsService < Base
    aws_resource Aws::ECS::Types::Service

    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

    def active?
      resource_via_client.status == 'ACTIVE'
    end

    def draining?
      resource_via_client.status == 'DRAINING'
    end

    def inactive?
      resource_via_client.status == 'INACTIVE'
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
awspec-0.65.2 lib/awspec/type/ecs_service.rb
awspec-0.65.1 lib/awspec/type/ecs_service.rb
awspec-0.65.0 lib/awspec/type/ecs_service.rb
awspec-0.64.0 lib/awspec/type/ecs_service.rb
awspec-0.63.1 lib/awspec/type/ecs_service.rb
awspec-0.63.0 lib/awspec/type/ecs_service.rb
awspec-0.62.1 lib/awspec/type/ecs_service.rb
awspec-0.62.0 lib/awspec/type/ecs_service.rb
awspec-0.61.1 lib/awspec/type/ecs_service.rb
awspec-0.61.0 lib/awspec/type/ecs_service.rb
awspec-0.60.1 lib/awspec/type/ecs_service.rb
awspec-0.60.0 lib/awspec/type/ecs_service.rb