Class: Awscli::EC2::Placement

Inherits:
Object
  • Object
show all
Defined in:
lib/awscli/ec2.rb

Overview

> Tags

Instance Method Summary collapse

Constructor Details

#initialize(connection) ⇒ Placement

Returns a new instance of Placement.



623
624
625
# File 'lib/awscli/ec2.rb', line 623

def initialize(connection)
  @conn = connection
end

Instance Method Details

#create(options) ⇒ Object



631
632
633
634
# File 'lib/awscli/ec2.rb', line 631

def create(options)
  @conn.create_placement_group(options[:name], options[:strategy])
  puts "Created a new placement group: #{options[:name]}"
end

#delete(options) ⇒ Object



636
637
638
639
# File 'lib/awscli/ec2.rb', line 636

def delete(options)
  @conn.delete_placement_group(options[:name])
  puts "Deleted placement group: #{options[:name]}"
end

#listObject



627
628
629
# File 'lib/awscli/ec2.rb', line 627

def list
  Formatador.display_table(@conn.describe_placement_groups.body['placementGroupSet'])
end