Amazon Elastic Compute Cloud
User Guide (API Version 2012-04-01)
Print this pageEmail this pageGo to the ForumsView the PDFShare this page on TwitterShare this page on FacebookBookmark this page on DeliciousSubmit this page to RedditSubmit this page to DiggDid this page help you?  Yes  No   Tell us about it...

API and Command Overview

The following table summarizes the available Amazon EBS commands and corresponding API actions for creating and using Amazon EBS volumes. For more information about the commands, go to the Amazon Elastic Compute Cloud Command Line Reference. For more information about the API actions, go to the Amazon Elastic Compute Cloud API Reference.

Command and API ActionDescription

ec2-create-volume

CreateVolume

Creates a new Amazon EBS volume using the specified size or creates a new volume based on a previously created snapshot. Any AWS Marketplace product codes from the snapshot are propagated to the volume.

For an overview of the AWS Marketplace, go to https://aws.amazon.com/marketplace/help/200900000. For details on how to use the AWS Marketplace, see AWS Marketplace.

ec2-delete-volume

DeleteVolume

Deletes the specified volume.

The action does not delete any snapshots that were created from the volume.

ec2-describe-volumes

DescribeVolumes

Describes all your volumes, including size, source snapshot, Availability Zone, creation time, and status (available or in-use). If the volume is in-use, an attachment line shows the volume ID, the instance ID to which the volume is attached, the device name exposed to the instance, its status (attaching, attached, detaching, detached), and when it attached.

ec2-attach-volume

AttachVolume

Attaches the specified volume to a specified instance, exposing the volume using the specified device name.

A volume can be attached to only a single instance at any time. The volume and instance must be in the same Availability Zone. The instance must be in the running or stopped state.

[Note]Note

If a volume has an AWS Marketplace product code:

  • The volume can only be attached to the root device of a stopped instance.

  • You must be subscribed to the AWS Marketplace code that is on the volume.

  • The configuration (instance type, operating system) of the instance must support that specific AWS Marketplace code. For example, you cannot take a volume from a Windows instance and attach it to a Linux instance.

  • AWS Marketplace product codes will be copied from the volume to the instance.

For an overview of the AWS Marketplace, go to https://aws.amazon.com/marketplace/help/200900000. For details on how to use the AWS Marketplace, see AWS Marketplace.

ec2-detach-volume

DetachVolume

Detaches the specified volume from the instance it's attached to.

This action does not delete the volume. The volume can be attached to another instance and will have the same data as when it was detached.

If the root volume is detached from an instance with an AWS Marketplace product code, then the AWS Marketplace product codes from that volume will no longer be associated with the instance.

ec2-create-snapshot

CreateSnapshot

Creates a snapshot of the volume you specify.

After the snapshot is created, you can use it to create volumes that contain exactly the same data as the original volume.

When a snapshot is created, any AWS Marketplace product codes from the volume will be propagated to the snapshot.

ec2-delete-snapshot

DeleteSnapshot

Deletes the specified snapshot.

This action does not affect currently running Amazon EBS volumes, regardless of whether they were used to create the snapshot or were derived from the snapshot.

ec2-describe-snapshots

DescribeSnapshots

Describes the specified snapshot.

Describes all snapshots, including their source volume, snapshot initiation time, progress (percentage complete), and status (pending, completed, etc.).

ec2-modify-snapshot-attribute

ModifySnapshotAttribute

Modifies permissions for a snapshot (i.e., who can create volumes from the snapshot). You can specify one or more AWS accounts, or specify all to make the snapshot public.

[Note]Note

Snapshots with AWS Marketplace product codes cannot be made public.

ec2-describe-snapshot-attribute

DescribeSnapshotAttribute

Describes attributes for a snapshot.