Package org.jclouds.ec2.features
Interface ElasticBlockStoreApi
public interface ElasticBlockStoreApi
Provides access to EC2 Elastic Block Store services via their REST API.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddCreateVolumePermissionsToSnapshotInRegion(String region, Iterable<String> userIds, Iterable<String> userGroups, String snapshotId) AddscreateVolumePermissions to an EBS snapshot.attachVolumeInRegion(String region, String volumeId, String instanceId, String device) Attaches an Amazon EBS volume to a running instance and exposes it as the specified device.createSnapshotInRegion(String region, String volumeId, CreateSnapshotOptions... options) Creates a snapshot of an Amazon EBS volume and stores it in Amazon S3.createVolumeFromSnapshotInAvailabilityZone(String availabilityZone, int size, String snapshotId) Creates a new Amazon EBS volume to which any Amazon EC2 instance can attach within the same Availability Zone.createVolumeFromSnapshotInAvailabilityZone(String availabilityZone, String snapshotId) Creates a new Amazon EBS volume to which any Amazon EC2 instance can attach within the same Availability Zone.createVolumeInAvailabilityZone(String availabilityZone, int size) Creates a new Amazon EBS volume to which any Amazon EC2 instance can attach within the same Availability Zone.createVolumeInAvailabilityZone(String availabilityZone, CreateVolumeOptions... options) Creates a new Amazon EBS volume to which any Amazon EC2 instance can attach within the same Availability Zone.voiddeleteSnapshotInRegion(String region, String snapshotId) Deletes a snapshot of an Amazon EBS volume that you own.voiddeleteVolumeInRegion(String region, String volumeId) Deletes an Amazon EBS volume that you own.describeSnapshotsInRegion(String region, DescribeSnapshotsOptions... options) Returns information about Amazon EBS snapshots available to the user.describeSnapshotsInRegionWithFilter(String region, com.google.common.collect.Multimap<String, String> filter, DescribeSnapshotsOptions... options) Returns information about EBS snapshots matching the given filters.describeVolumesInRegion(String region, String... volumeIds) Describes the specified Amazon EBS volumes that you own.describeVolumesInRegionWithFilter(String region, com.google.common.collect.Multimap<String, String> filter) Describes the specified Amazon EBS volumes that you own and match the given filters.voiddetachVolumeInRegion(String region, String volumeId, boolean force, DetachVolumeOptions... options) Attaches an Amazon EBS volume to a running instance and exposes it as the specified device.getCreateVolumePermissionForSnapshotInRegion(String region, String snapshotId) Returns thePermissions of an snapshot.voidremoveCreateVolumePermissionsFromSnapshotInRegion(String region, Iterable<String> userIds, Iterable<String> userGroups, String snapshotId) RemovescreateVolumePermissions from an EBS snapshot.voidresetCreateVolumePermissionsOnSnapshotInRegion(String region, String snapshotId) Resets thecreateVolumePermissions on an EBS snapshot.
-
Method Details
-
createVolumeFromSnapshotInAvailabilityZone
@Named("CreateVolume") @POST @Path("/") Volume createVolumeFromSnapshotInAvailabilityZone(@FormParam("AvailabilityZone") String availabilityZone, @FormParam("SnapshotId") String snapshotId) 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 Amazon Elastic Compute Cloud Developer Guide or Amazon Elastic Compute Cloud User Guide.- Parameters:
availabilityZone- An Amazon EBS volume must be located within the same Availability Zone as the instance to which it attaches.snapshotId- The snapshot from which to create the new volume.- See Also:
-
createVolumeFromSnapshotInAvailabilityZone
@Named("CreateVolume") @POST @Path("/") Volume createVolumeFromSnapshotInAvailabilityZone(@FormParam("AvailabilityZone") String availabilityZone, @FormParam("Size") int size, @FormParam("SnapshotId") String snapshotId) Creates a new Amazon EBS volume to which any Amazon EC2 instance can attach within the same Availability Zone. This is overloadedcreateVolumeFromSnapshotInAvailabilityZone(java.lang.String, java.lang.String), which creates a volume with a specific size. For more information about Amazon EBS, go to the Amazon Elastic Compute Cloud Developer Guide or Amazon Elastic Compute Cloud User Guide.- Parameters:
availabilityZone- An Amazon EBS volume must be located within the same Availability Zone as the instance to which it attaches.size- Size of volume to be createdsnapshotId- The snapshot from which to create the new volume.- See Also:
-
createVolumeInAvailabilityZone
@Named("CreateVolume") @POST @Path("/") Volume createVolumeInAvailabilityZone(@FormParam("AvailabilityZone") String availabilityZone, @FormParam("Size") int size) 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 Amazon Elastic Compute Cloud Developer Guide or Amazon Elastic Compute Cloud User Guide.- Parameters:
availabilityZone- An Amazon EBS volume must be located within the same Availability Zone as the instance to which it attaches.size- The size of the volume, in GiBs (1-1024). Required if you are not creating a volume from a snapshot.- See Also:
-
createVolumeInAvailabilityZone
@Named("CreateVolume") @POST @Path("/") Volume createVolumeInAvailabilityZone(@FormParam("AvailabilityZone") String availabilityZone, CreateVolumeOptions... options) 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 Amazon Elastic Compute Cloud Developer Guide or Amazon Elastic Compute Cloud User Guide.- Parameters:
availabilityZone- An Amazon EBS volume must be located within the same Availability Zone as the instance to which it attaches.options- options like specifying a snapshot, EBS volume type, etc- See Also:
-
describeVolumesInRegion
@POST @Named("DescribeVolumes") @Path("/") Set<Volume> describeVolumesInRegion(@Nullable String region, String... volumeIds) Describes the specified Amazon EBS volumes that you own. If you do not specify one or more volume IDs, Amazon EBS describes all volumes that you own. For more information about Amazon EBS, go to the Amazon Elastic Compute Cloud Developer Guide or Amazon Elastic Compute Cloud User Guide.- Parameters:
region- region where the volume is definedvolumeIds- The ID of the volume to list. Defaults to describe all volumes that you own.- See Also:
-
describeVolumesInRegionWithFilter
@POST @Named("DescribeVolumes") @Path("/") Set<Volume> describeVolumesInRegionWithFilter(@Nullable String region, com.google.common.collect.Multimap<String, String> filter) Describes the specified Amazon EBS volumes that you own and match the given filters. If you do not specify any filters, Amazon EBS describes all volumes that you own. For more information about Amazon EBS, go to the Amazon Elastic Compute Cloud Developer Guide or Amazon Elastic Compute Cloud User Guide.- Parameters:
region- region where the volume is definedfilter- Multimap of filter key/values- See Also:
-
deleteVolumeInRegion
@Named("DeleteVolume") @POST @Path("/") void deleteVolumeInRegion(@Nullable String region, @FormParam("VolumeId") String volumeId) Deletes an Amazon EBS volume that you own. For more information about Amazon EBS, go to the Amazon Elastic Compute Cloud Developer Guide or Amazon Elastic Compute Cloud User Guide.- Parameters:
region- region where the volume is definedvolumeId- The ID of the volume to delete. The volume remains in the deleting state for several minutes after entering this command.- See Also:
-
detachVolumeInRegion
@Named("DetachVolume") @POST @Path("/") void detachVolumeInRegion(@Nullable String region, @FormParam("VolumeId") String volumeId, @FormParam("Force") boolean force, DetachVolumeOptions... options) Attaches an Amazon EBS volume to a running instance and exposes it as the specified device.Note
Windows instances currently support devices xvda through xvdp. Devices xvda and xvdb are reserved by the operating system, xvdc is assigned to drive C:\, and, depending on the instance type, devices xvdd through xvde might be reserved by the instance stores. Any device that is not reserved can be attached to an Amazon EBS volume. For a list of devices that are reserved by the instance stores, go to the Amazon Elastic Compute Cloud Developer Guide or Amazon Elastic Compute Cloud User Guide.- Parameters:
region- region where the volume is definedvolumeId- The ID of the volume to delete. The volume remains in the deleting state for several minutes after entering this command.force- Forces detachment if the previous detachment attempt did not occur cleanly (logging into an instance, unmounting the volume, and detaching normally). This option can lead to data loss or a corrupted file system. Use this option only as a last resort to detach a volume from a failed instance. The instance will not have an opportunity to flush file system caches nor file system meta data. If you use this option, you must perform file system check and repair procedures.options- options like force()- See Also:
-
attachVolumeInRegion
@Named("AttachVolume") @POST @Path("/") Attachment attachVolumeInRegion(@Nullable String region, @FormParam("VolumeId") String volumeId, @FormParam("InstanceId") String instanceId, @FormParam("Device") String device) Attaches an Amazon EBS volume to a running instance and exposes it as the specified device.Note
Windows instances currently support devices xvda through xvdp. Devices xvda and xvdb are reserved by the operating system, xvdc is assigned to drive C:\, and, depending on the instance type, devices xvdd through xvde might be reserved by the instance stores. Any device that is not reserved can be attached to an Amazon EBS volume. For a list of devices that are reserved by the instance stores, go to the Amazon Elastic Compute Cloud Developer Guide or Amazon Elastic Compute Cloud User Guide.- Parameters:
region- region where the volume is definedvolumeId- The ID of the Amazon EBS volume. The volume and instance must be within the same Availability Zone and the instance must be running.instanceId- The ID of the instance to which the volume attaches. The volume and instance must be within the same Availability Zone and the instance must be running.device- Specifies how the device is exposed to the instance (e.g., /dev/sdh).- See Also:
-
createSnapshotInRegion
@Named("CreateSnapshot") @POST @Path("/") Snapshot createSnapshotInRegion(@Nullable String region, @FormParam("VolumeId") String volumeId, CreateSnapshotOptions... options) Creates a snapshot of an Amazon EBS volume and stores it in Amazon S3. You can use snapshots for backups, to make identical copies of instance devices, and to save data before shutting down an instance. For more information about Amazon EBS, go to the Amazon Elastic Compute Cloud Developer Guide or Amazon Elastic Compute Cloud User Guide. When taking a snapshot of a file system, we recommend unmounting it first. This ensures the file system metadata is in a consistent state, that the 'mounted indicator' is cleared, and that all applications using that file system are stopped and in a consistent state. Some file systems, such as xfs, can freeze and unfreeze activity so a snapshot can be made without unmounting. For Linux/UNIX, enter the following command from the command line.umount - d / dev / sdh
For Windows, open Disk Management, right-click the volume to unmount, and select Change Drive Letter and Path. Then, select the mount point to remove and click Remove.- Parameters:
region- Snapshots are tied to Regions and can only be used for volumes within the same Region.volumeId- The ID of the Amazon EBS volume of which to take a snapshot.options- options like passing a description.- Returns:
- the Snapshot in progress
- See Also:
-
describeSnapshotsInRegion
@Named("DescribeSnapshots") @POST @Path("/") Set<Snapshot> describeSnapshotsInRegion(@Nullable String region, DescribeSnapshotsOptions... options) Returns information about Amazon EBS snapshots available to the user. Information returned includes volume ID, status, start time, progress, owner ID, volume size, and description. Snapshots available to the user include public snapshots available for any user to createVolume, private snapshots owned by the user making the request, and private snapshots owned by other users for which the user granted explicit create volume permissions. The create volume permissions fall into 3 categories:
The list of snapshots returned can be modified by specifying snapshot IDs, snapshot owners, or users with create volume permissions. If no options are specified, Amazon EC2 returns all snapshots for which the user has create volume permissions. If you specify one or more snapshot IDs, only snapshots that have the specified IDs are returned. If you specify an invalid snapshot ID, a fault is returned. If you specify a snapshot ID for which you do not have access, it will not be included in the returned results. If you specify one or more snapshot owners, only snapshots from the specified owners and for which you have access are returned. The results can include the AWS Account IDs of the specified owners, amazon for snapshots owned by Amazon or self for snapshots that you own. If you specify a list of restorable users, only users that have create snapshot permissions for the snapshots are returned. You can specify AWS Account IDs (if you own the snapshot(s)), self for snapshots for which you own or have explicit permissions, or all for public snapshots.Permission Description public The owner of the snapshot granted create volume permissions for the snapshot to the all group. All users have create volume permissions for these snapshots. explicit The owner of the snapshot granted create volume permissions to a specific user. implicit A user has implicit create volume permissions for all snapshots he or she owns. - Parameters:
region- Snapshots are tied to Regions and can only be used for volumes within the same Region.options- specify the snapshot ids or other parameters to clarify the list.- Returns:
- matching snapshots.
- See Also:
-
describeSnapshotsInRegionWithFilter
@Named("DescribeSnapshots") @POST @Path("/") Set<Snapshot> describeSnapshotsInRegionWithFilter(@Nullable String region, com.google.common.collect.Multimap<String, String> filter, DescribeSnapshotsOptions... options) Returns information about EBS snapshots matching the given filters.- Parameters:
region- Snapshots are tied to Regions and can only be used for volumes within the same Region.filter- Multimap of filter key/values.options- specify the snapshot ids or other parameters to clarify the list.- Returns:
- matching snapshots.
- See Also:
-
deleteSnapshotInRegion
@Named("DeleteSnapshot") @POST @Path("/") void deleteSnapshotInRegion(@Nullable String region, @FormParam("SnapshotId") String snapshotId) Deletes a snapshot of an Amazon EBS volume that you own. For more information, go to the Amazon Elastic Compute Cloud Developer Guide or Amazon Elastic Compute Cloud User Guide.- Parameters:
region- Snapshots are tied to Regions and can only be used for volumes within the same Region.snapshotId- The ID of the Amazon EBS snapshot to delete.- See Also:
-
addCreateVolumePermissionsToSnapshotInRegion
@Named("ModifySnapshotAttribute") @POST @Path("/") void addCreateVolumePermissionsToSnapshotInRegion(@Nullable String region, Iterable<String> userIds, Iterable<String> userGroups, @FormParam("SnapshotId") String snapshotId) AddscreateVolumePermissions to an EBS snapshot.- Parameters:
region- Snapshots are tied to Regions and can only be used for volumes within the same Region.userIds- AWS Access Key ID.userGroups- Name of the groups. Currently supports \"all.\""snapshotId- The ID of the Amazon EBS snapshot.- See Also:
-
removeCreateVolumePermissionsFromSnapshotInRegion
@Named("ModifySnapshotAttribute") @POST @Path("/") void removeCreateVolumePermissionsFromSnapshotInRegion(@Nullable String region, Iterable<String> userIds, Iterable<String> userGroups, @FormParam("SnapshotId") String snapshotId) RemovescreateVolumePermissions from an EBS snapshot.- Parameters:
region- Snapshots are tied to Regions and can only be used for volumes within the same Region.userIds- AWS Access Key ID.userGroups- Name of the groups. Currently supports \"all.\""snapshotId- The ID of the Amazon EBS snapshot.- See Also:
-
getCreateVolumePermissionForSnapshotInRegion
@Named("DescribeSnapshotAttribute") @POST @Path("/") Permission getCreateVolumePermissionForSnapshotInRegion(@Nullable String region, @FormParam("SnapshotId") String snapshotId) Returns thePermissions of an snapshot.- Parameters:
region- AMIs are tied to the Region where its files are located within Amazon S3.snapshotId- The ID of the AMI for which an attribute will be described- See Also:
-
resetCreateVolumePermissionsOnSnapshotInRegion
@Named("ResetSnapshotAttribute") @POST @Path("/") void resetCreateVolumePermissionsOnSnapshotInRegion(@Nullable String region, @FormParam("SnapshotId") String snapshotId) Resets thecreateVolumePermissions on an EBS snapshot.- Parameters:
region- Snapshots are tied to Regions and can only be used for volumes within the same Region.snapshotId- The ID of the Amazon EBS snapshot.- See Also:
-