Sha256: dc5593ca3d99225523088ef0947fd82a2799520128da7ea063ce3fe1beb31b5a

Contents?: true

Size: 1.15 KB

Versions: 3

Compression:

Stored size: 1.15 KB

Contents

module Fog
  module AWS
    class EC2

      # Attach an Amazon EBS volume with a running instance, exposing as specified device
      #
      # ==== Parameters
      # * volume_id<~String> - Id of amazon EBS volume to associate with instance
      # * instance_id<~String> - Id of instance to associate volume with
      # * device<~String> - Specifies how the device is exposed to the instance (e.g. "/dev/sdh")
      #
      # ==== Returns
      # * response<~Fog::AWS::Response>:
      #   * body<~Hash>:
      #     * 'attachTime'<~Time> - Time of attachment was initiated at
      #     * 'device'<~String> - Device as it is exposed to the instance
      #     * 'instanceId'<~String> - Id of instance for volume
      #     * 'requestId'<~String> - Id of request
      #     * 'status'<~String> - Status of volume
      #     * 'volumeId'<~String> - Reference to volume
      def attach_volume(volume_id, instance_id, device)
        request({
          'Action' => 'AttachVolume',
          'VolumeId' => volume_id,
          'InstanceId' => instance_id,
          'Device' => device
        }, Fog::Parsers::AWS::EC2::AttachVolume.new)
      end

    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
geemus-fog-0.0.0 lib/fog/aws/requests/ec2/attach_volume.rb
geemus-fog-0.0.1 lib/fog/aws/requests/ec2/attach_volume.rb
geemus-fog-0.0.3 lib/fog/aws/requests/ec2/attach_volume.rb