CreateVolume
The CreateVolume
operation creates a new Amazon EBS volume to which any Amazon EC2 instance can attach within the same Availability Zone. For more information, see Amazon Elastic Block Store.
Note | |
---|---|
You must specify an Availability Zone when creating a volume. The volume and the instance to which it attaches must be in the same Availability Zone. |
Request Parameters
The following table describes the request parameters for
CreateVolume
. Parameter names are case
sensitive.
Name | Description | Required |
---|---|---|
|
The size of the volume, in GiBs. Required if you are not creating a volume from a snapshot. Type: xsd:string Default: none Valid Values: 1 to 1024 Constraints: none Condition: Required if you are not creating a volume from a snapshot. |
Conditional |
|
The snapshot from which to create the new volume. Type: xsd:string Default: none Valid Values: ID of a snapshot that you own Constraints: none Condition: Required if you are creating a volume from a snapshot. |
Conditional |
|
The Availability Zone in which to create the new volume. Type: xsd:string Default: none Valid Values: A valid Availability Zone Constraints: none |
Yes |
Response Elements
The following table describes the default response tags included
in CreateVolume
responses.
Name | Description |
---|---|
|
The ID of the volume Type: xsd:string |
|
The size of the volume, in GiBs Type: xsd:string |
|
Volume state (e.g., Type: xsd:string |
|
Time stamp when volume creation was initiated Type: xsd:dateTime |
|
Availability Zone in which the volume was created Type: xsd:string |
|
Snapshot from which the volume was created, if applicable Type: xsd:string |
Sample Request
<CreateVolume xmlns="http://ec2.amazonaws.com/doc/2008-12-01"> <size>800</size> <availabilityZone>us-east-1a</availabilityZone> </CreateVolume>
Sample Response
<CreateVolumeResponse xmlns="http://ec2.amazonaws.com/doc/2008-12-01"> <volumeId>vol-4d826724</volumeId> <size>800</size> <status>creating</status> <createTime>2008-05-07T11:51:50.000Z</createTime> <availabilityZone>us-east-1a</availabilityZone> <snapshotId></snapshotId> </CreateVolumeResponse>