com.amazonaws.services.ec2.model
Class CreateImageRequest

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

public class CreateImageRequest
extends AmazonWebServiceRequest

Container for the parameters to the CreateImage operation.

Creates an Amazon EBS-backed AMI from a "running" or "stopped" instance. AMIs that use an Amazon EBS root device boot faster than AMIs that use instance stores. They can be up to 1 TiB in size, use storage that persists on instance failure, and can be stopped and started.

See Also:
AmazonEC2.createImage(CreateImageRequest)

Constructor Summary
CreateImageRequest()
          Default constructor for a new CreateImageRequest object.
CreateImageRequest(String instanceId, String name)
          Constructs a new CreateImageRequest object.
 
Method Summary
 boolean equals(Object obj)
           
 List<BlockDeviceMapping> getBlockDeviceMappings()
          Returns the value of the BlockDeviceMappings property for this object.
 String getDescription()
          The description for the new AMI being created.
 String getInstanceId()
          The ID of the instance from which to create the new image.
 String getName()
          The name for the new AMI being created.
 Boolean getNoReboot()
          By default this property is set to false, which means Amazon EC2 attempts to cleanly shut down the instance before image creation and reboots the instance afterwards.
 int hashCode()
           
 Boolean isNoReboot()
          By default this property is set to false, which means Amazon EC2 attempts to cleanly shut down the instance before image creation and reboots the instance afterwards.
 void setBlockDeviceMappings(Collection<BlockDeviceMapping> blockDeviceMappings)
          Sets the value of the BlockDeviceMappings property for this object.
 void setDescription(String description)
          The description for the new AMI being created.
 void setInstanceId(String instanceId)
          The ID of the instance from which to create the new image.
 void setName(String name)
          The name for the new AMI being created.
 void setNoReboot(Boolean noReboot)
          By default this property is set to false, which means Amazon EC2 attempts to cleanly shut down the instance before image creation and reboots the instance afterwards.
 String toString()
          Returns a string representation of this object; useful for testing and debugging.
 CreateImageRequest withBlockDeviceMappings(BlockDeviceMapping... blockDeviceMappings)
          Sets the value of the BlockDeviceMappings property for this object.
 CreateImageRequest withBlockDeviceMappings(Collection<BlockDeviceMapping> blockDeviceMappings)
          Sets the value of the BlockDeviceMappings property for this object.
 CreateImageRequest withDescription(String description)
          The description for the new AMI being created.
 CreateImageRequest withInstanceId(String instanceId)
          The ID of the instance from which to create the new image.
 CreateImageRequest withName(String name)
          The name for the new AMI being created.
 CreateImageRequest withNoReboot(Boolean noReboot)
          By default this property is set to false, which means Amazon EC2 attempts to cleanly shut down the instance before image creation and reboots the instance afterwards.
 
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

CreateImageRequest

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


CreateImageRequest

public CreateImageRequest(String instanceId,
                          String name)
Constructs a new CreateImageRequest object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.

Parameters:
instanceId - The ID of the instance from which to create the new image.
name - The name for the new AMI being created.
Method Detail

getInstanceId

public String getInstanceId()
The ID of the instance from which to create the new image.

Returns:
The ID of the instance from which to create the new image.

setInstanceId

public void setInstanceId(String instanceId)
The ID of the instance from which to create the new image.

Parameters:
instanceId - The ID of the instance from which to create the new image.

withInstanceId

public CreateImageRequest withInstanceId(String instanceId)
The ID of the instance from which to create the new image.

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

Parameters:
instanceId - The ID of the instance from which to create the new image.
Returns:
A reference to this updated object so that method calls can be chained together.

getName

public String getName()
The name for the new AMI being created.

Returns:
The name for the new AMI being created.

setName

public void setName(String name)
The name for the new AMI being created.

Parameters:
name - The name for the new AMI being created.

withName

public CreateImageRequest withName(String name)
The name for the new AMI being created.

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

Parameters:
name - The name for the new AMI being created.
Returns:
A reference to this updated object so that method calls can be chained together.

getDescription

public String getDescription()
The description for the new AMI being created.

Returns:
The description for the new AMI being created.

setDescription

public void setDescription(String description)
The description for the new AMI being created.

Parameters:
description - The description for the new AMI being created.

withDescription

public CreateImageRequest withDescription(String description)
The description for the new AMI being created.

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

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

isNoReboot

public Boolean isNoReboot()
By default this property is set to false, which means Amazon EC2 attempts to cleanly shut down the instance before image creation and reboots the instance afterwards. When set to true, Amazon EC2 will not shut down the instance before creating the image. When this option is used, file system integrity on the created image cannot be guaranteed.

Returns:
By default this property is set to false, which means Amazon EC2 attempts to cleanly shut down the instance before image creation and reboots the instance afterwards. When set to true, Amazon EC2 will not shut down the instance before creating the image. When this option is used, file system integrity on the created image cannot be guaranteed.

setNoReboot

public void setNoReboot(Boolean noReboot)
By default this property is set to false, which means Amazon EC2 attempts to cleanly shut down the instance before image creation and reboots the instance afterwards. When set to true, Amazon EC2 will not shut down the instance before creating the image. When this option is used, file system integrity on the created image cannot be guaranteed.

Parameters:
noReboot - By default this property is set to false, which means Amazon EC2 attempts to cleanly shut down the instance before image creation and reboots the instance afterwards. When set to true, Amazon EC2 will not shut down the instance before creating the image. When this option is used, file system integrity on the created image cannot be guaranteed.

withNoReboot

public CreateImageRequest withNoReboot(Boolean noReboot)
By default this property is set to false, which means Amazon EC2 attempts to cleanly shut down the instance before image creation and reboots the instance afterwards. When set to true, Amazon EC2 will not shut down the instance before creating the image. When this option is used, file system integrity on the created image cannot be guaranteed.

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

Parameters:
noReboot - By default this property is set to false, which means Amazon EC2 attempts to cleanly shut down the instance before image creation and reboots the instance afterwards. When set to true, Amazon EC2 will not shut down the instance before creating the image. When this option is used, file system integrity on the created image cannot be guaranteed.
Returns:
A reference to this updated object so that method calls can be chained together.

getNoReboot

public Boolean getNoReboot()
By default this property is set to false, which means Amazon EC2 attempts to cleanly shut down the instance before image creation and reboots the instance afterwards. When set to true, Amazon EC2 will not shut down the instance before creating the image. When this option is used, file system integrity on the created image cannot be guaranteed.

Returns:
By default this property is set to false, which means Amazon EC2 attempts to cleanly shut down the instance before image creation and reboots the instance afterwards. When set to true, Amazon EC2 will not shut down the instance before creating the image. When this option is used, file system integrity on the created image cannot be guaranteed.

getBlockDeviceMappings

public List<BlockDeviceMapping> getBlockDeviceMappings()
Returns the value of the BlockDeviceMappings property for this object.

Returns:
The value of the BlockDeviceMappings property for this object.

setBlockDeviceMappings

public void setBlockDeviceMappings(Collection<BlockDeviceMapping> blockDeviceMappings)
Sets the value of the BlockDeviceMappings property for this object.

Parameters:
blockDeviceMappings - The new value for the BlockDeviceMappings property for this object.

withBlockDeviceMappings

public CreateImageRequest withBlockDeviceMappings(BlockDeviceMapping... blockDeviceMappings)
Sets the value of the BlockDeviceMappings property for this object.

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

Parameters:
blockDeviceMappings - The new value for the BlockDeviceMappings property for this object.
Returns:
A reference to this updated object so that method calls can be chained together.

withBlockDeviceMappings

public CreateImageRequest withBlockDeviceMappings(Collection<BlockDeviceMapping> blockDeviceMappings)
Sets the value of the BlockDeviceMappings property for this object.

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

Parameters:
blockDeviceMappings - The new value for the BlockDeviceMappings property for this object.
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.