@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() |
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()
By default, Amazon EC2 attempts to shut down and reboot the instance before creating the image.
|
int |
hashCode() |
Boolean |
isNoReboot()
By default, Amazon EC2 attempts to shut down and reboot the instance 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)
By default, Amazon EC2 attempts to shut down and reboot the instance before creating the image.
|
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)
By default, Amazon EC2 attempts to shut down and reboot the instance before creating the image.
|
addHandlerContext, copyBaseTo, 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. This parameter cannot be used to modify the encryption status of existing volumes or snapshots. To create an AMI with encrypted snapshots, use the CopyImage action.
public void setBlockDeviceMappings(Collection<BlockDeviceMapping> blockDeviceMappings)
The block device mappings. This parameter cannot be used to modify the encryption status of existing volumes or snapshots. To create an AMI with encrypted snapshots, use the CopyImage action.
blockDeviceMappings
- The block device mappings. This parameter cannot be used to modify the encryption status of existing
volumes or snapshots. To create an AMI with encrypted snapshots, use the CopyImage action.public CreateImageRequest withBlockDeviceMappings(BlockDeviceMapping... blockDeviceMappings)
The block device mappings. This parameter cannot be used to modify the encryption status of existing volumes or snapshots. To create an AMI with encrypted snapshots, use the CopyImage action.
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. This parameter cannot be used to modify the encryption status of existing
volumes or snapshots. To create an AMI with encrypted snapshots, use the CopyImage action.public CreateImageRequest withBlockDeviceMappings(Collection<BlockDeviceMapping> blockDeviceMappings)
The block device mappings. This parameter cannot be used to modify the encryption status of existing volumes or snapshots. To create an AMI with encrypted snapshots, use the CopyImage action.
blockDeviceMappings
- The block device mappings. This parameter cannot be used to modify the encryption status of existing
volumes or snapshots. To create an AMI with encrypted snapshots, use the CopyImage action.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)
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 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(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 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 Request<CreateImageRequest> getDryRunRequest()
getDryRunRequest
in interface DryRunSupportedRequest<CreateImageRequest>
public String toString()
toString
in class Object
Object.toString()
public CreateImageRequest clone()
clone
in class AmazonWebServiceRequest
Copyright © 2020. All rights reserved.