#[non_exhaustive]pub struct CopyImageInputBuilder { /* private fields */ }
Expand description
A builder for CopyImageInput
.
Implementations§
Source§impl CopyImageInputBuilder
impl CopyImageInputBuilder
Sourcepub fn client_token(self, input: impl Into<String>) -> Self
pub fn client_token(self, input: impl Into<String>) -> Self
Unique, case-sensitive identifier you provide to ensure idempotency of the request. For more information, see Ensuring idempotency in Amazon EC2 API requests in the Amazon EC2 API Reference.
Sourcepub fn set_client_token(self, input: Option<String>) -> Self
pub fn set_client_token(self, input: Option<String>) -> Self
Unique, case-sensitive identifier you provide to ensure idempotency of the request. For more information, see Ensuring idempotency in Amazon EC2 API requests in the Amazon EC2 API Reference.
Sourcepub fn get_client_token(&self) -> &Option<String>
pub fn get_client_token(&self) -> &Option<String>
Unique, case-sensitive identifier you provide to ensure idempotency of the request. For more information, see Ensuring idempotency in Amazon EC2 API requests in the Amazon EC2 API Reference.
Sourcepub fn description(self, input: impl Into<String>) -> Self
pub fn description(self, input: impl Into<String>) -> Self
A description for the new AMI in the destination Region.
Sourcepub fn set_description(self, input: Option<String>) -> Self
pub fn set_description(self, input: Option<String>) -> Self
A description for the new AMI in the destination Region.
Sourcepub fn get_description(&self) -> &Option<String>
pub fn get_description(&self) -> &Option<String>
A description for the new AMI in the destination Region.
Sourcepub fn encrypted(self, input: bool) -> Self
pub fn encrypted(self, input: bool) -> Self
Specifies whether the destination snapshots of the copied image should be encrypted. You can encrypt a copy of an unencrypted snapshot, but you cannot create an unencrypted copy of an encrypted snapshot. The default KMS key for Amazon EBS is used unless you specify a non-default Key Management Service (KMS) KMS key using KmsKeyId
. For more information, see Use encryption with EBS-backed AMIs in the Amazon EC2 User Guide.
Sourcepub fn set_encrypted(self, input: Option<bool>) -> Self
pub fn set_encrypted(self, input: Option<bool>) -> Self
Specifies whether the destination snapshots of the copied image should be encrypted. You can encrypt a copy of an unencrypted snapshot, but you cannot create an unencrypted copy of an encrypted snapshot. The default KMS key for Amazon EBS is used unless you specify a non-default Key Management Service (KMS) KMS key using KmsKeyId
. For more information, see Use encryption with EBS-backed AMIs in the Amazon EC2 User Guide.
Sourcepub fn get_encrypted(&self) -> &Option<bool>
pub fn get_encrypted(&self) -> &Option<bool>
Specifies whether the destination snapshots of the copied image should be encrypted. You can encrypt a copy of an unencrypted snapshot, but you cannot create an unencrypted copy of an encrypted snapshot. The default KMS key for Amazon EBS is used unless you specify a non-default Key Management Service (KMS) KMS key using KmsKeyId
. For more information, see Use encryption with EBS-backed AMIs in the Amazon EC2 User Guide.
Sourcepub fn kms_key_id(self, input: impl Into<String>) -> Self
pub fn kms_key_id(self, input: impl Into<String>) -> Self
The identifier of the symmetric Key Management Service (KMS) KMS key to use when creating encrypted volumes. If this parameter is not specified, your Amazon Web Services managed KMS key for Amazon EBS is used. If you specify a KMS key, you must also set the encrypted state to true
.
You can specify a KMS key using any of the following:
-
Key ID. For example, 1234abcd-12ab-34cd-56ef-1234567890ab.
-
Key alias. For example, alias/ExampleAlias.
-
Key ARN. For example, arn:aws:kms:us-east-1:012345678910:key/1234abcd-12ab-34cd-56ef-1234567890ab.
-
Alias ARN. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias.
Amazon Web Services authenticates the KMS key asynchronously. Therefore, if you specify an identifier that is not valid, the action can appear to complete, but eventually fails.
The specified KMS key must exist in the destination Region.
Amazon EBS does not support asymmetric KMS keys.
Sourcepub fn set_kms_key_id(self, input: Option<String>) -> Self
pub fn set_kms_key_id(self, input: Option<String>) -> Self
The identifier of the symmetric Key Management Service (KMS) KMS key to use when creating encrypted volumes. If this parameter is not specified, your Amazon Web Services managed KMS key for Amazon EBS is used. If you specify a KMS key, you must also set the encrypted state to true
.
You can specify a KMS key using any of the following:
-
Key ID. For example, 1234abcd-12ab-34cd-56ef-1234567890ab.
-
Key alias. For example, alias/ExampleAlias.
-
Key ARN. For example, arn:aws:kms:us-east-1:012345678910:key/1234abcd-12ab-34cd-56ef-1234567890ab.
-
Alias ARN. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias.
Amazon Web Services authenticates the KMS key asynchronously. Therefore, if you specify an identifier that is not valid, the action can appear to complete, but eventually fails.
The specified KMS key must exist in the destination Region.
Amazon EBS does not support asymmetric KMS keys.
Sourcepub fn get_kms_key_id(&self) -> &Option<String>
pub fn get_kms_key_id(&self) -> &Option<String>
The identifier of the symmetric Key Management Service (KMS) KMS key to use when creating encrypted volumes. If this parameter is not specified, your Amazon Web Services managed KMS key for Amazon EBS is used. If you specify a KMS key, you must also set the encrypted state to true
.
You can specify a KMS key using any of the following:
-
Key ID. For example, 1234abcd-12ab-34cd-56ef-1234567890ab.
-
Key alias. For example, alias/ExampleAlias.
-
Key ARN. For example, arn:aws:kms:us-east-1:012345678910:key/1234abcd-12ab-34cd-56ef-1234567890ab.
-
Alias ARN. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias.
Amazon Web Services authenticates the KMS key asynchronously. Therefore, if you specify an identifier that is not valid, the action can appear to complete, but eventually fails.
The specified KMS key must exist in the destination Region.
Amazon EBS does not support asymmetric KMS keys.
Sourcepub fn name(self, input: impl Into<String>) -> Self
pub fn name(self, input: impl Into<String>) -> Self
The name of the new AMI in the destination Region.
This field is required.Sourcepub fn set_name(self, input: Option<String>) -> Self
pub fn set_name(self, input: Option<String>) -> Self
The name of the new AMI in the destination Region.
Sourcepub fn source_image_id(self, input: impl Into<String>) -> Self
pub fn source_image_id(self, input: impl Into<String>) -> Self
The ID of the AMI to copy.
This field is required.Sourcepub fn set_source_image_id(self, input: Option<String>) -> Self
pub fn set_source_image_id(self, input: Option<String>) -> Self
The ID of the AMI to copy.
Sourcepub fn get_source_image_id(&self) -> &Option<String>
pub fn get_source_image_id(&self) -> &Option<String>
The ID of the AMI to copy.
Sourcepub fn source_region(self, input: impl Into<String>) -> Self
pub fn source_region(self, input: impl Into<String>) -> Self
The name of the Region that contains the AMI to copy.
This field is required.Sourcepub fn set_source_region(self, input: Option<String>) -> Self
pub fn set_source_region(self, input: Option<String>) -> Self
The name of the Region that contains the AMI to copy.
Sourcepub fn get_source_region(&self) -> &Option<String>
pub fn get_source_region(&self) -> &Option<String>
The name of the Region that contains the AMI to copy.
Sourcepub fn destination_outpost_arn(self, input: impl Into<String>) -> Self
pub fn destination_outpost_arn(self, input: impl Into<String>) -> Self
The Amazon Resource Name (ARN) of the Outpost to which to copy the AMI. Only specify this parameter when copying an AMI from an Amazon Web Services Region to an Outpost. The AMI must be in the Region of the destination Outpost. You cannot copy an AMI from an Outpost to a Region, from one Outpost to another, or within the same Outpost.
For more information, see Copy AMIs from an Amazon Web Services Region to an Outpost in the Amazon EBS User Guide.
Sourcepub fn set_destination_outpost_arn(self, input: Option<String>) -> Self
pub fn set_destination_outpost_arn(self, input: Option<String>) -> Self
The Amazon Resource Name (ARN) of the Outpost to which to copy the AMI. Only specify this parameter when copying an AMI from an Amazon Web Services Region to an Outpost. The AMI must be in the Region of the destination Outpost. You cannot copy an AMI from an Outpost to a Region, from one Outpost to another, or within the same Outpost.
For more information, see Copy AMIs from an Amazon Web Services Region to an Outpost in the Amazon EBS User Guide.
Sourcepub fn get_destination_outpost_arn(&self) -> &Option<String>
pub fn get_destination_outpost_arn(&self) -> &Option<String>
The Amazon Resource Name (ARN) of the Outpost to which to copy the AMI. Only specify this parameter when copying an AMI from an Amazon Web Services Region to an Outpost. The AMI must be in the Region of the destination Outpost. You cannot copy an AMI from an Outpost to a Region, from one Outpost to another, or within the same Outpost.
For more information, see Copy AMIs from an Amazon Web Services Region to an Outpost in the Amazon EBS User Guide.
Indicates whether to include your user-defined AMI tags when copying the AMI.
The following tags will not be copied:
-
System tags (prefixed with
aws:
) -
For public and shared AMIs, user-defined tags that are attached by other Amazon Web Services accounts
Default: Your user-defined AMI tags are not copied.
Indicates whether to include your user-defined AMI tags when copying the AMI.
The following tags will not be copied:
-
System tags (prefixed with
aws:
) -
For public and shared AMIs, user-defined tags that are attached by other Amazon Web Services accounts
Default: Your user-defined AMI tags are not copied.
Indicates whether to include your user-defined AMI tags when copying the AMI.
The following tags will not be copied:
-
System tags (prefixed with
aws:
) -
For public and shared AMIs, user-defined tags that are attached by other Amazon Web Services accounts
Default: Your user-defined AMI tags are not copied.
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 new AMI and new snapshots. You can tag the AMI, the snapshots, or both.
-
To tag the new AMI, the value for
ResourceType
must beimage
. -
To tag the new snapshots, the value for
ResourceType
must besnapshot
. The same tag is applied to all the new snapshots.
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 new AMI and new snapshots. You can tag the AMI, the snapshots, or both.
-
To tag the new AMI, the value for
ResourceType
must beimage
. -
To tag the new snapshots, the value for
ResourceType
must besnapshot
. The same tag is applied to all the new snapshots.
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 new AMI and new snapshots. You can tag the AMI, the snapshots, or both.
-
To tag the new AMI, the value for
ResourceType
must beimage
. -
To tag the new snapshots, the value for
ResourceType
must besnapshot
. The same tag is applied to all the new snapshots.
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 snapshot_copy_completion_duration_minutes(self, input: i64) -> Self
pub fn snapshot_copy_completion_duration_minutes(self, input: i64) -> Self
Specify a completion duration, in 15 minute increments, to initiate a time-based AMI copy. The specified completion duration applies to each of the snapshots associated with the AMI. Each snapshot associated with the AMI will be completed within the specified completion duration, with copy throughput automatically adjusted for each snapshot based on its size to meet the timing target.
If you do not specify a value, the AMI copy operation is completed on a best-effort basis.
For more information, see Time-based copies for Amazon EBS snapshots and EBS-backed AMIs.
Sourcepub fn set_snapshot_copy_completion_duration_minutes(
self,
input: Option<i64>,
) -> Self
pub fn set_snapshot_copy_completion_duration_minutes( self, input: Option<i64>, ) -> Self
Specify a completion duration, in 15 minute increments, to initiate a time-based AMI copy. The specified completion duration applies to each of the snapshots associated with the AMI. Each snapshot associated with the AMI will be completed within the specified completion duration, with copy throughput automatically adjusted for each snapshot based on its size to meet the timing target.
If you do not specify a value, the AMI copy operation is completed on a best-effort basis.
For more information, see Time-based copies for Amazon EBS snapshots and EBS-backed AMIs.
Sourcepub fn get_snapshot_copy_completion_duration_minutes(&self) -> &Option<i64>
pub fn get_snapshot_copy_completion_duration_minutes(&self) -> &Option<i64>
Specify a completion duration, in 15 minute increments, to initiate a time-based AMI copy. The specified completion duration applies to each of the snapshots associated with the AMI. Each snapshot associated with the AMI will be completed within the specified completion duration, with copy throughput automatically adjusted for each snapshot based on its size to meet the timing target.
If you do not specify a value, the AMI copy operation is completed on a best-effort basis.
For more information, see Time-based copies for Amazon EBS snapshots and EBS-backed AMIs.
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 build(self) -> Result<CopyImageInput, BuildError>
pub fn build(self) -> Result<CopyImageInput, BuildError>
Consumes the builder and constructs a CopyImageInput
.
Source§impl CopyImageInputBuilder
impl CopyImageInputBuilder
Sourcepub async fn send_with(
self,
client: &Client,
) -> Result<CopyImageOutput, SdkError<CopyImageError, HttpResponse>>
pub async fn send_with( self, client: &Client, ) -> Result<CopyImageOutput, SdkError<CopyImageError, HttpResponse>>
Sends a request with this input using the given client.
Trait Implementations§
Source§impl Clone for CopyImageInputBuilder
impl Clone for CopyImageInputBuilder
Source§fn clone(&self) -> CopyImageInputBuilder
fn clone(&self) -> CopyImageInputBuilder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for CopyImageInputBuilder
impl Debug for CopyImageInputBuilder
Source§impl Default for CopyImageInputBuilder
impl Default for CopyImageInputBuilder
Source§fn default() -> CopyImageInputBuilder
fn default() -> CopyImageInputBuilder
Source§impl PartialEq for CopyImageInputBuilder
impl PartialEq for CopyImageInputBuilder
impl StructuralPartialEq for CopyImageInputBuilder
Auto Trait Implementations§
impl Freeze for CopyImageInputBuilder
impl RefUnwindSafe for CopyImageInputBuilder
impl Send for CopyImageInputBuilder
impl Sync for CopyImageInputBuilder
impl Unpin for CopyImageInputBuilder
impl UnwindSafe for CopyImageInputBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
Source§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self
with the foreground set to
value
.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red()
and
green()
, which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg()
:
use yansi::{Paint, Color};
painted.fg(Color::White);
Set foreground color to white using white()
.
use yansi::Paint;
painted.white();
Source§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
Source§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
Source§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Source§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
Source§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
Source§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
Source§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
Source§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self
with the background set to
value
.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red()
and
on_green()
, which have the same functionality but
are pithier.
§Example
Set background color to red using fg()
:
use yansi::{Paint, Color};
painted.bg(Color::Red);
Set background color to red using on_red()
.
use yansi::Paint;
painted.on_red();
Source§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
Source§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
Source§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
Source§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
Source§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Source§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling Attribute
value
.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold()
and
underline()
, which have the same functionality
but are pithier.
§Example
Make text bold using attr()
:
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);
Make text bold using using bold()
.
use yansi::Paint;
painted.bold();
Source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Source§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi
Quirk
value
.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask()
and
wrap()
, which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk()
:
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);
Enable wrapping using wrap()
.
use yansi::Paint;
painted.wrap();
Source§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting()
due to conflicts with Vec::clear()
.
The clear()
method will be removed in a future release.
fn clear(&self) -> Painted<&T>
resetting()
due to conflicts with Vec::clear()
.
The clear()
method will be removed in a future release.Source§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the Condition
value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted
only when both stdout
and stderr
are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);