public class RegisterImageRequest extends AmazonWebServiceRequest implements java.io.Serializable, DryRunSupportedRequest<RegisterImageRequest>
RegisterImage operation
.
Registers an AMI. When you're creating an AMI, this is the final step you must complete before you can launch an instance from the AMI. For more information about creating AMIs, see Creating Your Own AMIs in the Amazon Elastic Compute Cloud User Guide .
NOTE: For Amazon EBS-backed instances, CreateImage creates and registers the AMI in a single request, so you don't have to register the AMI yourself.
You can also use RegisterImage
to create an Amazon
EBS-backed Linux AMI from a snapshot of a root device volume. For more
information, see
Launching an Instance from a Snapshot
in the Amazon Elastic Compute Cloud User Guide .
IMPORTANT: Some Linux distributions, such as Red Hat Enterprise Linux (RHEL) and SUSE Linux Enterprise Server (SLES), use the EC2 billingProduct code associated with an AMI to verify subscription status for package updates. Creating an AMI from an EBS snapshot does not maintain this billing code, and subsequent instances launched from such an AMI will not be able to connect to package update infrastructure. Similarly, although you can create a Windows AMI from a snapshot, you can't successfully launch an instance from the AMI. To create Windows AMIs or to create AMIs for Linux operating systems that must retain AMI billing codes to work properly, see CreateImage.
If needed, you can deregister an AMI at any time. Any modifications you make to an AMI backed by an instance store volume invalidates its registration. If you make changes to an image, deregister the previous image and register the new image.
NOTE: You can't register an image where a secondary (non-root) snapshot has AWS Marketplace product codes.
Constructor and Description |
---|
RegisterImageRequest()
Default constructor for a new RegisterImageRequest object.
|
RegisterImageRequest(java.lang.String imageLocation)
Constructs a new RegisterImageRequest object.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getArchitecture()
The architecture of the AMI.
|
java.util.List<BlockDeviceMapping> |
getBlockDeviceMappings()
One or more block device mapping entries.
|
java.lang.String |
getDescription()
A description for your AMI.
|
Request<RegisterImageRequest> |
getDryRunRequest()
This method is intended for internal use only.
|
java.lang.String |
getImageLocation()
The full path to your AMI manifest in Amazon S3 storage.
|
java.lang.String |
getKernelId()
The ID of the kernel.
|
java.lang.String |
getName()
A name for your AMI.
|
java.lang.String |
getRamdiskId()
The ID of the RAM disk.
|
java.lang.String |
getRootDeviceName()
The name of the root device (for example,
/dev/sda1 , or
/dev/xvda ). |
java.lang.String |
getSriovNetSupport()
Set to
simple to enable enhanced networking for the AMI
and any instances that you launch from the AMI. |
java.lang.String |
getVirtualizationType()
The type of virtualization.
|
int |
hashCode() |
void |
setArchitecture(ArchitectureValues architecture)
The architecture of the AMI.
|
void |
setArchitecture(java.lang.String architecture)
The architecture of the AMI.
|
void |
setBlockDeviceMappings(java.util.Collection<BlockDeviceMapping> blockDeviceMappings)
One or more block device mapping entries.
|
void |
setDescription(java.lang.String description)
A description for your AMI.
|
void |
setImageLocation(java.lang.String imageLocation)
The full path to your AMI manifest in Amazon S3 storage.
|
void |
setKernelId(java.lang.String kernelId)
The ID of the kernel.
|
void |
setName(java.lang.String name)
A name for your AMI.
|
void |
setRamdiskId(java.lang.String ramdiskId)
The ID of the RAM disk.
|
void |
setRootDeviceName(java.lang.String rootDeviceName)
The name of the root device (for example,
/dev/sda1 , or
/dev/xvda ). |
void |
setSriovNetSupport(java.lang.String sriovNetSupport)
Set to
simple to enable enhanced networking for the AMI
and any instances that you launch from the AMI. |
void |
setVirtualizationType(java.lang.String virtualizationType)
The type of virtualization.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
RegisterImageRequest |
withArchitecture(ArchitectureValues architecture)
The architecture of the AMI.
|
RegisterImageRequest |
withArchitecture(java.lang.String architecture)
The architecture of the AMI.
|
RegisterImageRequest |
withBlockDeviceMappings(BlockDeviceMapping... blockDeviceMappings)
One or more block device mapping entries.
|
RegisterImageRequest |
withBlockDeviceMappings(java.util.Collection<BlockDeviceMapping> blockDeviceMappings)
One or more block device mapping entries.
|
RegisterImageRequest |
withDescription(java.lang.String description)
A description for your AMI.
|
RegisterImageRequest |
withImageLocation(java.lang.String imageLocation)
The full path to your AMI manifest in Amazon S3 storage.
|
RegisterImageRequest |
withKernelId(java.lang.String kernelId)
The ID of the kernel.
|
RegisterImageRequest |
withName(java.lang.String name)
A name for your AMI.
|
RegisterImageRequest |
withRamdiskId(java.lang.String ramdiskId)
The ID of the RAM disk.
|
RegisterImageRequest |
withRootDeviceName(java.lang.String rootDeviceName)
The name of the root device (for example,
/dev/sda1 , or
/dev/xvda ). |
RegisterImageRequest |
withSriovNetSupport(java.lang.String sriovNetSupport)
Set to
simple to enable enhanced networking for the AMI
and any instances that you launch from the AMI. |
RegisterImageRequest |
withVirtualizationType(java.lang.String virtualizationType)
The type of virtualization.
|
clone, getCloneRoot, getCloneSource, getGeneralProgressListener, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setGeneralProgressListener, setRequestCredentials, setRequestMetricCollector, withGeneralProgressListener, withRequestMetricCollector
public RegisterImageRequest()
public RegisterImageRequest(java.lang.String imageLocation)
imageLocation
- The full path to your AMI manifest in Amazon S3
storage.public java.lang.String getImageLocation()
public void setImageLocation(java.lang.String imageLocation)
imageLocation
- The full path to your AMI manifest in Amazon S3 storage.public RegisterImageRequest withImageLocation(java.lang.String imageLocation)
Returns a reference to this object so that method calls can be chained together.
imageLocation
- The full path to your AMI manifest in Amazon S3 storage.public java.lang.String getName()
Constraints: 3-128 alphanumeric characters, parentheses (()), square brackets ([]), spaces ( ), periods (.), slashes (/), dashes (-), single quotes ('), at-signs (@), or underscores(_)
Constraints: 3-128 alphanumeric characters, parentheses (()), square brackets ([]), spaces ( ), periods (.), slashes (/), dashes (-), single quotes ('), at-signs (@), or underscores(_)
public void setName(java.lang.String name)
Constraints: 3-128 alphanumeric characters, parentheses (()), square brackets ([]), spaces ( ), periods (.), slashes (/), dashes (-), single quotes ('), at-signs (@), or underscores(_)
name
- A name for your AMI. Constraints: 3-128 alphanumeric characters, parentheses (()), square brackets ([]), spaces ( ), periods (.), slashes (/), dashes (-), single quotes ('), at-signs (@), or underscores(_)
public RegisterImageRequest withName(java.lang.String name)
Constraints: 3-128 alphanumeric characters, parentheses (()), square brackets ([]), spaces ( ), periods (.), slashes (/), dashes (-), single quotes ('), at-signs (@), or underscores(_)
Returns a reference to this object so that method calls can be chained together.
name
- A name for your AMI. Constraints: 3-128 alphanumeric characters, parentheses (()), square brackets ([]), spaces ( ), periods (.), slashes (/), dashes (-), single quotes ('), at-signs (@), or underscores(_)
public java.lang.String getDescription()
public void setDescription(java.lang.String description)
description
- A description for your AMI.public RegisterImageRequest withDescription(java.lang.String description)
Returns a reference to this object so that method calls can be chained together.
description
- A description for your AMI.public java.lang.String getArchitecture()
Default: For Amazon EBS-backed AMIs,
i386
. For instance store-backed AMIs, the architecture
specified in the manifest file.
Constraints:
Allowed Values: i386, x86_64
Default: For Amazon EBS-backed AMIs,
i386
. For instance store-backed AMIs, the architecture
specified in the manifest file.
ArchitectureValues
public void setArchitecture(java.lang.String architecture)
Default: For Amazon EBS-backed AMIs,
i386
. For instance store-backed AMIs, the architecture
specified in the manifest file.
Constraints:
Allowed Values: i386, x86_64
architecture
- The architecture of the AMI. Default: For Amazon EBS-backed AMIs,
i386
. For instance store-backed AMIs, the architecture
specified in the manifest file.
ArchitectureValues
public RegisterImageRequest withArchitecture(java.lang.String architecture)
Default: For Amazon EBS-backed AMIs,
i386
. For instance store-backed AMIs, the architecture
specified in the manifest file.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: i386, x86_64
architecture
- The architecture of the AMI. Default: For Amazon EBS-backed AMIs,
i386
. For instance store-backed AMIs, the architecture
specified in the manifest file.
ArchitectureValues
public void setArchitecture(ArchitectureValues architecture)
Default: For Amazon EBS-backed AMIs,
i386
. For instance store-backed AMIs, the architecture
specified in the manifest file.
Constraints:
Allowed Values: i386, x86_64
architecture
- The architecture of the AMI. Default: For Amazon EBS-backed AMIs,
i386
. For instance store-backed AMIs, the architecture
specified in the manifest file.
ArchitectureValues
public RegisterImageRequest withArchitecture(ArchitectureValues architecture)
Default: For Amazon EBS-backed AMIs,
i386
. For instance store-backed AMIs, the architecture
specified in the manifest file.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: i386, x86_64
architecture
- The architecture of the AMI. Default: For Amazon EBS-backed AMIs,
i386
. For instance store-backed AMIs, the architecture
specified in the manifest file.
ArchitectureValues
public java.lang.String getKernelId()
public void setKernelId(java.lang.String kernelId)
kernelId
- The ID of the kernel.public RegisterImageRequest withKernelId(java.lang.String kernelId)
Returns a reference to this object so that method calls can be chained together.
kernelId
- The ID of the kernel.public java.lang.String getRamdiskId()
public void setRamdiskId(java.lang.String ramdiskId)
ramdiskId
- The ID of the RAM disk.public RegisterImageRequest withRamdiskId(java.lang.String ramdiskId)
Returns a reference to this object so that method calls can be chained together.
ramdiskId
- The ID of the RAM disk.public java.lang.String getRootDeviceName()
/dev/sda1
, or
/dev/xvda
)./dev/sda1
, or
/dev/xvda
).public void setRootDeviceName(java.lang.String rootDeviceName)
/dev/sda1
, or
/dev/xvda
).rootDeviceName
- The name of the root device (for example, /dev/sda1
, or
/dev/xvda
).public RegisterImageRequest withRootDeviceName(java.lang.String rootDeviceName)
/dev/sda1
, or
/dev/xvda
).
Returns a reference to this object so that method calls can be chained together.
rootDeviceName
- The name of the root device (for example, /dev/sda1
, or
/dev/xvda
).public java.util.List<BlockDeviceMapping> getBlockDeviceMappings()
public void setBlockDeviceMappings(java.util.Collection<BlockDeviceMapping> blockDeviceMappings)
blockDeviceMappings
- One or more block device mapping entries.public RegisterImageRequest withBlockDeviceMappings(BlockDeviceMapping... blockDeviceMappings)
Returns a reference to this object so that method calls can be chained together.
blockDeviceMappings
- One or more block device mapping entries.public RegisterImageRequest withBlockDeviceMappings(java.util.Collection<BlockDeviceMapping> blockDeviceMappings)
Returns a reference to this object so that method calls can be chained together.
blockDeviceMappings
- One or more block device mapping entries.public java.lang.String getVirtualizationType()
Default: paravirtual
Default: paravirtual
public void setVirtualizationType(java.lang.String virtualizationType)
Default: paravirtual
virtualizationType
- The type of virtualization. Default: paravirtual
public RegisterImageRequest withVirtualizationType(java.lang.String virtualizationType)
Default: paravirtual
Returns a reference to this object so that method calls can be chained together.
virtualizationType
- The type of virtualization. Default: paravirtual
public java.lang.String getSriovNetSupport()
simple
to enable enhanced networking for the AMI
and any instances that you launch from the AMI. There is no way to disable enhanced networking at this time.
This option is supported only for HVM AMIs. Specifying this option with a PV AMI can make instances launched from the AMI unreachable.
simple
to enable enhanced networking for the AMI
and any instances that you launch from the AMI. There is no way to disable enhanced networking at this time.
This option is supported only for HVM AMIs. Specifying this option with a PV AMI can make instances launched from the AMI unreachable.
public void setSriovNetSupport(java.lang.String sriovNetSupport)
simple
to enable enhanced networking for the AMI
and any instances that you launch from the AMI. There is no way to disable enhanced networking at this time.
This option is supported only for HVM AMIs. Specifying this option with a PV AMI can make instances launched from the AMI unreachable.
sriovNetSupport
- Set to simple
to enable enhanced networking for the AMI
and any instances that you launch from the AMI. There is no way to disable enhanced networking at this time.
This option is supported only for HVM AMIs. Specifying this option with a PV AMI can make instances launched from the AMI unreachable.
public RegisterImageRequest withSriovNetSupport(java.lang.String sriovNetSupport)
simple
to enable enhanced networking for the AMI
and any instances that you launch from the AMI. There is no way to disable enhanced networking at this time.
This option is supported only for HVM AMIs. Specifying this option with a PV AMI can make instances launched from the AMI unreachable.
Returns a reference to this object so that method calls can be chained together.
sriovNetSupport
- Set to simple
to enable enhanced networking for the AMI
and any instances that you launch from the AMI. There is no way to disable enhanced networking at this time.
This option is supported only for HVM AMIs. Specifying this option with a PV AMI can make instances launched from the AMI unreachable.
public Request<RegisterImageRequest> getDryRunRequest()
getDryRunRequest
in interface DryRunSupportedRequest<RegisterImageRequest>
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Copyright © 2018 Amazon Web Services, Inc. All Rights Reserved.