@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class CreateImageRequest extends AmazonWebServiceRequest implements Serializable, Cloneable, DryRunSupportedRequest<CreateImageRequest>
NOOP
Constructor and Description |
---|
CreateImageRequest()
Default constructor for CreateImageRequest object.
|
CreateImageRequest(String instanceId,
String name)
Constructs a new CreateImageRequest object.
|
Modifier and Type | Method and Description |
---|---|
CreateImageRequest |
clone()
Creates a shallow clone of this object for all fields except the handler context.
|
boolean |
equals(Object obj) |
List<BlockDeviceMapping> |
getBlockDeviceMappings()
The 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()
Indicates whether or not the instance should be automatically rebooted before creating the image.
|
List<TagSpecification> |
getTagSpecifications()
The tags to apply to the AMI and snapshots on creation.
|
int |
hashCode() |
Boolean |
isNoReboot()
Indicates whether or not the instance should be automatically rebooted before creating the image.
|
void |
setBlockDeviceMappings(Collection<BlockDeviceMapping> blockDeviceMappings)
The 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)
Indicates whether or not the instance should be automatically rebooted before creating the image.
|
void |
setTagSpecifications(Collection<TagSpecification> tagSpecifications)
The tags to apply to the AMI and snapshots on creation.
|
String |
toString()
Returns a string representation of this object.
|
CreateImageRequest |
withBlockDeviceMappings(BlockDeviceMapping... blockDeviceMappings)
The block device mappings.
|
CreateImageRequest |
withBlockDeviceMappings(Collection<BlockDeviceMapping> blockDeviceMappings)
The 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)
Indicates whether or not the instance should be automatically rebooted before creating the image.
|
CreateImageRequest |
withTagSpecifications(Collection<TagSpecification> tagSpecifications)
The tags to apply to the AMI and snapshots on creation.
|
CreateImageRequest |
withTagSpecifications(TagSpecification... tagSpecifications)
The tags to apply to the AMI and snapshots on creation.
|
addHandlerContext, getCloneRoot, getCloneSource, getCustomQueryParameters, getCustomRequestHeaders, getGeneralProgressListener, getHandlerContext, getReadLimit, getRequestClientOptions, getRequestCredentials, getRequestCredentialsProvider, getRequestMetricCollector, getSdkClientExecutionTimeout, getSdkRequestTimeout, putCustomQueryParameter, putCustomRequestHeader, setGeneralProgressListener, setRequestCredentials, setRequestCredentialsProvider, setRequestMetricCollector, setSdkClientExecutionTimeout, setSdkRequestTimeout, withGeneralProgressListener, withRequestCredentialsProvider, withRequestMetricCollector, withSdkClientExecutionTimeout, withSdkRequestTimeout
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, parentheses (()), square brackets ([]), spaces ( ), periods (.), slashes (/), dashes (-), single quotes ('), at-signs (@), or underscores(_)
public List<BlockDeviceMapping> getBlockDeviceMappings()
The block device mappings.
When using the CreateImage action:
You can't change the volume size using the VolumeSize parameter. If you want a different volume size, you must first change the volume size of the source instance.
You can't modify the encryption status of existing volumes or snapshots. To create an AMI with volumes or snapshots that have a different encryption status (for example, where the source volume and snapshots are unencrypted, and you want to create an AMI with encrypted volumes or snapshots), use the CopyImage action.
The only option that can be changed for existing mappings or snapshots is DeleteOnTermination
.
When using the CreateImage action:
You can't change the volume size using the VolumeSize parameter. If you want a different volume size, you must first change the volume size of the source instance.
You can't modify the encryption status of existing volumes or snapshots. To create an AMI with volumes or snapshots that have a different encryption status (for example, where the source volume and snapshots are unencrypted, and you want to create an AMI with encrypted volumes or snapshots), use the CopyImage action.
The only option that can be changed for existing mappings or snapshots is
DeleteOnTermination
.
public void setBlockDeviceMappings(Collection<BlockDeviceMapping> blockDeviceMappings)
The block device mappings.
When using the CreateImage action:
You can't change the volume size using the VolumeSize parameter. If you want a different volume size, you must first change the volume size of the source instance.
You can't modify the encryption status of existing volumes or snapshots. To create an AMI with volumes or snapshots that have a different encryption status (for example, where the source volume and snapshots are unencrypted, and you want to create an AMI with encrypted volumes or snapshots), use the CopyImage action.
The only option that can be changed for existing mappings or snapshots is DeleteOnTermination
.
blockDeviceMappings
- The block device mappings.
When using the CreateImage action:
You can't change the volume size using the VolumeSize parameter. If you want a different volume size, you must first change the volume size of the source instance.
You can't modify the encryption status of existing volumes or snapshots. To create an AMI with volumes or snapshots that have a different encryption status (for example, where the source volume and snapshots are unencrypted, and you want to create an AMI with encrypted volumes or snapshots), use the CopyImage action.
The only option that can be changed for existing mappings or snapshots is DeleteOnTermination
.
public CreateImageRequest withBlockDeviceMappings(BlockDeviceMapping... blockDeviceMappings)
The block device mappings.
When using the CreateImage action:
You can't change the volume size using the VolumeSize parameter. If you want a different volume size, you must first change the volume size of the source instance.
You can't modify the encryption status of existing volumes or snapshots. To create an AMI with volumes or snapshots that have a different encryption status (for example, where the source volume and snapshots are unencrypted, and you want to create an AMI with encrypted volumes or snapshots), use the CopyImage action.
The only option that can be changed for existing mappings or snapshots is DeleteOnTermination
.
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
- The block device mappings.
When using the CreateImage action:
You can't change the volume size using the VolumeSize parameter. If you want a different volume size, you must first change the volume size of the source instance.
You can't modify the encryption status of existing volumes or snapshots. To create an AMI with volumes or snapshots that have a different encryption status (for example, where the source volume and snapshots are unencrypted, and you want to create an AMI with encrypted volumes or snapshots), use the CopyImage action.
The only option that can be changed for existing mappings or snapshots is DeleteOnTermination
.
public CreateImageRequest withBlockDeviceMappings(Collection<BlockDeviceMapping> blockDeviceMappings)
The block device mappings.
When using the CreateImage action:
You can't change the volume size using the VolumeSize parameter. If you want a different volume size, you must first change the volume size of the source instance.
You can't modify the encryption status of existing volumes or snapshots. To create an AMI with volumes or snapshots that have a different encryption status (for example, where the source volume and snapshots are unencrypted, and you want to create an AMI with encrypted volumes or snapshots), use the CopyImage action.
The only option that can be changed for existing mappings or snapshots is DeleteOnTermination
.
blockDeviceMappings
- The block device mappings.
When using the CreateImage action:
You can't change the volume size using the VolumeSize parameter. If you want a different volume size, you must first change the volume size of the source instance.
You can't modify the encryption status of existing volumes or snapshots. To create an AMI with volumes or snapshots that have a different encryption status (for example, where the source volume and snapshots are unencrypted, and you want to create an AMI with encrypted volumes or snapshots), use the CopyImage action.
The only option that can be changed for existing mappings or snapshots is DeleteOnTermination
.
public void setDescription(String description)
A description for the new image.
description
- A description for the new image.public String getDescription()
A description for the new image.
public CreateImageRequest withDescription(String description)
A description for the new image.
description
- A description for the new image.public void setInstanceId(String instanceId)
The ID of the instance.
instanceId
- The ID of the instance.public String getInstanceId()
The ID of the instance.
public CreateImageRequest withInstanceId(String instanceId)
The ID of the instance.
instanceId
- The ID of the instance.public void setName(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 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(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 setNoReboot(Boolean noReboot)
Indicates whether or not the instance should be automatically rebooted before creating the image. Specify one of the following values:
true
- The instance is not rebooted before creating the image. This creates crash-consistent
snapshots that include only the data that has been written to the volumes at the time the snapshots are created.
Buffered data and data in memory that has not yet been written to the volumes is not included in the snapshots.
false
- The instance is rebooted before creating the image. This ensures that all buffered data and
data in memory is written to the volumes before the snapshots are created.
Default: false
noReboot
- Indicates whether or not the instance should be automatically rebooted before creating the image. Specify
one of the following values:
true
- The instance is not rebooted before creating the image. This creates crash-consistent
snapshots that include only the data that has been written to the volumes at the time the snapshots are
created. Buffered data and data in memory that has not yet been written to the volumes is not included in
the snapshots.
false
- The instance is rebooted before creating the image. This ensures that all buffered
data and data in memory is written to the volumes before the snapshots are created.
Default: false
public Boolean getNoReboot()
Indicates whether or not the instance should be automatically rebooted before creating the image. Specify one of the following values:
true
- The instance is not rebooted before creating the image. This creates crash-consistent
snapshots that include only the data that has been written to the volumes at the time the snapshots are created.
Buffered data and data in memory that has not yet been written to the volumes is not included in the snapshots.
false
- The instance is rebooted before creating the image. This ensures that all buffered data and
data in memory is written to the volumes before the snapshots are created.
Default: false
true
- The instance is not rebooted before creating the image. This creates crash-consistent
snapshots that include only the data that has been written to the volumes at the time the snapshots are
created. Buffered data and data in memory that has not yet been written to the volumes is not included in
the snapshots.
false
- The instance is rebooted before creating the image. This ensures that all buffered
data and data in memory is written to the volumes before the snapshots are created.
Default: false
public CreateImageRequest withNoReboot(Boolean noReboot)
Indicates whether or not the instance should be automatically rebooted before creating the image. Specify one of the following values:
true
- The instance is not rebooted before creating the image. This creates crash-consistent
snapshots that include only the data that has been written to the volumes at the time the snapshots are created.
Buffered data and data in memory that has not yet been written to the volumes is not included in the snapshots.
false
- The instance is rebooted before creating the image. This ensures that all buffered data and
data in memory is written to the volumes before the snapshots are created.
Default: false
noReboot
- Indicates whether or not the instance should be automatically rebooted before creating the image. Specify
one of the following values:
true
- The instance is not rebooted before creating the image. This creates crash-consistent
snapshots that include only the data that has been written to the volumes at the time the snapshots are
created. Buffered data and data in memory that has not yet been written to the volumes is not included in
the snapshots.
false
- The instance is rebooted before creating the image. This ensures that all buffered
data and data in memory is written to the volumes before the snapshots are created.
Default: false
public Boolean isNoReboot()
Indicates whether or not the instance should be automatically rebooted before creating the image. Specify one of the following values:
true
- The instance is not rebooted before creating the image. This creates crash-consistent
snapshots that include only the data that has been written to the volumes at the time the snapshots are created.
Buffered data and data in memory that has not yet been written to the volumes is not included in the snapshots.
false
- The instance is rebooted before creating the image. This ensures that all buffered data and
data in memory is written to the volumes before the snapshots are created.
Default: false
true
- The instance is not rebooted before creating the image. This creates crash-consistent
snapshots that include only the data that has been written to the volumes at the time the snapshots are
created. Buffered data and data in memory that has not yet been written to the volumes is not included in
the snapshots.
false
- The instance is rebooted before creating the image. This ensures that all buffered
data and data in memory is written to the volumes before the snapshots are created.
Default: false
public List<TagSpecification> getTagSpecifications()
The tags to apply to the AMI and snapshots on creation. You can tag the AMI, the snapshots, or both.
To tag the AMI, the value for ResourceType
must be image
.
To tag the snapshots that are created of the root volume and of other Amazon EBS volumes that are attached to the
instance, the value for ResourceType
must be snapshot
. The same tag is applied to all
of the snapshots that are created.
If you specify other values for ResourceType
, the request fails.
To tag an AMI or snapshot after it has been created, see CreateTags.
To tag the AMI, the value for ResourceType
must be image
.
To tag the snapshots that are created of the root volume and of other Amazon EBS volumes that are
attached to the instance, the value for ResourceType
must be snapshot
. The same
tag is applied to all of the snapshots that are created.
If you specify other values for ResourceType
, the request fails.
To tag an AMI or snapshot after it has been created, see CreateTags.
public void setTagSpecifications(Collection<TagSpecification> tagSpecifications)
The tags to apply to the AMI and snapshots on creation. You can tag the AMI, the snapshots, or both.
To tag the AMI, the value for ResourceType
must be image
.
To tag the snapshots that are created of the root volume and of other Amazon EBS volumes that are attached to the
instance, the value for ResourceType
must be snapshot
. The same tag is applied to all
of the snapshots that are created.
If you specify other values for ResourceType
, the request fails.
To tag an AMI or snapshot after it has been created, see CreateTags.
tagSpecifications
- The tags to apply to the AMI and snapshots on creation. You can tag the AMI, the snapshots, or both.
To tag the AMI, the value for ResourceType
must be image
.
To tag the snapshots that are created of the root volume and of other Amazon EBS volumes that are attached
to the instance, the value for ResourceType
must be snapshot
. The same tag is
applied to all of the snapshots that are created.
If you specify other values for ResourceType
, the request fails.
To tag an AMI or snapshot after it has been created, see CreateTags.
public CreateImageRequest withTagSpecifications(TagSpecification... tagSpecifications)
The tags to apply to the AMI and snapshots on creation. You can tag the AMI, the snapshots, or both.
To tag the AMI, the value for ResourceType
must be image
.
To tag the snapshots that are created of the root volume and of other Amazon EBS volumes that are attached to the
instance, the value for ResourceType
must be snapshot
. The same tag is applied to all
of the snapshots that are created.
If you specify other values for ResourceType
, the request fails.
To tag an AMI or snapshot after it has been created, see CreateTags.
NOTE: This method appends the values to the existing list (if any). Use
setTagSpecifications(java.util.Collection)
or withTagSpecifications(java.util.Collection)
if
you want to override the existing values.
tagSpecifications
- The tags to apply to the AMI and snapshots on creation. You can tag the AMI, the snapshots, or both.
To tag the AMI, the value for ResourceType
must be image
.
To tag the snapshots that are created of the root volume and of other Amazon EBS volumes that are attached
to the instance, the value for ResourceType
must be snapshot
. The same tag is
applied to all of the snapshots that are created.
If you specify other values for ResourceType
, the request fails.
To tag an AMI or snapshot after it has been created, see CreateTags.
public CreateImageRequest withTagSpecifications(Collection<TagSpecification> tagSpecifications)
The tags to apply to the AMI and snapshots on creation. You can tag the AMI, the snapshots, or both.
To tag the AMI, the value for ResourceType
must be image
.
To tag the snapshots that are created of the root volume and of other Amazon EBS volumes that are attached to the
instance, the value for ResourceType
must be snapshot
. The same tag is applied to all
of the snapshots that are created.
If you specify other values for ResourceType
, the request fails.
To tag an AMI or snapshot after it has been created, see CreateTags.
tagSpecifications
- The tags to apply to the AMI and snapshots on creation. You can tag the AMI, the snapshots, or both.
To tag the AMI, the value for ResourceType
must be image
.
To tag the snapshots that are created of the root volume and of other Amazon EBS volumes that are attached
to the instance, the value for ResourceType
must be snapshot
. The same tag is
applied to all of the snapshots that are created.
If you specify other values for ResourceType
, the request fails.
To tag an AMI or snapshot after it has been created, see CreateTags.
public Request<CreateImageRequest> getDryRunRequest()
getDryRunRequest
in interface DryRunSupportedRequest<CreateImageRequest>
public String toString()
toString
in class Object
Object.toString()
public CreateImageRequest clone()
AmazonWebServiceRequest
clone
in class AmazonWebServiceRequest
Object.clone()