public class CreateImageRequest extends AmazonWebServiceRequest implements Serializable, DryRunSupportedRequest<CreateImageRequest>
CreateImage operation
.
Creates an Amazon EBS-backed AMI from an Amazon EBS-backed instance that is either running or stopped.
If you customized your instance with instance store volumes or EBS volumes in addition to the root device volume, the new AMI contains block device mapping information for those volumes. When you launch an instance from this new AMI, the instance automatically launches with those additional volumes.
For more information, see Creating Amazon EBS-Backed Linux AMIs in the Amazon Elastic Compute Cloud User Guide .
NOOP
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()
Information about one or more block device mappings.
|
String |
getDescription()
A description for the new image.
|
Request<CreateImageRequest> |
getDryRunRequest()
This method is intended for internal use only.
|
String |
getInstanceId()
The ID of the instance.
|
String |
getName()
A name for the new image.
|
Boolean |
getNoReboot()
By default, this parameter is set to
false , which means
Amazon EC2 attempts to shut down the instance cleanly before image
creation and then reboots the instance. |
int |
hashCode() |
Boolean |
isNoReboot()
By default, this parameter is set to
false , which means
Amazon EC2 attempts to shut down the instance cleanly before image
creation and then reboots the instance. |
void |
setBlockDeviceMappings(Collection<BlockDeviceMapping> blockDeviceMappings)
Information about one or more block device mappings.
|
void |
setDescription(String description)
A description for the new image.
|
void |
setInstanceId(String instanceId)
The ID of the instance.
|
void |
setName(String name)
A name for the new image.
|
void |
setNoReboot(Boolean noReboot)
By default, this parameter is set to
false , which means
Amazon EC2 attempts to shut down the instance cleanly before image
creation and then reboots the instance. |
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
CreateImageRequest |
withBlockDeviceMappings(BlockDeviceMapping... blockDeviceMappings)
Information about one or more block device mappings.
|
CreateImageRequest |
withBlockDeviceMappings(Collection<BlockDeviceMapping> blockDeviceMappings)
Information about one or more block device mappings.
|
CreateImageRequest |
withDescription(String description)
A description for the new image.
|
CreateImageRequest |
withInstanceId(String instanceId)
The ID of the instance.
|
CreateImageRequest |
withName(String name)
A name for the new image.
|
CreateImageRequest |
withNoReboot(Boolean noReboot)
By default, this parameter is set to
false , which means
Amazon EC2 attempts to shut down the instance cleanly before image
creation and then reboots the instance. |
copyPrivateRequestParameters, getGeneralProgressListener, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setGeneralProgressListener, setRequestCredentials, setRequestMetricCollector, withGeneralProgressListener, withRequestMetricCollector
public CreateImageRequest()
public CreateImageRequest(String instanceId, String name)
instanceId
- The ID of the instance.name
- A name for the new image. Constraints: 3-128 alphanumeric characters, parenthesis (()), periods (.), slashes (/), dashes (-), or underscores(_)
public String getInstanceId()
public void setInstanceId(String instanceId)
instanceId
- The ID of the instance.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.public String getName()
Constraints: 3-128 alphanumeric characters, parenthesis (()), periods (.), slashes (/), dashes (-), or underscores(_)
Constraints: 3-128 alphanumeric characters, parenthesis (()), periods (.), slashes (/), dashes (-), or underscores(_)
public void setName(String name)
Constraints: 3-128 alphanumeric characters, parenthesis (()), periods (.), slashes (/), dashes (-), or underscores(_)
name
- A name for the new image. Constraints: 3-128 alphanumeric characters, parenthesis (()), periods (.), slashes (/), dashes (-), or underscores(_)
public CreateImageRequest withName(String name)
Constraints: 3-128 alphanumeric characters, parenthesis (()), periods (.), slashes (/), dashes (-), or underscores(_)
Returns a reference to this object so that method calls can be chained together.
name
- A name for the new image. Constraints: 3-128 alphanumeric characters, parenthesis (()), periods (.), slashes (/), dashes (-), or underscores(_)
public String getDescription()
public void setDescription(String description)
description
- A description for the new image.public CreateImageRequest withDescription(String description)
Returns a reference to this object so that method calls can be chained together.
description
- A description for the new image.public Boolean isNoReboot()
false
, which means
Amazon EC2 attempts to shut down the instance cleanly before image
creation and then reboots the instance. When the parameter is set to
true
, Amazon EC2 doesn't shut down the instance before
creating the image. When this option is used, file system integrity on
the created image can't be guaranteed.false
, which means
Amazon EC2 attempts to shut down the instance cleanly before image
creation and then reboots the instance. When the parameter is set to
true
, Amazon EC2 doesn't shut down the instance before
creating the image. When this option is used, file system integrity on
the created image can't be guaranteed.public void setNoReboot(Boolean noReboot)
false
, which means
Amazon EC2 attempts to shut down the instance cleanly before image
creation and then reboots the instance. When the parameter is set to
true
, Amazon EC2 doesn't shut down the instance before
creating the image. When this option is used, file system integrity on
the created image can't be guaranteed.noReboot
- By default, this parameter is set to false
, which means
Amazon EC2 attempts to shut down the instance cleanly before image
creation and then reboots the instance. When the parameter is set to
true
, Amazon EC2 doesn't shut down the instance before
creating the image. When this option is used, file system integrity on
the created image can't be guaranteed.public CreateImageRequest withNoReboot(Boolean noReboot)
false
, which means
Amazon EC2 attempts to shut down the instance cleanly before image
creation and then reboots the instance. When the parameter is set to
true
, Amazon EC2 doesn't shut down the instance before
creating the image. When this option is used, file system integrity on
the created image can't be guaranteed.
Returns a reference to this object so that method calls can be chained together.
noReboot
- By default, this parameter is set to false
, which means
Amazon EC2 attempts to shut down the instance cleanly before image
creation and then reboots the instance. When the parameter is set to
true
, Amazon EC2 doesn't shut down the instance before
creating the image. When this option is used, file system integrity on
the created image can't be guaranteed.public Boolean getNoReboot()
false
, which means
Amazon EC2 attempts to shut down the instance cleanly before image
creation and then reboots the instance. When the parameter is set to
true
, Amazon EC2 doesn't shut down the instance before
creating the image. When this option is used, file system integrity on
the created image can't be guaranteed.false
, which means
Amazon EC2 attempts to shut down the instance cleanly before image
creation and then reboots the instance. When the parameter is set to
true
, Amazon EC2 doesn't shut down the instance before
creating the image. When this option is used, file system integrity on
the created image can't be guaranteed.public List<BlockDeviceMapping> getBlockDeviceMappings()
public void setBlockDeviceMappings(Collection<BlockDeviceMapping> blockDeviceMappings)
blockDeviceMappings
- Information about one or more block device mappings.public CreateImageRequest withBlockDeviceMappings(BlockDeviceMapping... blockDeviceMappings)
Returns a reference to this object so that method calls can be chained together.
blockDeviceMappings
- Information about one or more block device mappings.public CreateImageRequest withBlockDeviceMappings(Collection<BlockDeviceMapping> blockDeviceMappings)
Returns a reference to this object so that method calls can be chained together.
blockDeviceMappings
- Information about one or more block device mappings.public Request<CreateImageRequest> getDryRunRequest()
getDryRunRequest
in interface DryRunSupportedRequest<CreateImageRequest>
public String toString()
toString
in class Object
Object.toString()
Copyright © 2014. All rights reserved.