class RightAws::Ec2
Monkeypatch RightAws
to support EBS delete on termination.
Public Instance Methods
modify_block_device_delete_on_termination_attribute(instance_id, device_name, delete_on_termination)
click to toggle source
Modifies an EBS device delete on termination flag.
@param [ String ] instance_id The instance id to associate with the EBS. @param [ String ] device_name The name of the EBS device. @param [ Boolean ] delete_on_termination Whether or not to delete on term.
# 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