private boolean volumeCreated ( String volumeId ) { DescribeVolumesRequest dvs = new DescribeVolumesRequest ( ) ; ArrayList < String > volumeIds = new ArrayList < String > ( ) ; volumeIds . add ( volumeId ) ; dvs . setVolumeIds ( volumeIds ) ; DescribeVolumesResult dvsresult = null ; try { dvsresult = this . ec2Api . describeVolumes ( dvs ) ; } catch ( Exception e ) { dvsresult = null ; } return dvsresult != null && "available" . equals ( dvsresult . getVolumes ( ) . get ( 0 ) . getState ( ) ) ; }
Checks whether volume is created .