Class: ElasticWhenever::Task::Cluster

Inherits:
Object
  • Object
show all
Defined in:
lib/elastic_whenever/task/cluster.rb

Defined Under Namespace

Classes: InvalidInputException

Instance Method Summary collapse

Constructor Details

#initialize(option, name) ⇒ Cluster

Returns a new instance of Cluster.



6
7
8
9
10
11
# File 'lib/elastic_whenever/task/cluster.rb', line 6

def initialize(option, name)
  @client = option.ecs_client
  @cluster = client.describe_clusters(
    clusters: [name]
  ).clusters.first
end

Instance Method Details

#arnObject



17
18
19
# File 'lib/elastic_whenever/task/cluster.rb', line 17

def arn
  cluster.cluster_arn
end

#nameObject



13
14
15
# File 'lib/elastic_whenever/task/cluster.rb', line 13

def name
  cluster.cluster_name
end