Example usage for com.amazonaws.services.ec2.model Volume setAvailabilityZone

List of usage examples for com.amazonaws.services.ec2.model Volume setAvailabilityZone

Introduction

In this page you can find the example usage for com.amazonaws.services.ec2.model Volume setAvailabilityZone.

Prototype


public void setAvailabilityZone(String availabilityZone) 

Source Link

Document

The Availability Zone for the volume.

Usage

From source file:jp.primecloud.auto.aws.typica.converter.VolumeConverter.java

License:Open Source License

@Override
protected Volume convertObject(VolumeInfo from) {
    Volume to = new Volume();

    to.setVolumeId(from.getVolumeId());/*from  w  ww .  j av a 2s .co m*/

    Integer size = null;
    if (from.getSize() != null && from.getSize().length() != 0) {
        size = Integer.valueOf(from.getSize());
    }
    to.setSize(size);

    to.setSnapshotId(from.getSnapshotId());
    to.setAvailabilityZone(from.getZone());
    to.setState(from.getStatus());
    to.setCreateTime(from.getCreateTime().getTime());
    to.setAttachments(new VolumeAttachmentConverter().convert(from.getAttachmentInfo()));

    // 
    to.setTags(null);

    return to;
}