Package org.jclouds.ec2.options
Class RegisterImageBackedByEbsOptions
java.lang.Object
org.jclouds.http.options.BaseHttpRequestOptions
org.jclouds.ec2.options.internal.BaseEC2RequestOptions
org.jclouds.ec2.options.RegisterImageOptions
org.jclouds.ec2.options.RegisterImageBackedByEbsOptions
- All Implemented Interfaces:
HttpRequestOptions
Contains options supported in the Form API for the RegisterImage operation.
Usage
The recommended way to instantiate a RegisterImageBackedByEbsOptions object is to statically import RegisterImageBackedByEbsOptions.Builder.* and invoke a static creation method followed by an instance mutator (if needed):
import static org.jclouds.ec2.options.RegisterImageBackedByEbsOptions.Builder.*
EC2Api connection = // get connection
String imageId = connection.getImageServices().registerImageBackedByEbs(...addEphemeralBlockDeviceFromSnapshot("/dev/sda2","virtual-1","snapshot-id"));
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class org.jclouds.http.options.BaseHttpRequestOptions
formParameters, headers, pathSuffix, payload, queryParameters
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddBlockDeviceFromSnapshot
(String deviceName, String virtualName, String snapshotId) adds a block device to the image from an ebs snapshot.addBlockDeviceFromSnapshot
(String deviceName, String virtualName, String snapshotId, boolean deleteOnTermination, String volumeType, Integer iops, boolean encrypted) adds a block device to the image from an ebs snapshot.addEphemeralBlockDeviceFromSnapshot
(String deviceName, String virtualName, String snapshotId) adds a block device to the image from an ebs snapshot.addNewBlockDevice
(String deviceName, String virtualName, int volumeSize) adds a new block device to the image.addNewBlockDevice
(String deviceName, String virtualName, int volumeSize, boolean deleteOnTermination, String volumeType, Integer iops, boolean encrypted) adds a new block device to the image.addNewEphemeralBlockDevice
(String deviceName, String virtualName, int volumeSize) adds a new block device to the image.asArchitecture
(Image.Architecture architecture) The architecture of the image.withDescription
(String info) The description of the AMI.withKernelId
(String kernelId) The ID of the kernel to select.withRamdisk
(String ramDiskId) The ID of the RAM disk to select.Methods inherited from class org.jclouds.ec2.options.internal.BaseEC2RequestOptions
getFormValuesWithKeysPrefixedBy, indexFormValuesWithPrefix, indexFormValuesWithPrefix, toString
Methods inherited from class org.jclouds.http.options.BaseHttpRequestOptions
buildFormParameters, buildPathSuffix, buildQueryParameters, buildRequestHeaders, buildStringPayload, equals, getFirstFormOrNull, getFirstHeaderOrNull, getFirstQueryOrNull, hashCode, replaceHeader
-
Constructor Details
-
RegisterImageBackedByEbsOptions
public RegisterImageBackedByEbsOptions()
-
-
Method Details
-
addEphemeralBlockDeviceFromSnapshot
public RegisterImageBackedByEbsOptions addEphemeralBlockDeviceFromSnapshot(String deviceName, @Nullable String virtualName, String snapshotId) adds a block device to the image from an ebs snapshot. This device is deleted on instance termination.- Parameters:
virtualName
- The virtual device name. (nullable)snapshotId
- The ID of the snapshot.name
- The device name (e.g., /dev/sdh).
-
addNewEphemeralBlockDevice
public RegisterImageBackedByEbsOptions addNewEphemeralBlockDevice(String deviceName, @Nullable String virtualName, int volumeSize) adds a new block device to the image. This device is deleted on instance termination.- Parameters:
virtualName
- The virtual device name.volumeSize
- The size of the volume, in GiBs.name
- The device name (e.g., /dev/sdh).
-
addBlockDeviceFromSnapshot
public RegisterImageBackedByEbsOptions addBlockDeviceFromSnapshot(String deviceName, @Nullable String virtualName, String snapshotId, boolean deleteOnTermination, @Nullable String volumeType, @Nullable Integer iops, boolean encrypted) adds a block device to the image from an ebs snapshot.- Parameters:
deviceName
- The device name (e.g., /dev/sdh).virtualName
- The virtual device name. (nullable)snapshotId
- The ID of the snapshot.deleteOnTermination
- Whether this volume should be automatically deleted on instance termination. Defaults to false.volumeType
- What EBS volume type should be used.iops
- EBS provisioned IOPS for this volume.encrypted
- Whether this volume should be encrypted.
-
addNewBlockDevice
public RegisterImageBackedByEbsOptions addNewBlockDevice(String deviceName, @Nullable String virtualName, int volumeSize, boolean deleteOnTermination, @Nullable String volumeType, @Nullable Integer iops, boolean encrypted) adds a new block device to the image.- Parameters:
deviceName
- The device name (e.g., /dev/sdh).virtualName
- The virtual device name. (nullable)volumeSize
- The size of the volume, in GiBs..deleteOnTermination
- Whether this volume should be automatically deleted on instance termination. Defaults to false.volumeType
- What EBS volume type should be used.iops
- EBS provisioned IOPS for this volume.encrypted
- Whether this volume should be encrypted.
-
addBlockDeviceFromSnapshot
public RegisterImageBackedByEbsOptions addBlockDeviceFromSnapshot(String deviceName, @Nullable String virtualName, String snapshotId) adds a block device to the image from an ebs snapshot. This device is retained on instance termination.- Parameters:
virtualName
- The virtual device name. (nullable)snapshotId
- The ID of the snapshot.name
- The device name (e.g., /dev/sdh).
-
addNewBlockDevice
public RegisterImageBackedByEbsOptions addNewBlockDevice(String deviceName, @Nullable String virtualName, int volumeSize) adds a new block device to the image. This device is retained on instance termination.- Parameters:
virtualName
- The virtual device name.volumeSize
- The size of the volume, in GiBs..name
- The device name (e.g., /dev/sdh).
-
asArchitecture
The architecture of the image.- Overrides:
asArchitecture
in classRegisterImageOptions
-
withDescription
The description of the AMI. "Up to 255 characters."- Overrides:
withDescription
in classRegisterImageOptions
-
withKernelId
The ID of the kernel to select.- Overrides:
withKernelId
in classRegisterImageOptions
-
withRamdisk
The ID of the RAM disk to select. Some kernels require additional drivers at launch. Check the kernel requirements for information on whether you need to specify a RAM disk. To find kernel requirements, refer to the Resource Center and search for the kernel ID.- Overrides:
withRamdisk
in classRegisterImageOptions
-