Method: Fog::Compute::AWS::Real#create_volume
- Defined in:
- lib/fog/compute/requests/aws/create_volume.rb
#create_volume(availability_zone, size, snapshot_id = nil) ⇒ Object
Create an EBS volume
Parameters
-
availability_zone<~String> - availability zone to create volume in
-
size<~Integer> - Size in GiBs for volume. Must be between 1 and 1024.
-
snapshot_id<~String> - Optional, snapshot to create volume from
Returns
-
response<~Excon::Response>:
-
body<~Hash>:
-
‘availabilityZone’<~String> - Availability zone for volume
-
‘createTime’<~Time> - Timestamp for creation
-
‘size’<~Integer> - Size in GiBs for volume
-
‘snapshotId’<~String> - Snapshot volume was created from, if any
-
‘status’s<~String> - State of volume
-
‘volumeId’<~String> - Reference to volume
-
-
26 27 28 29 30 31 32 33 34 |
# File 'lib/fog/compute/requests/aws/create_volume.rb', line 26 def create_volume(availability_zone, size, snapshot_id = nil) request( 'Action' => 'CreateVolume', 'AvailabilityZone' => availability_zone, 'Size' => size, 'SnapshotId' => snapshot_id, :parser => Fog::Parsers::Compute::AWS::CreateVolume.new ) end |