Did this page help you?

   Yes   No   Tell us about it...

com.amazonaws.services.ec2.model
Class Image

java.lang.Object
  extended by com.amazonaws.services.ec2.model.Image
All Implemented Interfaces:
java.io.Serializable

public class Image
extends java.lang.Object
implements java.io.Serializable

Represents an Amazon Machine Image (AMI) that can be run on an Amazon EC2 instance.

See Also:
Serialized Form

Constructor Summary
Image()
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.lang.String getArchitecture()
          The architecture of the image.
 java.util.List<BlockDeviceMapping> getBlockDeviceMappings()
          Specifies how block devices are exposed to the instance.
 java.lang.String getDescription()
          The description of the AMI that was provided during image creation.
 java.lang.String getHypervisor()
          Returns the value of the Hypervisor property for this object.
 java.lang.String getImageId()
          The unique ID of the AMI.
 java.lang.String getImageLocation()
          The location of the AMI.
 java.lang.String getImageOwnerAlias()
          The AWS account alias (e.g., "amazon", "redhat", "self", etc.) or AWS account ID that owns the AMI.
 java.lang.String getImageType()
          The type of image (machine, kernel, or ramdisk).
 java.lang.String getKernelId()
          The kernel associated with the image, if any.
 java.lang.String getName()
          The name of the AMI that was provided during image creation.
 java.lang.String getOwnerId()
          AWS Access Key ID of the image owner.
 java.lang.String getPlatform()
          The operating platform of the AMI.
 java.util.List<ProductCode> getProductCodes()
          Product codes of the AMI.
 java.lang.Boolean getPublic()
          True if this image has public launch permissions.
 java.lang.String getRamdiskId()
          The RAM disk associated with the image, if any.
 java.lang.String getRootDeviceName()
          The root device name (e.g., /dev/sda1).
 java.lang.String getRootDeviceType()
          The root device type used by the AMI.
 java.lang.String getState()
          Current state of the AMI.
 StateReason getStateReason()
          The reason for the state change.
 java.util.List<Tag> getTags()
          A list of tags for the Image.
 java.lang.String getVirtualizationType()
          Returns the value of the VirtualizationType property for this object.
 int hashCode()
           
 java.lang.Boolean isPublic()
          True if this image has public launch permissions.
 void setArchitecture(java.lang.String architecture)
          The architecture of the image.
 void setBlockDeviceMappings(java.util.Collection<BlockDeviceMapping> blockDeviceMappings)
          Specifies how block devices are exposed to the instance.
 void setDescription(java.lang.String description)
          The description of the AMI that was provided during image creation.
 void setHypervisor(HypervisorType hypervisor)
          Sets the value of the Hypervisor property for this object.
 void setHypervisor(java.lang.String hypervisor)
          Sets the value of the Hypervisor property for this object.
 void setImageId(java.lang.String imageId)
          The unique ID of the AMI.
 void setImageLocation(java.lang.String imageLocation)
          The location of the AMI.
 void setImageOwnerAlias(java.lang.String imageOwnerAlias)
          The AWS account alias (e.g., "amazon", "redhat", "self", etc.) or AWS account ID that owns the AMI.
 void setImageType(java.lang.String imageType)
          The type of image (machine, kernel, or ramdisk).
 void setKernelId(java.lang.String kernelId)
          The kernel associated with the image, if any.
 void setName(java.lang.String name)
          The name of the AMI that was provided during image creation.
 void setOwnerId(java.lang.String ownerId)
          AWS Access Key ID of the image owner.
 void setPlatform(java.lang.String platform)
          The operating platform of the AMI.
 void setProductCodes(java.util.Collection<ProductCode> productCodes)
          Product codes of the AMI.
 void setPublic(java.lang.Boolean publicValue)
          True if this image has public launch permissions.
 void setRamdiskId(java.lang.String ramdiskId)
          The RAM disk associated with the image, if any.
 void setRootDeviceName(java.lang.String rootDeviceName)
          The root device name (e.g., /dev/sda1).
 void setRootDeviceType(java.lang.String rootDeviceType)
          The root device type used by the AMI.
 void setState(ImageState state)
          Current state of the AMI.
 void setState(java.lang.String state)
          Current state of the AMI.
 void setStateReason(StateReason stateReason)
          The reason for the state change.
 void setTags(java.util.Collection<Tag> tags)
          A list of tags for the Image.
 void setVirtualizationType(java.lang.String virtualizationType)
          Sets the value of the VirtualizationType property for this object.
 void setVirtualizationType(VirtualizationType virtualizationType)
          Sets the value of the VirtualizationType property for this object.
 java.lang.String toString()
          Returns a string representation of this object; useful for testing and debugging.
 Image withArchitecture(java.lang.String architecture)
          The architecture of the image.
 Image withBlockDeviceMappings(BlockDeviceMapping... blockDeviceMappings)
          Specifies how block devices are exposed to the instance.
 Image withBlockDeviceMappings(java.util.Collection<BlockDeviceMapping> blockDeviceMappings)
          Specifies how block devices are exposed to the instance.
 Image withDescription(java.lang.String description)
          The description of the AMI that was provided during image creation.
 Image withHypervisor(HypervisorType hypervisor)
          Sets the value of the Hypervisor property for this object.
 Image withHypervisor(java.lang.String hypervisor)
          Sets the value of the Hypervisor property for this object.
 Image withImageId(java.lang.String imageId)
          The unique ID of the AMI.
 Image withImageLocation(java.lang.String imageLocation)
          The location of the AMI.
 Image withImageOwnerAlias(java.lang.String imageOwnerAlias)
          The AWS account alias (e.g., "amazon", "redhat", "self", etc.) or AWS account ID that owns the AMI.
 Image withImageType(java.lang.String imageType)
          The type of image (machine, kernel, or ramdisk).
 Image withKernelId(java.lang.String kernelId)
          The kernel associated with the image, if any.
 Image withName(java.lang.String name)
          The name of the AMI that was provided during image creation.
 Image withOwnerId(java.lang.String ownerId)
          AWS Access Key ID of the image owner.
 Image withPlatform(java.lang.String platform)
          The operating platform of the AMI.
 Image withProductCodes(java.util.Collection<ProductCode> productCodes)
          Product codes of the AMI.
 Image withProductCodes(ProductCode... productCodes)
          Product codes of the AMI.
 Image withPublic(java.lang.Boolean publicValue)
          True if this image has public launch permissions.
 Image withRamdiskId(java.lang.String ramdiskId)
          The RAM disk associated with the image, if any.
 Image withRootDeviceName(java.lang.String rootDeviceName)
          The root device name (e.g., /dev/sda1).
 Image withRootDeviceType(java.lang.String rootDeviceType)
          The root device type used by the AMI.
 Image withState(ImageState state)
          Current state of the AMI.
 Image withState(java.lang.String state)
          Current state of the AMI.
 Image withStateReason(StateReason stateReason)
          The reason for the state change.
 Image withTags(java.util.Collection<Tag> tags)
          A list of tags for the Image.
 Image withTags(Tag... tags)
          A list of tags for the Image.
 Image withVirtualizationType(java.lang.String virtualizationType)
          Sets the value of the VirtualizationType property for this object.
 Image withVirtualizationType(VirtualizationType virtualizationType)
          Sets the value of the VirtualizationType property for this object.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Image

public Image()
Method Detail

getImageId

public java.lang.String getImageId()
The unique ID of the AMI.

Returns:
The unique ID of the AMI.

setImageId

public void setImageId(java.lang.String imageId)
The unique ID of the AMI.

Parameters:
imageId - The unique ID of the AMI.

withImageId

public Image withImageId(java.lang.String imageId)
The unique ID of the AMI.

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

Parameters:
imageId - The unique ID of the AMI.

getImageLocation

public java.lang.String getImageLocation()
The location of the AMI.

Returns:
The location of the AMI.

setImageLocation

public void setImageLocation(java.lang.String imageLocation)
The location of the AMI.

Parameters:
imageLocation - The location of the AMI.

withImageLocation

public Image withImageLocation(java.lang.String imageLocation)
The location of the AMI.

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

Parameters:
imageLocation - The location of the AMI.

getState

public java.lang.String getState()
Current state of the AMI. If the operation returns available, the image is successfully registered and available for launching. If the operation returns deregistered, the image is deregistered and no longer available for launching.

Constraints:
Allowed Values: available, deregistered

Returns:
Current state of the AMI. If the operation returns available, the image is successfully registered and available for launching. If the operation returns deregistered, the image is deregistered and no longer available for launching.
See Also:
ImageState

setState

public void setState(java.lang.String state)
Current state of the AMI. If the operation returns available, the image is successfully registered and available for launching. If the operation returns deregistered, the image is deregistered and no longer available for launching.

Constraints:
Allowed Values: available, deregistered

Parameters:
state - Current state of the AMI. If the operation returns available, the image is successfully registered and available for launching. If the operation returns deregistered, the image is deregistered and no longer available for launching.
See Also:
ImageState

withState

public Image withState(java.lang.String state)
Current state of the AMI. If the operation returns available, the image is successfully registered and available for launching. If the operation returns deregistered, the image is deregistered and no longer available for launching.

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

Constraints:
Allowed Values: available, deregistered

Parameters:
state - Current state of the AMI. If the operation returns available, the image is successfully registered and available for launching. If the operation returns deregistered, the image is deregistered and no longer available for launching.
See Also:
ImageState

setState

public void setState(ImageState state)
Current state of the AMI. If the operation returns available, the image is successfully registered and available for launching. If the operation returns deregistered, the image is deregistered and no longer available for launching.

Constraints:
Allowed Values: available, deregistered

Parameters:
state - Current state of the AMI. If the operation returns available, the image is successfully registered and available for launching. If the operation returns deregistered, the image is deregistered and no longer available for launching.
See Also:
ImageState

withState

public Image withState(ImageState state)
Current state of the AMI. If the operation returns available, the image is successfully registered and available for launching. If the operation returns deregistered, the image is deregistered and no longer available for launching.

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

Constraints:
Allowed Values: available, deregistered

Parameters:
state - Current state of the AMI. If the operation returns available, the image is successfully registered and available for launching. If the operation returns deregistered, the image is deregistered and no longer available for launching.
See Also:
ImageState

getOwnerId

public java.lang.String getOwnerId()
AWS Access Key ID of the image owner.

Returns:
AWS Access Key ID of the image owner.

setOwnerId

public void setOwnerId(java.lang.String ownerId)
AWS Access Key ID of the image owner.

Parameters:
ownerId - AWS Access Key ID of the image owner.

withOwnerId

public Image withOwnerId(java.lang.String ownerId)
AWS Access Key ID of the image owner.

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

Parameters:
ownerId - AWS Access Key ID of the image owner.

isPublic

public java.lang.Boolean isPublic()
True if this image has public launch permissions. False if it only has implicit and explicit launch permissions.

Returns:
True if this image has public launch permissions. False if it only has implicit and explicit launch permissions.

setPublic

public void setPublic(java.lang.Boolean publicValue)
True if this image has public launch permissions. False if it only has implicit and explicit launch permissions.

Parameters:
publicValue - True if this image has public launch permissions. False if it only has implicit and explicit launch permissions.

withPublic

public Image withPublic(java.lang.Boolean publicValue)
True if this image has public launch permissions. False if it only has implicit and explicit launch permissions.

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

Parameters:
publicValue - True if this image has public launch permissions. False if it only has implicit and explicit launch permissions.

getPublic

public java.lang.Boolean getPublic()
True if this image has public launch permissions. False if it only has implicit and explicit launch permissions.

Returns:
True if this image has public launch permissions. False if it only has implicit and explicit launch permissions.

getProductCodes

public java.util.List<ProductCode> getProductCodes()
Product codes of the AMI.

Returns:
Product codes of the AMI.

setProductCodes

public void setProductCodes(java.util.Collection<ProductCode> productCodes)
Product codes of the AMI.

Parameters:
productCodes - Product codes of the AMI.

withProductCodes

public Image withProductCodes(ProductCode... productCodes)
Product codes of the AMI.

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

Parameters:
productCodes - Product codes of the AMI.

withProductCodes

public Image withProductCodes(java.util.Collection<ProductCode> productCodes)
Product codes of the AMI.

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

Parameters:
productCodes - Product codes of the AMI.

getArchitecture

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

Returns:
The architecture of the image.

setArchitecture

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

Parameters:
architecture - The architecture of the image.

withArchitecture

public Image withArchitecture(java.lang.String architecture)
The architecture of the image.

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

Parameters:
architecture - The architecture of the image.

getImageType

public java.lang.String getImageType()
The type of image (machine, kernel, or ramdisk).

Returns:
The type of image (machine, kernel, or ramdisk).

setImageType

public void setImageType(java.lang.String imageType)
The type of image (machine, kernel, or ramdisk).

Parameters:
imageType - The type of image (machine, kernel, or ramdisk).

withImageType

public Image withImageType(java.lang.String imageType)
The type of image (machine, kernel, or ramdisk).

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

Parameters:
imageType - The type of image (machine, kernel, or ramdisk).

getKernelId

public java.lang.String getKernelId()
The kernel associated with the image, if any. Only applicable for machine images.

Returns:
The kernel associated with the image, if any. Only applicable for machine images.

setKernelId

public void setKernelId(java.lang.String kernelId)
The kernel associated with the image, if any. Only applicable for machine images.

Parameters:
kernelId - The kernel associated with the image, if any. Only applicable for machine images.

withKernelId

public Image withKernelId(java.lang.String kernelId)
The kernel associated with the image, if any. Only applicable for machine images.

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

Parameters:
kernelId - The kernel associated with the image, if any. Only applicable for machine images.

getRamdiskId

public java.lang.String getRamdiskId()
The RAM disk associated with the image, if any. Only applicable for machine images.

Returns:
The RAM disk associated with the image, if any. Only applicable for machine images.

setRamdiskId

public void setRamdiskId(java.lang.String ramdiskId)
The RAM disk associated with the image, if any. Only applicable for machine images.

Parameters:
ramdiskId - The RAM disk associated with the image, if any. Only applicable for machine images.

withRamdiskId

public Image withRamdiskId(java.lang.String ramdiskId)
The RAM disk associated with the image, if any. Only applicable for machine images.

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

Parameters:
ramdiskId - The RAM disk associated with the image, if any. Only applicable for machine images.

getPlatform

public java.lang.String getPlatform()
The operating platform of the AMI.

Returns:
The operating platform of the AMI.

setPlatform

public void setPlatform(java.lang.String platform)
The operating platform of the AMI.

Parameters:
platform - The operating platform of the AMI.

withPlatform

public Image withPlatform(java.lang.String platform)
The operating platform of the AMI.

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

Parameters:
platform - The operating platform of the AMI.

getStateReason

public StateReason getStateReason()
The reason for the state change.

Returns:
The reason for the state change.

setStateReason

public void setStateReason(StateReason stateReason)
The reason for the state change.

Parameters:
stateReason - The reason for the state change.

withStateReason

public Image withStateReason(StateReason stateReason)
The reason for the state change.

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

Parameters:
stateReason - The reason for the state change.

getImageOwnerAlias

public java.lang.String getImageOwnerAlias()
The AWS account alias (e.g., "amazon", "redhat", "self", etc.) or AWS account ID that owns the AMI.

Returns:
The AWS account alias (e.g., "amazon", "redhat", "self", etc.) or AWS account ID that owns the AMI.

setImageOwnerAlias

public void setImageOwnerAlias(java.lang.String imageOwnerAlias)
The AWS account alias (e.g., "amazon", "redhat", "self", etc.) or AWS account ID that owns the AMI.

Parameters:
imageOwnerAlias - The AWS account alias (e.g., "amazon", "redhat", "self", etc.) or AWS account ID that owns the AMI.

withImageOwnerAlias

public Image withImageOwnerAlias(java.lang.String imageOwnerAlias)
The AWS account alias (e.g., "amazon", "redhat", "self", etc.) or AWS account ID that owns the AMI.

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

Parameters:
imageOwnerAlias - The AWS account alias (e.g., "amazon", "redhat", "self", etc.) or AWS account ID that owns the AMI.

getName

public java.lang.String getName()
The name of the AMI that was provided during image creation.

Returns:
The name of the AMI that was provided during image creation.

setName

public void setName(java.lang.String name)
The name of the AMI that was provided during image creation.

Parameters:
name - The name of the AMI that was provided during image creation.

withName

public Image withName(java.lang.String name)
The name of the AMI that was provided during image creation.

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

Parameters:
name - The name of the AMI that was provided during image creation.

getDescription

public java.lang.String getDescription()
The description of the AMI that was provided during image creation.

Returns:
The description of the AMI that was provided during image creation.

setDescription

public void setDescription(java.lang.String description)
The description of the AMI that was provided during image creation.

Parameters:
description - The description of the AMI that was provided during image creation.

withDescription

public Image withDescription(java.lang.String description)
The description of the AMI that was provided during image creation.

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

Parameters:
description - The description of the AMI that was provided during image creation.

getRootDeviceType

public java.lang.String getRootDeviceType()
The root device type used by the AMI. The AMI can use an Amazon EBS or instance store root device.

Returns:
The root device type used by the AMI. The AMI can use an Amazon EBS or instance store root device.

setRootDeviceType

public void setRootDeviceType(java.lang.String rootDeviceType)
The root device type used by the AMI. The AMI can use an Amazon EBS or instance store root device.

Parameters:
rootDeviceType - The root device type used by the AMI. The AMI can use an Amazon EBS or instance store root device.

withRootDeviceType

public Image withRootDeviceType(java.lang.String rootDeviceType)
The root device type used by the AMI. The AMI can use an Amazon EBS or instance store root device.

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

Parameters:
rootDeviceType - The root device type used by the AMI. The AMI can use an Amazon EBS or instance store root device.

getRootDeviceName

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

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

setRootDeviceName

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

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

withRootDeviceName

public Image withRootDeviceName(java.lang.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).

getBlockDeviceMappings

public java.util.List<BlockDeviceMapping> getBlockDeviceMappings()
Specifies how block devices are exposed to the instance.

Returns:
Specifies how block devices are exposed to the instance.

setBlockDeviceMappings

public void setBlockDeviceMappings(java.util.Collection<BlockDeviceMapping> blockDeviceMappings)
Specifies how block devices are exposed to the instance.

Parameters:
blockDeviceMappings - Specifies how block devices are exposed to the instance.

withBlockDeviceMappings

public Image withBlockDeviceMappings(BlockDeviceMapping... blockDeviceMappings)
Specifies how block devices are exposed to the instance.

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

Parameters:
blockDeviceMappings - Specifies how block devices are exposed to the instance.

withBlockDeviceMappings

public Image withBlockDeviceMappings(java.util.Collection<BlockDeviceMapping> blockDeviceMappings)
Specifies how block devices are exposed to the instance.

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

Parameters:
blockDeviceMappings - Specifies how block devices are exposed to the instance.

getVirtualizationType

public java.lang.String getVirtualizationType()
Returns the value of the VirtualizationType property for this object.

Constraints:
Allowed Values: hvm, paravirtual

Returns:
The value of the VirtualizationType property for this object.
See Also:
VirtualizationType

setVirtualizationType

public void setVirtualizationType(java.lang.String virtualizationType)
Sets the value of the VirtualizationType property for this object.

Constraints:
Allowed Values: hvm, paravirtual

Parameters:
virtualizationType - The new value for the VirtualizationType property for this object.
See Also:
VirtualizationType

withVirtualizationType

public Image withVirtualizationType(java.lang.String virtualizationType)
Sets the value of the VirtualizationType property for this object.

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

Constraints:
Allowed Values: hvm, paravirtual

Parameters:
virtualizationType - The new value for the VirtualizationType property for this object.
See Also:
VirtualizationType

setVirtualizationType

public void setVirtualizationType(VirtualizationType virtualizationType)
Sets the value of the VirtualizationType property for this object.

Constraints:
Allowed Values: hvm, paravirtual

Parameters:
virtualizationType - The new value for the VirtualizationType property for this object.
See Also:
VirtualizationType

withVirtualizationType

public Image withVirtualizationType(VirtualizationType virtualizationType)
Sets the value of the VirtualizationType property for this object.

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

Constraints:
Allowed Values: hvm, paravirtual

Parameters:
virtualizationType - The new value for the VirtualizationType property for this object.
See Also:
VirtualizationType

getTags

public java.util.List<Tag> getTags()
A list of tags for the Image.

Returns:
A list of tags for the Image.

setTags

public void setTags(java.util.Collection<Tag> tags)
A list of tags for the Image.

Parameters:
tags - A list of tags for the Image.

withTags

public Image withTags(Tag... tags)
A list of tags for the Image.

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

Parameters:
tags - A list of tags for the Image.

withTags

public Image withTags(java.util.Collection<Tag> tags)
A list of tags for the Image.

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

Parameters:
tags - A list of tags for the Image.

getHypervisor

public java.lang.String getHypervisor()
Returns the value of the Hypervisor property for this object.

Constraints:
Allowed Values: ovm, xen

Returns:
The value of the Hypervisor property for this object.
See Also:
HypervisorType

setHypervisor

public void setHypervisor(java.lang.String hypervisor)
Sets the value of the Hypervisor property for this object.

Constraints:
Allowed Values: ovm, xen

Parameters:
hypervisor - The new value for the Hypervisor property for this object.
See Also:
HypervisorType

withHypervisor

public Image withHypervisor(java.lang.String hypervisor)
Sets the value of the Hypervisor property for this object.

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

Constraints:
Allowed Values: ovm, xen

Parameters:
hypervisor - The new value for the Hypervisor property for this object.
See Also:
HypervisorType

setHypervisor

public void setHypervisor(HypervisorType hypervisor)
Sets the value of the Hypervisor property for this object.

Constraints:
Allowed Values: ovm, xen

Parameters:
hypervisor - The new value for the Hypervisor property for this object.
See Also:
HypervisorType

withHypervisor

public Image withHypervisor(HypervisorType hypervisor)
Sets the value of the Hypervisor property for this object.

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

Constraints:
Allowed Values: ovm, xen

Parameters:
hypervisor - The new value for the Hypervisor property for this object.
See Also:
HypervisorType

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.