com.amazonaws.services.ec2.model
Class RegisterImageRequest

java.lang.Object
  extended by com.amazonaws.AmazonWebServiceRequest
      extended by com.amazonaws.services.ec2.model.RegisterImageRequest
All Implemented Interfaces:
DryRunSupportedRequest<RegisterImageRequest>, java.io.Serializable

public class RegisterImageRequest
extends AmazonWebServiceRequest
implements java.io.Serializable, DryRunSupportedRequest<RegisterImageRequest>

Container for the parameters to the 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 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 .

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.

See Also:
AmazonEC2.registerImage(RegisterImageRequest), Serialized Form

Constructor Summary
RegisterImageRequest()
          Default constructor for a new RegisterImageRequest object.
RegisterImageRequest(java.lang.String imageLocation)
          Constructs a new RegisterImageRequest object.
 
Method Summary
 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 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 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 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.
 
Methods inherited from class com.amazonaws.AmazonWebServiceRequest
copyPrivateRequestParameters, getDelegationToken, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setDelegationToken, setRequestCredentials, setRequestMetricCollector, withRequestMetricCollector
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RegisterImageRequest

public RegisterImageRequest()
Default constructor for a new RegisterImageRequest object. Callers should use the setter or fluent setter (with...) methods to initialize this object after creating it.


RegisterImageRequest

public RegisterImageRequest(java.lang.String imageLocation)
Constructs a new RegisterImageRequest object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.

Parameters:
imageLocation - The full path to your AMI manifest in Amazon S3 storage.
Method Detail

getImageLocation

public java.lang.String getImageLocation()
The full path to your AMI manifest in Amazon S3 storage.

Returns:
The full path to your AMI manifest in Amazon S3 storage.

setImageLocation

public void setImageLocation(java.lang.String imageLocation)
The full path to your AMI manifest in Amazon S3 storage.

Parameters:
imageLocation - The full path to your AMI manifest in Amazon S3 storage.

withImageLocation

public RegisterImageRequest withImageLocation(java.lang.String imageLocation)
The full path to your AMI manifest in Amazon S3 storage.

Returns a reference to this object so that method calls can be chained together.

Parameters:
imageLocation - The full path to your AMI manifest in Amazon S3 storage.
Returns:
A reference to this updated object so that method calls can be chained together.

getName

public java.lang.String getName()
A name for your AMI.

Constraints: 3-128 alphanumeric characters, parenthesis (()), commas (,), slashes (/), dashes (-), or underscores (_)

Returns:
A name for your AMI.

Constraints: 3-128 alphanumeric characters, parenthesis (()), commas (,), slashes (/), dashes (-), or underscores (_)


setName

public void setName(java.lang.String name)
A name for your AMI.

Constraints: 3-128 alphanumeric characters, parenthesis (()), commas (,), slashes (/), dashes (-), or underscores (_)

Parameters:
name - A name for your AMI.

Constraints: 3-128 alphanumeric characters, parenthesis (()), commas (,), slashes (/), dashes (-), or underscores (_)


withName

public RegisterImageRequest withName(java.lang.String name)
A name for your AMI.

Constraints: 3-128 alphanumeric characters, parenthesis (()), commas (,), slashes (/), dashes (-), or underscores (_)

Returns a reference to this object so that method calls can be chained together.

Parameters:
name - A name for your AMI.

Constraints: 3-128 alphanumeric characters, parenthesis (()), commas (,), slashes (/), dashes (-), or underscores (_)

Returns:
A reference to this updated object so that method calls can be chained together.

getDescription

public java.lang.String getDescription()
A description for your AMI.

Returns:
A description for your AMI.

setDescription

public void setDescription(java.lang.String description)
A description for your AMI.

Parameters:
description - A description for your AMI.

withDescription

public RegisterImageRequest withDescription(java.lang.String description)
A description for your AMI.

Returns a reference to this object so that method calls can be chained together.

Parameters:
description - A description for your AMI.
Returns:
A reference to this updated object so that method calls can be chained together.

getArchitecture

public java.lang.String getArchitecture()
The architecture of the AMI.

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

Returns:
The architecture of the AMI.

Default: For Amazon EBS-backed AMIs, i386. For instance store-backed AMIs, the architecture specified in the manifest file.

See Also:
ArchitectureValues

setArchitecture

public void setArchitecture(java.lang.String 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.

Constraints:
Allowed Values: i386, x86_64

Parameters:
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.

See Also:
ArchitectureValues

withArchitecture

public RegisterImageRequest withArchitecture(java.lang.String 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.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Allowed Values: i386, x86_64

Parameters:
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.

Returns:
A reference to this updated object so that method calls can be chained together.
See Also:
ArchitectureValues

setArchitecture

public void setArchitecture(ArchitectureValues 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.

Constraints:
Allowed Values: i386, x86_64

Parameters:
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.

See Also:
ArchitectureValues

withArchitecture

public RegisterImageRequest withArchitecture(ArchitectureValues 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.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Allowed Values: i386, x86_64

Parameters:
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.

Returns:
A reference to this updated object so that method calls can be chained together.
See Also:
ArchitectureValues

getKernelId

public java.lang.String getKernelId()
The ID of the kernel.

Returns:
The ID of the kernel.

setKernelId

public void setKernelId(java.lang.String kernelId)
The ID of the kernel.

Parameters:
kernelId - The ID of the kernel.

withKernelId

public RegisterImageRequest withKernelId(java.lang.String kernelId)
The ID of the kernel.

Returns a reference to this object so that method calls can be chained together.

Parameters:
kernelId - The ID of the kernel.
Returns:
A reference to this updated object so that method calls can be chained together.

getRamdiskId

public java.lang.String getRamdiskId()
The ID of the RAM disk.

Returns:
The ID of the RAM disk.

setRamdiskId

public void setRamdiskId(java.lang.String ramdiskId)
The ID of the RAM disk.

Parameters:
ramdiskId - The ID of the RAM disk.

withRamdiskId

public RegisterImageRequest withRamdiskId(java.lang.String ramdiskId)
The ID of the RAM disk.

Returns a reference to this object so that method calls can be chained together.

Parameters:
ramdiskId - The ID of the RAM disk.
Returns:
A reference to this updated object so that method calls can be chained together.

getRootDeviceName

public java.lang.String getRootDeviceName()
The name of the root device (for example, /dev/sda1, or xvda).

Returns:
The name of the root device (for example, /dev/sda1, or xvda).

setRootDeviceName

public void setRootDeviceName(java.lang.String rootDeviceName)
The name of the root device (for example, /dev/sda1, or xvda).

Parameters:
rootDeviceName - The name of the root device (for example, /dev/sda1, or xvda).

withRootDeviceName

public RegisterImageRequest withRootDeviceName(java.lang.String rootDeviceName)
The name of the root device (for example, /dev/sda1, or xvda).

Returns a reference to this object so that method calls can be chained together.

Parameters:
rootDeviceName - The name of the root device (for example, /dev/sda1, or xvda).
Returns:
A reference to this updated object so that method calls can be chained together.

getBlockDeviceMappings

public java.util.List<BlockDeviceMapping> getBlockDeviceMappings()
One or more block device mapping entries.

Returns:
One or more block device mapping entries.

setBlockDeviceMappings

public void setBlockDeviceMappings(java.util.Collection<BlockDeviceMapping> blockDeviceMappings)
One or more block device mapping entries.

Parameters:
blockDeviceMappings - One or more block device mapping entries.

withBlockDeviceMappings

public RegisterImageRequest withBlockDeviceMappings(BlockDeviceMapping... blockDeviceMappings)
One or more block device mapping entries.

Returns a reference to this object so that method calls can be chained together.

Parameters:
blockDeviceMappings - One or more block device mapping entries.
Returns:
A reference to this updated object so that method calls can be chained together.

withBlockDeviceMappings

public RegisterImageRequest withBlockDeviceMappings(java.util.Collection<BlockDeviceMapping> blockDeviceMappings)
One or more block device mapping entries.

Returns a reference to this object so that method calls can be chained together.

Parameters:
blockDeviceMappings - One or more block device mapping entries.
Returns:
A reference to this updated object so that method calls can be chained together.

getVirtualizationType

public java.lang.String getVirtualizationType()
The type of virtualization.

Default: paravirtual

Returns:
The type of virtualization.

Default: paravirtual


setVirtualizationType

public void setVirtualizationType(java.lang.String virtualizationType)
The type of virtualization.

Default: paravirtual

Parameters:
virtualizationType - The type of virtualization.

Default: paravirtual


withVirtualizationType

public RegisterImageRequest withVirtualizationType(java.lang.String virtualizationType)
The type of virtualization.

Default: paravirtual

Returns a reference to this object so that method calls can be chained together.

Parameters:
virtualizationType - The type of virtualization.

Default: paravirtual

Returns:
A reference to this updated object so that method calls can be chained together.

getSriovNetSupport

public java.lang.String getSriovNetSupport()
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.

Returns:
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.


setSriovNetSupport

public 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.

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.

Parameters:
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.


withSriovNetSupport

public 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.

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.

Parameters:
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.

Returns:
A reference to this updated object so that method calls can be chained together.

getDryRunRequest

public Request<RegisterImageRequest> getDryRunRequest()
This method is intended for internal use only. Returns the marshaled request configured with additional parameters to enable operation dry-run.

Specified by:
getDryRunRequest in interface DryRunSupportedRequest<RegisterImageRequest>

toString

public java.lang.String toString()
Returns a string representation of this object; useful for testing and debugging.

Overrides:
toString in class java.lang.Object
Returns:
A string representation of this object.
See Also:
Object.toString()

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object


Copyright © 2010 Amazon Web Services, Inc. All Rights Reserved.