Class: Inventory::Ecs::Cluster
- Defined in:
- lib/inventory/ecs/cluster.rb
Instance Method Summary collapse
Methods inherited from Base
eager_load!, inherited, #initialize, #report, #show, #sort, subclasses, #test_mode
Methods included from AwsServices
#acm, #cfn, #cw, #eb, #ec2, #ecs, #elbv1, #elbv2, #iam, #pricing, #rds, #route53
Methods included from Shared
Constructor Details
This class inherits a constructor from Inventory::Base
Instance Method Details
#data ⇒ Object
6 7 8 9 10 11 12 13 14 |
# File 'lib/inventory/ecs/cluster.rb', line 6 def data ecs_clusters.map do |cluster| [ cluster.cluster_name, cluster.registered_container_instances_count, cluster.running_tasks_count, ] end end |
#ecs_clusters ⇒ Object
16 17 18 19 |
# File 'lib/inventory/ecs/cluster.rb', line 16 def ecs_clusters cluster_arns = ecs.list_clusters.cluster_arns @ecs_clusters ||= ecs.describe_clusters(clusters: cluster_arns).clusters end |
#header ⇒ Object
2 3 4 |
# File 'lib/inventory/ecs/cluster.rb', line 2 def header ["Cluster", "Container Instances", "Running Tasks"] end |