com.amazonaws.services.ec2.model
Class RegisterImageRequest

java.lang.Object
  extended by com.amazonaws.AmazonWebServiceRequest
      extended by com.amazonaws.services.ec2.model.RegisterImageRequest

public class RegisterImageRequest
extends AmazonWebServiceRequest

Container for the parameters to the RegisterImage operation.

The RegisterImage operation registers an AMI with Amazon EC2. Images must be registered before they can be launched. For more information, see RunInstances.

Each AMI is associated with an unique ID which is provided by the Amazon EC2 service through the RegisterImage operation. During registration, Amazon EC2 retrieves the specified image manifest from Amazon S3 and verifies that the image is owned by the user registering the image.

The image manifest is retrieved once and stored within the Amazon EC2. Any modifications to an image in Amazon S3 invalidates this registration. If you make changes to an image, deregister the previous image and register the new image. For more information, see DeregisterImage.

See Also:
AmazonEC2.registerImage(RegisterImageRequest)

Constructor Summary
RegisterImageRequest()
          Default constructor for a new RegisterImageRequest object.
RegisterImageRequest(String imageLocation)
          Constructs a new RegisterImageRequest object.
 
Method Summary
 boolean equals(Object obj)
           
 String getArchitecture()
          The architecture of the image.
 List<BlockDeviceMapping> getBlockDeviceMappings()
          The block device mappings for the new AMI, which specify how different block devices (ex: EBS volumes and ephemeral drives) will be exposed on instances launched from the new image.
 String getDescription()
          The description describing the new AMI.
 String getImageLocation()
          The full path to your AMI manifest in Amazon S3 storage.
 String getKernelId()
          The optional ID of a specific kernel to register with the new AMI.
 String getName()
          The name to give the new Amazon Machine Image.
 String getRamdiskId()
          The optional ID of a specific ramdisk to register with the new AMI.
 String getRootDeviceName()
          The root device name (e.g., /dev/sda1).
 int hashCode()
           
 void setArchitecture(String architecture)
          The architecture of the image.
 void setBlockDeviceMappings(Collection<BlockDeviceMapping> blockDeviceMappings)
          The block device mappings for the new AMI, which specify how different block devices (ex: EBS volumes and ephemeral drives) will be exposed on instances launched from the new image.
 void setDescription(String description)
          The description describing the new AMI.
 void setImageLocation(String imageLocation)
          The full path to your AMI manifest in Amazon S3 storage.
 void setKernelId(String kernelId)
          The optional ID of a specific kernel to register with the new AMI.
 void setName(String name)
          The name to give the new Amazon Machine Image.
 void setRamdiskId(String ramdiskId)
          The optional ID of a specific ramdisk to register with the new AMI.
 void setRootDeviceName(String rootDeviceName)
          The root device name (e.g., /dev/sda1).
 String toString()
          Returns a string representation of this object; useful for testing and debugging.
 RegisterImageRequest withArchitecture(String architecture)
          The architecture of the image.
 RegisterImageRequest withBlockDeviceMappings(BlockDeviceMapping... blockDeviceMappings)
          The block device mappings for the new AMI, which specify how different block devices (ex: EBS volumes and ephemeral drives) will be exposed on instances launched from the new image.
 RegisterImageRequest withBlockDeviceMappings(Collection<BlockDeviceMapping> blockDeviceMappings)
          The block device mappings for the new AMI, which specify how different block devices (ex: EBS volumes and ephemeral drives) will be exposed on instances launched from the new image.
 RegisterImageRequest withDescription(String description)
          The description describing the new AMI.
 RegisterImageRequest withImageLocation(String imageLocation)
          The full path to your AMI manifest in Amazon S3 storage.
 RegisterImageRequest withKernelId(String kernelId)
          The optional ID of a specific kernel to register with the new AMI.
 RegisterImageRequest withName(String name)
          The name to give the new Amazon Machine Image.
 RegisterImageRequest withRamdiskId(String ramdiskId)
          The optional ID of a specific ramdisk to register with the new AMI.
 RegisterImageRequest withRootDeviceName(String rootDeviceName)
          The root device name (e.g., /dev/sda1).
 
Methods inherited from class com.amazonaws.AmazonWebServiceRequest
copyPrivateRequestParameters, getDelegationToken, getRequestClientOptions, getRequestCredentials, setDelegationToken, setRequestCredentials
 
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(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 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(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(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 String getName()
The name to give the new Amazon Machine Image.

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

Returns:
The name to give the new Amazon Machine Image.

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


setName

public void setName(String name)
The name to give the new Amazon Machine Image.

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

Parameters:
name - The name to give the new Amazon Machine Image.

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


withName

public RegisterImageRequest withName(String name)
The name to give the new Amazon Machine Image.

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 - The name to give the new Amazon Machine Image.

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 String getDescription()
The description describing the new AMI.

Returns:
The description describing the new AMI.

setDescription

public void setDescription(String description)
The description describing the new AMI.

Parameters:
description - The description describing the new AMI.

withDescription

public RegisterImageRequest withDescription(String description)
The description describing the new AMI.

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

Parameters:
description - The description describing the new AMI.
Returns:
A reference to this updated object so that method calls can be chained together.

getArchitecture

public String getArchitecture()
The architecture of the image.

Valid Values: i386, x86_64

Returns:
The architecture of the image.

Valid Values: i386, x86_64


setArchitecture

public void setArchitecture(String architecture)
The architecture of the image.

Valid Values: i386, x86_64

Parameters:
architecture - The architecture of the image.

Valid Values: i386, x86_64


withArchitecture

public RegisterImageRequest withArchitecture(String architecture)
The architecture of the image.

Valid Values: i386, x86_64

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

Parameters:
architecture - The architecture of the image.

Valid Values: i386, x86_64

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

getKernelId

public String getKernelId()
The optional ID of a specific kernel to register with the new AMI.

Returns:
The optional ID of a specific kernel to register with the new AMI.

setKernelId

public void setKernelId(String kernelId)
The optional ID of a specific kernel to register with the new AMI.

Parameters:
kernelId - The optional ID of a specific kernel to register with the new AMI.

withKernelId

public RegisterImageRequest withKernelId(String kernelId)
The optional ID of a specific kernel to register with the new AMI.

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

Parameters:
kernelId - The optional ID of a specific kernel to register with the new AMI.
Returns:
A reference to this updated object so that method calls can be chained together.

getRamdiskId

public String getRamdiskId()
The optional ID of a specific ramdisk to register with the new AMI.

Some kernels require additional drivers at launch. Check the kernel requirements for information on whether you need to specify a RAM disk.

Returns:
The optional ID of a specific ramdisk to register with the new AMI.

Some kernels require additional drivers at launch. Check the kernel requirements for information on whether you need to specify a RAM disk.


setRamdiskId

public void setRamdiskId(String ramdiskId)
The optional ID of a specific ramdisk to register with the new AMI.

Some kernels require additional drivers at launch. Check the kernel requirements for information on whether you need to specify a RAM disk.

Parameters:
ramdiskId - The optional ID of a specific ramdisk to register with the new AMI.

Some kernels require additional drivers at launch. Check the kernel requirements for information on whether you need to specify a RAM disk.


withRamdiskId

public RegisterImageRequest withRamdiskId(String ramdiskId)
The optional ID of a specific ramdisk to register with the new AMI.

Some kernels require additional drivers at launch. Check the kernel requirements for information on whether you need to specify a RAM disk.

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

Parameters:
ramdiskId - The optional ID of a specific ramdisk to register with the new AMI.

Some kernels require additional drivers at launch. Check the kernel requirements for information on whether you need to specify a RAM disk.

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

getRootDeviceName

public String getRootDeviceName()
The root device name (e.g., /dev/sda1).

Returns:
The root device name (e.g., /dev/sda1).

setRootDeviceName

public void setRootDeviceName(String rootDeviceName)
The root device name (e.g., /dev/sda1).

Parameters:
rootDeviceName - The root device name (e.g., /dev/sda1).

withRootDeviceName

public RegisterImageRequest withRootDeviceName(String rootDeviceName)
The root device name (e.g., /dev/sda1).

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

Parameters:
rootDeviceName - The root device name (e.g., /dev/sda1).
Returns:
A reference to this updated object so that method calls can be chained together.

getBlockDeviceMappings

public List<BlockDeviceMapping> getBlockDeviceMappings()
The block device mappings for the new AMI, which specify how different block devices (ex: EBS volumes and ephemeral drives) will be exposed on instances launched from the new image.

Returns:
The block device mappings for the new AMI, which specify how different block devices (ex: EBS volumes and ephemeral drives) will be exposed on instances launched from the new image.

setBlockDeviceMappings

public void setBlockDeviceMappings(Collection<BlockDeviceMapping> blockDeviceMappings)
The block device mappings for the new AMI, which specify how different block devices (ex: EBS volumes and ephemeral drives) will be exposed on instances launched from the new image.

Parameters:
blockDeviceMappings - The block device mappings for the new AMI, which specify how different block devices (ex: EBS volumes and ephemeral drives) will be exposed on instances launched from the new image.

withBlockDeviceMappings

public RegisterImageRequest withBlockDeviceMappings(BlockDeviceMapping... blockDeviceMappings)
The block device mappings for the new AMI, which specify how different block devices (ex: EBS volumes and ephemeral drives) will be exposed on instances launched from the new image.

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

Parameters:
blockDeviceMappings - The block device mappings for the new AMI, which specify how different block devices (ex: EBS volumes and ephemeral drives) will be exposed on instances launched from the new image.
Returns:
A reference to this updated object so that method calls can be chained together.

withBlockDeviceMappings

public RegisterImageRequest withBlockDeviceMappings(Collection<BlockDeviceMapping> blockDeviceMappings)
The block device mappings for the new AMI, which specify how different block devices (ex: EBS volumes and ephemeral drives) will be exposed on instances launched from the new image.

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

Parameters:
blockDeviceMappings - The block device mappings for the new AMI, which specify how different block devices (ex: EBS volumes and ephemeral drives) will be exposed on instances launched from the new image.
Returns:
A reference to this updated object so that method calls can be chained together.

toString

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

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

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


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