#[non_exhaustive]pub struct CreateImageInputBuilder { /* private fields */ }
Expand description
A builder for CreateImageInput
.
Implementations§
source§impl CreateImageInputBuilder
impl CreateImageInputBuilder
sourcepub fn block_device_mappings(self, input: BlockDeviceMapping) -> Self
pub fn block_device_mappings(self, input: BlockDeviceMapping) -> Self
Appends an item to block_device_mappings
.
To override the contents of this collection use set_block_device_mappings
.
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.
sourcepub fn set_block_device_mappings(
self,
input: Option<Vec<BlockDeviceMapping>>
) -> Self
pub fn set_block_device_mappings( self, input: Option<Vec<BlockDeviceMapping>> ) -> Self
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.
sourcepub fn get_block_device_mappings(&self) -> &Option<Vec<BlockDeviceMapping>>
pub fn get_block_device_mappings(&self) -> &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.
sourcepub fn description(self, input: impl Into<String>) -> Self
pub fn description(self, input: impl Into<String>) -> Self
A description for the new image.
sourcepub fn set_description(self, input: Option<String>) -> Self
pub fn set_description(self, input: Option<String>) -> Self
A description for the new image.
sourcepub fn get_description(&self) -> &Option<String>
pub fn get_description(&self) -> &Option<String>
A description for the new image.
sourcepub fn dry_run(self, input: bool) -> Self
pub fn dry_run(self, input: bool) -> Self
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 set_dry_run(self, input: Option<bool>) -> Self
pub fn set_dry_run(self, input: Option<bool>) -> Self
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 get_dry_run(&self) -> &Option<bool>
pub fn get_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, input: impl Into<String>) -> Self
pub fn instance_id(self, input: impl Into<String>) -> Self
The ID of the instance.
sourcepub fn set_instance_id(self, input: Option<String>) -> Self
pub fn set_instance_id(self, input: Option<String>) -> Self
The ID of the instance.
sourcepub fn get_instance_id(&self) -> &Option<String>
pub fn get_instance_id(&self) -> &Option<String>
The ID of the instance.
sourcepub fn name(self, input: impl Into<String>) -> Self
pub fn name(self, input: impl Into<String>) -> Self
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 set_name(self, input: Option<String>) -> Self
pub fn set_name(self, input: Option<String>) -> Self
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 get_name(&self) -> &Option<String>
pub fn get_name(&self) -> &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(_)
sourcepub fn no_reboot(self, input: bool) -> Self
pub fn no_reboot(self, input: bool) -> Self
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 set_no_reboot(self, input: Option<bool>) -> Self
pub fn set_no_reboot(self, input: Option<bool>) -> Self
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 get_no_reboot(&self) -> &Option<bool>
pub fn get_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, input: TagSpecification) -> Self
pub fn tag_specifications(self, input: TagSpecification) -> Self
Appends an item to tag_specifications
.
To override the contents of this collection use set_tag_specifications
.
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.
sourcepub fn set_tag_specifications(
self,
input: Option<Vec<TagSpecification>>
) -> Self
pub fn set_tag_specifications( self, input: Option<Vec<TagSpecification>> ) -> Self
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.
sourcepub fn get_tag_specifications(&self) -> &Option<Vec<TagSpecification>>
pub fn get_tag_specifications(&self) -> &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.
sourcepub fn build(self) -> Result<CreateImageInput, BuildError>
pub fn build(self) -> Result<CreateImageInput, BuildError>
Consumes the builder and constructs a CreateImageInput
.
source§impl CreateImageInputBuilder
impl CreateImageInputBuilder
sourcepub async fn send_with(
self,
client: &Client
) -> Result<CreateImageOutput, SdkError<CreateImageError, HttpResponse>>
pub async fn send_with( self, client: &Client ) -> Result<CreateImageOutput, SdkError<CreateImageError, HttpResponse>>
Sends a request with this input using the given client.
Trait Implementations§
source§impl Clone for CreateImageInputBuilder
impl Clone for CreateImageInputBuilder
source§fn clone(&self) -> CreateImageInputBuilder
fn clone(&self) -> CreateImageInputBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for CreateImageInputBuilder
impl Debug for CreateImageInputBuilder
source§impl Default for CreateImageInputBuilder
impl Default for CreateImageInputBuilder
source§fn default() -> CreateImageInputBuilder
fn default() -> CreateImageInputBuilder
source§impl PartialEq<CreateImageInputBuilder> for CreateImageInputBuilder
impl PartialEq<CreateImageInputBuilder> for CreateImageInputBuilder
source§fn eq(&self, other: &CreateImageInputBuilder) -> bool
fn eq(&self, other: &CreateImageInputBuilder) -> bool
self
and other
values to be equal, and is used
by ==
.