CreateVolume
Description
Creates a new Amazon EBS volume to which any Amazon EC2 instance can attach within the same Availability Zone. For more information about Amazon EBS, go to the
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
Name | Description | Required |
---|---|---|
|
Type: CreateVolumeType Ancestor: None Children: |
|
|
The size of the volume, in GiBs. Required if you are not creating a volume from a snapshot. Type: xsd:string Valid Values: Default: None Ancestor: Children: None |
Yes |
|
The snapshot from which to create the new volume. Type: xsd:string Default: None Ancestor: Children: None |
No |
|
The Availability Zone in which to create the new volume. Type: xsd:string Default: None Ancestor: Children: None |
Yes |
Response Elements
Name | Description |
---|---|
|
Type: CreateVolumeResponseType Ancestor: None Children: |
|
The ID of the request. Type: xsd:string Ancestor: Children: None |
|
The ID of the volume. Type: xsd:string Ancestor: Children: None |
|
The size of the volume, in GiBs. Type: xsd:string Ancestor: Children: None |
|
Snapshot from which the volume was created, if applicable. Type: xsd:string Ancestor: Children: None |
|
Availability Zone in which the volume was created. Type: xsd:string Ancestor: Children: None |
|
Volume state (e.g., creating, available) Type: xsd:string Ancestor: Children: None |
|
Time stamp when volume creation was initiated. Type: xsd:dateTime Ancestor: Children: None |
Examples
Example Request
This example creates a new 800 GiB volume in Availability Zone us-east-1a
.
<CreateVolume xmlns="http://ec2.amazonaws.com/doc/2009-10-31/"> <size>800</size> <availabilityZone>us-east-1a</availabilityZone> </CreateVolume>
Example Response
<CreateVolumeResponse xmlns="http://ec2.amazonaws.com/doc/2009-10-31/"> <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>