src/bosh_aws_cpi/lib/cloud/aws/cloud_v2.rb
# Detach an EBS volume from an EC2 instance
# @param [String] instance_id EC2 instance id of the virtual machine to detach the disk from
# @param [String] disk_id EBS volume id of the disk to detach
Detach an EBS volume from an EC2 instance
Detach an EBS volume from an EC2 instance
def detach_disk(instance_id, disk_id)
      with_thread_name("detach_disk(#{instance_id}, #{disk_id}):v2") do
        @cloud_core.detach_disk(instance_id, disk_id) do |disk_id|
          if @stemcell_api_version < 2
            update_agent_settings(instance_id) do |settings|
              settings['disks'] ||= {}
              settings['disks']['persistent'] ||= {}
              settings['disks']['persistent'].delete(disk_id)
            end
          end
        end
      end
    end
def detach_disk ( instance_id , disk_id ) with_thread_name ( "detach_disk(#{instance_id}, #{disk_id}):v2" ) do @cloud_core . detach_disk ( instance_id , disk_id ) do | disk_id | if @stemcell_api_version < 2 update_agent_settings ( instance_id ) do | settings | settings [ 'disks' ] ||= { } settings [ 'disks' ] [ 'persistent' ] ||= { } settings [ 'disks' ] [ 'persistent' ] . delete ( disk_id ) end end end end end
Detach an EBS volume from an EC2 instance
Detach an EBS volume from an EC2 instance
instance_id
<not_specific>
disk_id
<not_specific>
<not_specific>
disk_id EBS volume id of the disk to detach
disk_id EBS volume id of the disk to detach