Class: ElasticWhenever::Task::Cluster
- Inherits:
-
Object
- Object
- ElasticWhenever::Task::Cluster
- Defined in:
- lib/elastic_whenever/task/cluster.rb
Defined Under Namespace
Classes: InvalidInputException
Instance Method Summary collapse
- #arn ⇒ Object
-
#initialize(option, name) ⇒ Cluster
constructor
A new instance of Cluster.
- #name ⇒ Object
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 = Aws::ECS::Client.new(option.aws_config) @cluster = client.describe_clusters( clusters: [name] ).clusters.first end |
Instance Method Details
#arn ⇒ Object
17 18 19 |
# File 'lib/elastic_whenever/task/cluster.rb', line 17 def arn cluster.cluster_arn end |
#name ⇒ Object
13 14 15 |
# File 'lib/elastic_whenever/task/cluster.rb', line 13 def name cluster.cluster_name end |