pub struct CreateImageFluentBuilder { /* private fields */ }
Expand description
Fluent builder constructing a request to CreateImage
.
Creates an Amazon EBS-backed AMI from an Amazon EBS-backed instance that is either running or stopped.
If you customized your instance with instance store volumes or Amazon EBS volumes in addition to the root device volume, the new AMI contains block device mapping information for those volumes. When you launch an instance from this new AMI, the instance automatically launches with those additional volumes.
For more information, see Create an Amazon EBS-backed Linux AMI in the Amazon Elastic Compute Cloud User Guide.
Implementations§
source§impl CreateImageFluentBuilder
impl CreateImageFluentBuilder
sourcepub fn as_input(&self) -> &CreateImageInputBuilder
pub fn as_input(&self) -> &CreateImageInputBuilder
Access the CreateImage as a reference.
sourcepub async fn send(
self
) -> Result<CreateImageOutput, SdkError<CreateImageError, HttpResponse>>
pub async fn send( self ) -> Result<CreateImageOutput, SdkError<CreateImageError, HttpResponse>>
Sends the request and returns the response.
If an error occurs, an SdkError
will be returned with additional details that
can be matched against.
By default, any retryable failures will be retried twice. Retry behavior is configurable with the RetryConfig, which can be set when configuring the client.
sourcepub async fn customize(
self
) -> Result<CustomizableOperation<CreateImageOutput, CreateImageError>, SdkError<CreateImageError>>
pub async fn customize( self ) -> Result<CustomizableOperation<CreateImageOutput, CreateImageError>, SdkError<CreateImageError>>
Consumes this builder, creating a customizable operation that can be modified before being sent.
sourcepub fn block_device_mappings(self, input: BlockDeviceMapping) -> Self
pub fn block_device_mappings(self, input: BlockDeviceMapping) -> Self
Appends an item to BlockDeviceMappings
.
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 TagSpecifications
.
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.
Trait Implementations§
source§impl Clone for CreateImageFluentBuilder
impl Clone for CreateImageFluentBuilder
source§fn clone(&self) -> CreateImageFluentBuilder
fn clone(&self) -> CreateImageFluentBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more