# File lib/fog/aws/requests/compute/modify_volume.rb, line 41
        def modify_volume(volume_id, options={})
          response = Excon::Response.new
          volume   = self.data[:volumes][volume_id]

          if volume["volumeType"] == 'standard' && options['VolumeType']
            raise Fog::Compute::AWS::Error.new("InvalidParameterValue => Volume type EBS Magnetic is not supported.")
          end

          volume_modification = {
            'modificationState' => 'modifying',
            'progress'          => 0,
            'startTime'         => Time.now,
            'volumeId'          => volume_id
          }

          if options['Size']
            volume_modification.merge!(
              'originalSize' => volume['size'],
              'targetSize'   => options['Size']
            )
          end

          if options['Iops']
            volume_modification.merge!(
              'originalIops' => volume['iops'],
              'targetIops'   => options['Iops']
            )
          end

          if options['VolumeType']
            if options["VolumeType"] == 'standard'
              raise Fog::Compute::AWS::Error.new("InvalidParameterValue => Volume type EBS Magnetic is not supported.")
            end
            volume_modification.merge!(
              'originalVolumeType' => volume['volumeType'],
              'targetVolumeType'   => options['VolumeType']
            )
          end

          self.data[:volume_modifications][volume_id] = volume_modification

          response.body = {'volumeModification' => volume_modification, 'requestId' => Fog::AWS::Mock.request_id}
          response
        end