Struct aws_sdk_ec2::operation::create_image::CreateImageInput
source · #[non_exhaustive]pub struct CreateImageInput {
pub block_device_mappings: Option<Vec<BlockDeviceMapping>>,
pub description: Option<String>,
pub dry_run: Option<bool>,
pub instance_id: Option<String>,
pub name: Option<String>,
pub no_reboot: Option<bool>,
pub tag_specifications: Option<Vec<TagSpecification>>,
}
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.block_device_mappings: Option<Vec<BlockDeviceMapping>>
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.
description: Option<String>
A description for the new image.
dry_run: Option<bool>
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation
. Otherwise, it is UnauthorizedOperation
.
instance_id: Option<String>
The ID of the instance.
name: Option<String>
A name for the new image.
Constraints: 3-128 alphanumeric characters, parentheses (()), square brackets ([]), spaces ( ), periods (.), slashes (/), dashes (-), single quotes ('), at-signs (@), or underscores(_)
no_reboot: Option<bool>
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
tag_specifications: Option<Vec<TagSpecification>>
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 beimage
. -
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 besnapshot
. 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.
Implementations§
source§impl CreateImageInput
impl CreateImageInput
sourcepub fn block_device_mappings(&self) -> &[BlockDeviceMapping]
pub fn block_device_mappings(&self) -> &[BlockDeviceMapping]
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.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .block_device_mappings.is_none()
.
sourcepub fn description(&self) -> Option<&str>
pub fn description(&self) -> Option<&str>
A description for the new image.
sourcepub fn dry_run(&self) -> Option<bool>
pub fn dry_run(&self) -> Option<bool>
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation
. Otherwise, it is UnauthorizedOperation
.
sourcepub fn instance_id(&self) -> Option<&str>
pub fn instance_id(&self) -> Option<&str>
The ID of the instance.
sourcepub fn name(&self) -> Option<&str>
pub fn name(&self) -> Option<&str>
A name for the new image.
Constraints: 3-128 alphanumeric characters, parentheses (()), square brackets ([]), spaces ( ), periods (.), slashes (/), dashes (-), single quotes ('), at-signs (@), or underscores(_)
sourcepub fn no_reboot(&self) -> Option<bool>
pub fn no_reboot(&self) -> Option<bool>
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
sourcepub fn tag_specifications(&self) -> &[TagSpecification]
pub fn tag_specifications(&self) -> &[TagSpecification]
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 beimage
. -
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 besnapshot
. 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.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .tag_specifications.is_none()
.
source§impl CreateImageInput
impl CreateImageInput
sourcepub fn builder() -> CreateImageInputBuilder
pub fn builder() -> CreateImageInputBuilder
Creates a new builder-style object to manufacture CreateImageInput
.
Trait Implementations§
source§impl Clone for CreateImageInput
impl Clone for CreateImageInput
source§fn clone(&self) -> CreateImageInput
fn clone(&self) -> CreateImageInput
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for CreateImageInput
impl Debug for CreateImageInput
source§impl PartialEq for CreateImageInput
impl PartialEq for CreateImageInput
source§fn eq(&self, other: &CreateImageInput) -> bool
fn eq(&self, other: &CreateImageInput) -> bool
self
and other
values to be equal, and is used
by ==
.