Package org.jclouds.ec2.features
Interface ElasticBlockStoreApi
-
public interface ElasticBlockStoreApi
Provides access to EC2 Elastic Block Store services via their REST API.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addCreateVolumePermissionsToSnapshotInRegion(String region, Iterable<String> userIds, Iterable<String> userGroups, String snapshotId)
AddscreateVolumePermission
s to an EBS snapshot.Attachment
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.Snapshot
createSnapshotInRegion(String region, String volumeId, CreateSnapshotOptions... options)
Creates a snapshot of an Amazon EBS volume and stores it in Amazon S3.Volume
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.Volume
createVolumeFromSnapshotInAvailabilityZone(String availabilityZone, String snapshotId)
Creates a new Amazon EBS volume to which any Amazon EC2 instance can attach within the same Availability Zone.Volume
createVolumeInAvailabilityZone(String availabilityZone, int size)
Creates a new Amazon EBS volume to which any Amazon EC2 instance can attach within the same Availability Zone.Volume
createVolumeInAvailabilityZone(String availabilityZone, CreateVolumeOptions... options)
Creates a new Amazon EBS volume to which any Amazon EC2 instance can attach within the same Availability Zone.void
deleteSnapshotInRegion(String region, String snapshotId)
Deletes a snapshot of an Amazon EBS volume that you own.void
deleteVolumeInRegion(String region, String volumeId)
Deletes an Amazon EBS volume that you own.Set<Snapshot>
describeSnapshotsInRegion(String region, DescribeSnapshotsOptions... options)
Returns information about Amazon EBS snapshots available to the user.Set<Snapshot>
describeSnapshotsInRegionWithFilter(String region, com.google.common.collect.Multimap<String,String> filter, DescribeSnapshotsOptions... options)
Returns information about EBS snapshots matching the given filters.Set<Volume>
describeVolumesInRegion(String region, String... volumeIds)
Describes the specified Amazon EBS volumes that you own.Set<Volume>
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.void
detachVolumeInRegion(String region, String volumeId, boolean force, DetachVolumeOptions... options)
Attaches an Amazon EBS volume to a running instance and exposes it as the specified device.Permission
getCreateVolumePermissionForSnapshotInRegion(String region, String snapshotId)
Returns thePermission
s of an snapshot.void
removeCreateVolumePermissionsFromSnapshotInRegion(String region, Iterable<String> userIds, Iterable<String> userGroups, String snapshotId)
RemovescreateVolumePermission
s from an EBS snapshot.void
resetCreateVolumePermissionsOnSnapshotInRegion(String region, String snapshotId)
Resets thecreateVolumePermission
s on an EBS snapshot.
-
-
-
Method Detail
-
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:
describeVolumesInRegion(java.lang.String, java.lang.String...)
,deleteVolumeInRegion(java.lang.String, java.lang.String)
,attachVolumeInRegion(java.lang.String, java.lang.String, java.lang.String, java.lang.String)
,detachVolumeInRegion(java.lang.String, java.lang.String, boolean, org.jclouds.ec2.options.DetachVolumeOptions...)
,AvailabilityZoneAndRegionApi.describeAvailabilityZonesInRegion(java.lang.String, org.jclouds.ec2.options.DescribeAvailabilityZonesOptions...)
,
-
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:
createVolumeFromSnapshotInAvailabilityZone(java.lang.String, java.lang.String)
,describeVolumesInRegion(java.lang.String, java.lang.String...)
,deleteVolumeInRegion(java.lang.String, java.lang.String)
,attachVolumeInRegion(java.lang.String, java.lang.String, java.lang.String, java.lang.String)
,detachVolumeInRegion(java.lang.String, java.lang.String, boolean, org.jclouds.ec2.options.DetachVolumeOptions...)
,AvailabilityZoneAndRegionApi.describeAvailabilityZonesInRegion(java.lang.String, org.jclouds.ec2.options.DescribeAvailabilityZonesOptions...)
,
-
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:
describeVolumesInRegion(java.lang.String, java.lang.String...)
,deleteVolumeInRegion(java.lang.String, java.lang.String)
,attachVolumeInRegion(java.lang.String, java.lang.String, java.lang.String, java.lang.String)
,detachVolumeInRegion(java.lang.String, java.lang.String, boolean, org.jclouds.ec2.options.DetachVolumeOptions...)
,AvailabilityZoneAndRegionApi.describeAvailabilityZonesInRegion(java.lang.String, org.jclouds.ec2.options.DescribeAvailabilityZonesOptions...)
,
-
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(java.lang.String, java.lang.String...)
,deleteVolumeInRegion(java.lang.String, java.lang.String)
,attachVolumeInRegion(java.lang.String, java.lang.String, java.lang.String, java.lang.String)
,detachVolumeInRegion(java.lang.String, java.lang.String, boolean, org.jclouds.ec2.options.DetachVolumeOptions...)
,AvailabilityZoneAndRegionApi.describeAvailabilityZonesInRegion(java.lang.String, org.jclouds.ec2.options.DescribeAvailabilityZonesOptions...)
,
-
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:
createSnapshotInRegion(java.lang.String, java.lang.String, org.jclouds.ec2.options.CreateSnapshotOptions...)
,#describeSnapshotInRegion
,
-
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:
createSnapshotInRegion(java.lang.String, java.lang.String, org.jclouds.ec2.options.CreateSnapshotOptions...)
,#describeSnapshotInRegion
,
-
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:
describeVolumesInRegion(java.lang.String, java.lang.String...)
,#createVolumeInRegion
,attachVolumeInRegion(java.lang.String, java.lang.String, java.lang.String, java.lang.String)
,detachVolumeInRegion(java.lang.String, java.lang.String, boolean, org.jclouds.ec2.options.DetachVolumeOptions...)
,
-
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:
describeVolumesInRegion(java.lang.String, java.lang.String...)
,#createVolumeInRegion
,attachVolumeInRegion(java.lang.String, java.lang.String, java.lang.String, java.lang.String)
,deleteVolumeInRegion(java.lang.String, java.lang.String)
,
-
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:
describeVolumesInRegion(java.lang.String, java.lang.String...)
,#createVolumeInRegion
,detachVolumeInRegion(java.lang.String, java.lang.String, boolean, org.jclouds.ec2.options.DetachVolumeOptions...)
,deleteVolumeInRegion(java.lang.String, java.lang.String)
,
-
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(java.lang.String, org.jclouds.ec2.options.DescribeSnapshotsOptions...)
,deleteSnapshotInRegion(java.lang.String, java.lang.String)
,
-
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: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:
#createSnapshotsInRegion
,deleteSnapshotInRegion(java.lang.String, java.lang.String)
,
-
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:
describeSnapshotsInRegion(java.lang.String, org.jclouds.ec2.options.DescribeSnapshotsOptions...)
,#createSnapshotsInRegion
,deleteSnapshotInRegion(java.lang.String, java.lang.String)
,
-
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:
createSnapshotInRegion(java.lang.String, java.lang.String, org.jclouds.ec2.options.CreateSnapshotOptions...)
,deleteSnapshotInRegion(java.lang.String, java.lang.String)
,
-
addCreateVolumePermissionsToSnapshotInRegion
@Named("ModifySnapshotAttribute") @POST @Path("/") void addCreateVolumePermissionsToSnapshotInRegion(@Nullable String region, Iterable<String> userIds, Iterable<String> userGroups, @FormParam("SnapshotId") String snapshotId)
AddscreateVolumePermission
s 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:
#removeCreateVolumePermissionsFromSnapshot
,#describeSnapshotAttribute
,#resetSnapshotAttribute
,
-
removeCreateVolumePermissionsFromSnapshotInRegion
@Named("ModifySnapshotAttribute") @POST @Path("/") void removeCreateVolumePermissionsFromSnapshotInRegion(@Nullable String region, Iterable<String> userIds, Iterable<String> userGroups, @FormParam("SnapshotId") String snapshotId)
RemovescreateVolumePermission
s 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:
#addCreateVolumePermissionsToSnapshot
,#describeSnapshotAttribute
,#resetSnapshotAttribute
,
-
getCreateVolumePermissionForSnapshotInRegion
@Named("DescribeSnapshotAttribute") @POST @Path("/") Permission getCreateVolumePermissionForSnapshotInRegion(@Nullable String region, @FormParam("SnapshotId") String snapshotId)
Returns thePermission
s 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:
#describeSnapshots
,#modifySnapshotAttribute
,#resetSnapshotAttribute
, ,DescribeSnapshotsOptions
-
-