public class CreateImageRequest extends AmazonWebServiceRequest implements Serializable, DryRunSupportedRequest<CreateImageRequest>
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.
Constructor and Description |
---|
CreateImageRequest()
Default constructor for a new CreateImageRequest object.
|
CreateImageRequest(String instanceId,
String name)
Constructs a new CreateImageRequest object.
|
Modifier and Type | Method and Description |
---|---|
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.
|
Request<CreateImageRequest> |
getDryRunRequest()
This method is intended for internal use only.
|
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. |
copyPrivateRequestParameters, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setRequestCredentials, setRequestMetricCollector, withRequestMetricCollector
public CreateImageRequest()
public CreateImageRequest(String instanceId, String name)
instanceId
- The ID of the instance from which to create the new
image.name
- The name for the new AMI being created.public String getInstanceId()
public void setInstanceId(String instanceId)
instanceId
- The ID of the instance from which to create the new image.public CreateImageRequest withInstanceId(String instanceId)
Returns a reference to this object so that method calls can be chained together.
instanceId
- The ID of the instance from which to create the new image.public String getName()
public void setName(String name)
name
- The name for the new AMI being created.public CreateImageRequest withName(String name)
Returns a reference to this object so that method calls can be chained together.
name
- The name for the new AMI being created.public String getDescription()
public void setDescription(String description)
description
- The description for the new AMI being created.public CreateImageRequest withDescription(String description)
Returns a reference to this object so that method calls can be chained together.
description
- The description for the new AMI being created.public Boolean isNoReboot()
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.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.public void setNoReboot(Boolean noReboot)
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.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.public CreateImageRequest withNoReboot(Boolean noReboot)
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.
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.public Boolean getNoReboot()
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.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.public List<BlockDeviceMapping> getBlockDeviceMappings()
public void setBlockDeviceMappings(Collection<BlockDeviceMapping> blockDeviceMappings)
blockDeviceMappings
- The new value for the BlockDeviceMappings property for this object.public CreateImageRequest withBlockDeviceMappings(BlockDeviceMapping... blockDeviceMappings)
Returns a reference to this object so that method calls can be chained together.
blockDeviceMappings
- The new value for the BlockDeviceMappings property for this object.public CreateImageRequest withBlockDeviceMappings(Collection<BlockDeviceMapping> blockDeviceMappings)
Returns a reference to this object so that method calls can be chained together.
blockDeviceMappings
- The new value for the BlockDeviceMappings property for this object.public Request<CreateImageRequest> getDryRunRequest()
getDryRunRequest
in interface DryRunSupportedRequest<CreateImageRequest>
public String toString()
toString
in class Object
Object.toString()
Copyright © 2013 Amazon Web Services, Inc. All Rights Reserved.