'Create a new EBS Volume.
:type size: int
:param size: The size of the new volume, in GiB
:type zone: string or :class:`boto.ec2.zone.Zone`
:param zone: The availability zone in which the Volume will be created.
:type snapshot: string or :class:`boto.ec2.snapshot.Snapshot`
:param snapshot: The snapshot from which the new Volume will be
created.
:type volume_type: string
:param volume_type: The type of the volume. (optional).  Valid
values are: standard | io1 | gp2.
:type iops: int
:param iops: The provisioned IOPS you want to associate with
this volume. (optional)
:type encrypted: bool
:param encrypted: Specifies whether the volume should be encrypted.
(optional)
:type kms_key_id: string
:params kms_key_id: If encrypted is True, this KMS Key ID may be specified to
encrypt volume with this key (optional)
e.g.: arn:aws:kms:us-east-1:012345678910:key/abcd1234-a123-456a-a12b-a123b4cd56ef
:type dry_run: bool
:param dry_run: Set to True if the operation should not actually run.'

def create_volume(self, size, zone, snapshot=None, volume_type=None, iops=None, encrypted=False, kms_key_id=None, dry_run=False):

    if isinstance(zone, Zone):
        zone = zone.name
    params = {'AvailabilityZone': zone}
    if size:
        params['Size'] = size
    if snapshot:
        if isinstance(snapshot, Snapshot):
            snapshot = snapshot.id
        params['SnapshotId'] = snapshot
    if volume_type:
        params['VolumeType'] = volume_type
    if iops:
        params['Iops'] = str(iops)
    if encrypted:
        params['Encrypted'] = 'true'
        if kms_key_id:
            params['KmsKeyId'] = kms_key_id
    if dry_run:
        params['DryRun'] = 'true'
    return self.get_object('CreateVolume', params, Volume, verb='POST')
