public class CreateImageRequest extends AmazonWebServiceRequest implements java.io.Serializable, java.lang.Cloneable, DryRunSupportedRequest<CreateImageRequest>
Contains the parameters for CreateImage.
Modifier and Type | Field and Description |
---|---|
private SdkInternalList<BlockDeviceMapping> |
blockDeviceMappings
Information about one or more block device mappings.
|
private java.lang.String |
description
A description for the new image.
|
private java.lang.String |
instanceId
The ID of the instance.
|
private java.lang.String |
name
A name for the new image.
|
private java.lang.Boolean |
noReboot
By default, Amazon EC2 attempts to shut down and reboot the instance
before creating the image.
|
NOOP
Constructor and Description |
---|
CreateImageRequest()
Default constructor for CreateImageRequest object.
|
CreateImageRequest(java.lang.String instanceId,
java.lang.String name)
Constructs a new CreateImageRequest object.
|
Modifier and Type | Method and Description |
---|---|
CreateImageRequest |
clone()
Creates a shallow clone of this request.
|
boolean |
equals(java.lang.Object obj) |
java.util.List<BlockDeviceMapping> |
getBlockDeviceMappings()
Information about one or more block device mappings.
|
java.lang.String |
getDescription()
A description for the new image.
|
Request<CreateImageRequest> |
getDryRunRequest()
This method is intended for internal use only.
|
java.lang.String |
getInstanceId()
The ID of the instance.
|
java.lang.String |
getName()
A name for the new image.
|
java.lang.Boolean |
getNoReboot()
By default, Amazon EC2 attempts to shut down and reboot the instance
before creating the image.
|
int |
hashCode() |
java.lang.Boolean |
isNoReboot()
By default, Amazon EC2 attempts to shut down and reboot the instance
before creating the image.
|
void |
setBlockDeviceMappings(java.util.Collection<BlockDeviceMapping> blockDeviceMappings)
Information about one or more block device mappings.
|
void |
setDescription(java.lang.String description)
A description for the new image.
|
void |
setInstanceId(java.lang.String instanceId)
The ID of the instance.
|
void |
setName(java.lang.String name)
A name for the new image.
|
void |
setNoReboot(java.lang.Boolean noReboot)
By default, Amazon EC2 attempts to shut down and reboot the instance
before creating the image.
|
java.lang.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(java.util.Collection<BlockDeviceMapping> blockDeviceMappings)
Information about one or more block device mappings.
|
CreateImageRequest |
withDescription(java.lang.String description)
A description for the new image.
|
CreateImageRequest |
withInstanceId(java.lang.String instanceId)
The ID of the instance.
|
CreateImageRequest |
withName(java.lang.String name)
A name for the new image.
|
CreateImageRequest |
withNoReboot(java.lang.Boolean noReboot)
By default, Amazon EC2 attempts to shut down and reboot the instance
before creating the image.
|
copyBaseTo, getCloneRoot, getCloneSource, getCustomQueryParameters, getCustomRequestHeaders, getGeneralProgressListener, getReadLimit, getRequestClientOptions, getRequestCredentials, getRequestCredentialsProvider, getRequestMetricCollector, getSdkClientExecutionTimeout, getSdkRequestTimeout, putCustomQueryParameter, putCustomRequestHeader, setGeneralProgressListener, setRequestCredentials, setRequestCredentialsProvider, setRequestMetricCollector, setSdkClientExecutionTimeout, setSdkRequestTimeout, withGeneralProgressListener, withRequestMetricCollector, withSdkClientExecutionTimeout, withSdkRequestTimeout
private java.lang.String instanceId
The ID of the instance.
private java.lang.String name
A name for the new image.
Constraints: 3-128 alphanumeric characters, parentheses (()), square brackets ([]), spaces ( ), periods (.), slashes (/), dashes (-), single quotes ('), at-signs (@), or underscores(_)
private java.lang.String description
A description for the new image.
private java.lang.Boolean noReboot
By default, Amazon EC2 attempts to shut down and reboot the instance before creating the image. If the 'No Reboot' option is set, 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.
private SdkInternalList<BlockDeviceMapping> blockDeviceMappings
Information about one or more block device mappings.
public CreateImageRequest()
public CreateImageRequest(java.lang.String instanceId, java.lang.String name)
instanceId
- The ID of the instance.name
- A name for the new image.
Constraints: 3-128 alphanumeric characters, parentheses (()), square brackets ([]), spaces ( ), periods (.), slashes (/), dashes (-), single quotes ('), at-signs (@), or underscores(_)
public void setInstanceId(java.lang.String instanceId)
The ID of the instance.
instanceId
- The ID of the instance.public java.lang.String getInstanceId()
The ID of the instance.
public CreateImageRequest withInstanceId(java.lang.String instanceId)
The ID of the instance.
instanceId
- The ID of the instance.public void setName(java.lang.String name)
A name for the new image.
Constraints: 3-128 alphanumeric characters, parentheses (()), square brackets ([]), spaces ( ), periods (.), slashes (/), dashes (-), single quotes ('), at-signs (@), or underscores(_)
name
- A name for the new image.
Constraints: 3-128 alphanumeric characters, parentheses (()), square brackets ([]), spaces ( ), periods (.), slashes (/), dashes (-), single quotes ('), at-signs (@), or underscores(_)
public java.lang.String getName()
A name for the new image.
Constraints: 3-128 alphanumeric characters, parentheses (()), square brackets ([]), spaces ( ), periods (.), slashes (/), dashes (-), single quotes ('), at-signs (@), or underscores(_)
Constraints: 3-128 alphanumeric characters, parentheses (()), square brackets ([]), spaces ( ), periods (.), slashes (/), dashes (-), single quotes ('), at-signs (@), or underscores(_)
public CreateImageRequest withName(java.lang.String name)
A name for the new image.
Constraints: 3-128 alphanumeric characters, parentheses (()), square brackets ([]), spaces ( ), periods (.), slashes (/), dashes (-), single quotes ('), at-signs (@), or underscores(_)
name
- A name for the new image.
Constraints: 3-128 alphanumeric characters, parentheses (()), square brackets ([]), spaces ( ), periods (.), slashes (/), dashes (-), single quotes ('), at-signs (@), or underscores(_)
public void setDescription(java.lang.String description)
A description for the new image.
description
- A description for the new image.public java.lang.String getDescription()
A description for the new image.
public CreateImageRequest withDescription(java.lang.String description)
A description for the new image.
description
- A description for the new image.public void setNoReboot(java.lang.Boolean noReboot)
By default, Amazon EC2 attempts to shut down and reboot the instance before creating the image. If the 'No Reboot' option is set, 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, Amazon EC2 attempts to shut down and reboot the
instance before creating the image. If the 'No Reboot' option is
set, 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 java.lang.Boolean getNoReboot()
By default, Amazon EC2 attempts to shut down and reboot the instance before creating the image. If the 'No Reboot' option is set, 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(java.lang.Boolean noReboot)
By default, Amazon EC2 attempts to shut down and reboot the instance before creating the image. If the 'No Reboot' option is set, 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, Amazon EC2 attempts to shut down and reboot the
instance before creating the image. If the 'No Reboot' option is
set, 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 java.lang.Boolean isNoReboot()
By default, Amazon EC2 attempts to shut down and reboot the instance before creating the image. If the 'No Reboot' option is set, 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 java.util.List<BlockDeviceMapping> getBlockDeviceMappings()
Information about one or more block device mappings.
public void setBlockDeviceMappings(java.util.Collection<BlockDeviceMapping> blockDeviceMappings)
Information about one or more block device mappings.
blockDeviceMappings
- Information about one or more block device mappings.public CreateImageRequest withBlockDeviceMappings(BlockDeviceMapping... blockDeviceMappings)
Information about one or more block device mappings.
NOTE: This method appends the values to the existing list (if
any). Use setBlockDeviceMappings(java.util.Collection)
or
withBlockDeviceMappings(java.util.Collection)
if you want to
override the existing values.
blockDeviceMappings
- Information about one or more block device mappings.public CreateImageRequest withBlockDeviceMappings(java.util.Collection<BlockDeviceMapping> blockDeviceMappings)
Information about one or more block device mappings.
blockDeviceMappings
- Information about one or more block device mappings.public Request<CreateImageRequest> getDryRunRequest()
getDryRunRequest
in interface DryRunSupportedRequest<CreateImageRequest>
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public CreateImageRequest clone()
AmazonWebServiceRequest
clone
in class AmazonWebServiceRequest
Object.clone()