CreateVolume
The CreateVolume
operation creates a new Amazon EBS volume that you can mount from
any Amazon EC2 instance. For more information, see Amazon Elastic Block Store.
Note | |
---|---|
You must specify an availability zone when creating a volume. The volume and any 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 GiB. Type: 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: 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: 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
https://ec2.amazonaws.com/ ?Action=CreateVolume &Size=800 &Zone=us-east-1a &...auth parameters...
Sample Response
<CreateVolumeResponse xmlns="http://ec2.amazonaws.com/doc/2008-08-08"> <volumeId>vol-4d826724</volumeId> <size>800</size> <status>creating</status> <createTime>2008-05-07T11:51:50.000Z</createTime> <zone>us-east-1a</zone> <snapshotId></snapshotId> </CreateVolumeResponse>