Class: RightAws::Ec2
- Inherits:
-
Object
- Object
- RightAws::Ec2
- Defined in:
- lib/souffle/provider/aws.rb
Overview
Monkeypatch RightAws to support EBS delete on termination.
Instance Method Summary collapse
-
#modify_block_device_delete_on_termination_attribute(instance_id, device_name, delete_on_termination) ⇒ Object
Modifies an EBS device delete on termination flag.
Instance Method Details
#modify_block_device_delete_on_termination_attribute(instance_id, device_name, delete_on_termination) ⇒ Object
Modifies an EBS device delete on termination flag.
14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/souffle/provider/aws.rb', line 14 def modify_block_device_delete_on_termination_attribute(instance_id, device_name, delete_on_termination) request_hash = {'InstanceId' => instance_id} prefix = "BlockDeviceMapping.1" request_hash["#{prefix}.DeviceName"] = device_name request_hash["#{prefix}.Ebs.DeleteOnTermination"] = delete_on_termination link = generate_request('ModifyInstanceAttribute', request_hash) request_info(link, RightAws::RightBoolResponseParser.new( :logger => @logger)) rescue Exception on_exception end |