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-05-05"> <size>800</size> <zone>us-east-1a</zone> </CreateVolume>
Sample Response
<CreateVolumeResponse xmlns="http://ec2.amazonaws.com/doc/2008-05-05"> <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>