Sha256: 9b5574015703f768d69429d47c5d0a8e1cefba66f88caf72bf548a4c33cdeb24

Contents?: true

Size: 477 Bytes

Versions: 5

Compression:

Stored size: 477 Bytes

Contents

class Inventory::Ecs::Cluster < Inventory::Base
  def header
    ["Cluster", "Container Instances", "Running Tasks"]
  end

  def data
    ecs_clusters.map do |cluster|
      [
        cluster.cluster_name,
        cluster.registered_container_instances_count,
        cluster.running_tasks_count,
      ]
    end
  end

  def ecs_clusters
    cluster_arns = ecs.list_clusters.cluster_arns
    @ecs_clusters ||= ecs.describe_clusters(clusters: cluster_arns).clusters
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
aws-inventory-0.3.2 lib/inventory/ecs/cluster.rb
aws-inventory-0.3.1 lib/inventory/ecs/cluster.rb
aws-inventory-0.3.0 lib/inventory/ecs/cluster.rb
aws-inventory-0.2.1 lib/inventory/ecs/cluster.rb
aws-inventory-0.2.0 lib/inventory/ecs/cluster.rb