#[non_exhaustive]pub struct ImageBuilder { /* private fields */ }
Expand description
A builder for Image
.
Implementations§
Source§impl ImageBuilder
impl ImageBuilder
Sourcepub fn name(self, input: impl Into<String>) -> Self
pub fn name(self, input: impl Into<String>) -> Self
The name of the image.
This field is required.Sourcepub fn base_image_arn(self, input: impl Into<String>) -> Self
pub fn base_image_arn(self, input: impl Into<String>) -> Self
The ARN of the image from which this image was created.
Sourcepub fn set_base_image_arn(self, input: Option<String>) -> Self
pub fn set_base_image_arn(self, input: Option<String>) -> Self
The ARN of the image from which this image was created.
Sourcepub fn get_base_image_arn(&self) -> &Option<String>
pub fn get_base_image_arn(&self) -> &Option<String>
The ARN of the image from which this image was created.
Sourcepub fn display_name(self, input: impl Into<String>) -> Self
pub fn display_name(self, input: impl Into<String>) -> Self
The image name to display.
Sourcepub fn set_display_name(self, input: Option<String>) -> Self
pub fn set_display_name(self, input: Option<String>) -> Self
The image name to display.
Sourcepub fn get_display_name(&self) -> &Option<String>
pub fn get_display_name(&self) -> &Option<String>
The image name to display.
Sourcepub fn state(self, input: ImageState) -> Self
pub fn state(self, input: ImageState) -> Self
The image starts in the PENDING
state. If image creation succeeds, the state is AVAILABLE
. If image creation fails, the state is FAILED
.
Sourcepub fn set_state(self, input: Option<ImageState>) -> Self
pub fn set_state(self, input: Option<ImageState>) -> Self
The image starts in the PENDING
state. If image creation succeeds, the state is AVAILABLE
. If image creation fails, the state is FAILED
.
Sourcepub fn get_state(&self) -> &Option<ImageState>
pub fn get_state(&self) -> &Option<ImageState>
The image starts in the PENDING
state. If image creation succeeds, the state is AVAILABLE
. If image creation fails, the state is FAILED
.
Sourcepub fn visibility(self, input: VisibilityType) -> Self
pub fn visibility(self, input: VisibilityType) -> Self
Indicates whether the image is public or private.
Sourcepub fn set_visibility(self, input: Option<VisibilityType>) -> Self
pub fn set_visibility(self, input: Option<VisibilityType>) -> Self
Indicates whether the image is public or private.
Sourcepub fn get_visibility(&self) -> &Option<VisibilityType>
pub fn get_visibility(&self) -> &Option<VisibilityType>
Indicates whether the image is public or private.
Sourcepub fn image_builder_supported(self, input: bool) -> Self
pub fn image_builder_supported(self, input: bool) -> Self
Indicates whether an image builder can be launched from this image.
Sourcepub fn set_image_builder_supported(self, input: Option<bool>) -> Self
pub fn set_image_builder_supported(self, input: Option<bool>) -> Self
Indicates whether an image builder can be launched from this image.
Sourcepub fn get_image_builder_supported(&self) -> &Option<bool>
pub fn get_image_builder_supported(&self) -> &Option<bool>
Indicates whether an image builder can be launched from this image.
Sourcepub fn image_builder_name(self, input: impl Into<String>) -> Self
pub fn image_builder_name(self, input: impl Into<String>) -> Self
The name of the image builder that was used to create the private image. If the image is shared, this value is null.
Sourcepub fn set_image_builder_name(self, input: Option<String>) -> Self
pub fn set_image_builder_name(self, input: Option<String>) -> Self
The name of the image builder that was used to create the private image. If the image is shared, this value is null.
Sourcepub fn get_image_builder_name(&self) -> &Option<String>
pub fn get_image_builder_name(&self) -> &Option<String>
The name of the image builder that was used to create the private image. If the image is shared, this value is null.
Sourcepub fn platform(self, input: PlatformType) -> Self
pub fn platform(self, input: PlatformType) -> Self
The operating system platform of the image.
Sourcepub fn set_platform(self, input: Option<PlatformType>) -> Self
pub fn set_platform(self, input: Option<PlatformType>) -> Self
The operating system platform of the image.
Sourcepub fn get_platform(&self) -> &Option<PlatformType>
pub fn get_platform(&self) -> &Option<PlatformType>
The operating system platform of the image.
Sourcepub fn description(self, input: impl Into<String>) -> Self
pub fn description(self, input: impl Into<String>) -> Self
The description to display.
Sourcepub fn set_description(self, input: Option<String>) -> Self
pub fn set_description(self, input: Option<String>) -> Self
The description to display.
Sourcepub fn get_description(&self) -> &Option<String>
pub fn get_description(&self) -> &Option<String>
The description to display.
Sourcepub fn state_change_reason(self, input: ImageStateChangeReason) -> Self
pub fn state_change_reason(self, input: ImageStateChangeReason) -> Self
The reason why the last state change occurred.
Sourcepub fn set_state_change_reason(
self,
input: Option<ImageStateChangeReason>,
) -> Self
pub fn set_state_change_reason( self, input: Option<ImageStateChangeReason>, ) -> Self
The reason why the last state change occurred.
Sourcepub fn get_state_change_reason(&self) -> &Option<ImageStateChangeReason>
pub fn get_state_change_reason(&self) -> &Option<ImageStateChangeReason>
The reason why the last state change occurred.
Sourcepub fn applications(self, input: Application) -> Self
pub fn applications(self, input: Application) -> Self
Appends an item to applications
.
To override the contents of this collection use set_applications
.
The applications associated with the image.
Sourcepub fn set_applications(self, input: Option<Vec<Application>>) -> Self
pub fn set_applications(self, input: Option<Vec<Application>>) -> Self
The applications associated with the image.
Sourcepub fn get_applications(&self) -> &Option<Vec<Application>>
pub fn get_applications(&self) -> &Option<Vec<Application>>
The applications associated with the image.
Sourcepub fn created_time(self, input: DateTime) -> Self
pub fn created_time(self, input: DateTime) -> Self
The time the image was created.
Sourcepub fn set_created_time(self, input: Option<DateTime>) -> Self
pub fn set_created_time(self, input: Option<DateTime>) -> Self
The time the image was created.
Sourcepub fn get_created_time(&self) -> &Option<DateTime>
pub fn get_created_time(&self) -> &Option<DateTime>
The time the image was created.
Sourcepub fn public_base_image_released_date(self, input: DateTime) -> Self
pub fn public_base_image_released_date(self, input: DateTime) -> Self
The release date of the public base image. For private images, this date is the release date of the base image from which the image was created.
Sourcepub fn set_public_base_image_released_date(
self,
input: Option<DateTime>,
) -> Self
pub fn set_public_base_image_released_date( self, input: Option<DateTime>, ) -> Self
The release date of the public base image. For private images, this date is the release date of the base image from which the image was created.
Sourcepub fn get_public_base_image_released_date(&self) -> &Option<DateTime>
pub fn get_public_base_image_released_date(&self) -> &Option<DateTime>
The release date of the public base image. For private images, this date is the release date of the base image from which the image was created.
Sourcepub fn appstream_agent_version(self, input: impl Into<String>) -> Self
pub fn appstream_agent_version(self, input: impl Into<String>) -> Self
The version of the AppStream 2.0 agent to use for instances that are launched from this image.
Sourcepub fn set_appstream_agent_version(self, input: Option<String>) -> Self
pub fn set_appstream_agent_version(self, input: Option<String>) -> Self
The version of the AppStream 2.0 agent to use for instances that are launched from this image.
Sourcepub fn get_appstream_agent_version(&self) -> &Option<String>
pub fn get_appstream_agent_version(&self) -> &Option<String>
The version of the AppStream 2.0 agent to use for instances that are launched from this image.
Sourcepub fn image_permissions(self, input: ImagePermissions) -> Self
pub fn image_permissions(self, input: ImagePermissions) -> Self
The permissions to provide to the destination AWS account for the specified image.
Sourcepub fn set_image_permissions(self, input: Option<ImagePermissions>) -> Self
pub fn set_image_permissions(self, input: Option<ImagePermissions>) -> Self
The permissions to provide to the destination AWS account for the specified image.
Sourcepub fn get_image_permissions(&self) -> &Option<ImagePermissions>
pub fn get_image_permissions(&self) -> &Option<ImagePermissions>
The permissions to provide to the destination AWS account for the specified image.
Sourcepub fn image_errors(self, input: ResourceError) -> Self
pub fn image_errors(self, input: ResourceError) -> Self
Appends an item to image_errors
.
To override the contents of this collection use set_image_errors
.
Describes the errors that are returned when a new image can't be created.
Sourcepub fn set_image_errors(self, input: Option<Vec<ResourceError>>) -> Self
pub fn set_image_errors(self, input: Option<Vec<ResourceError>>) -> Self
Describes the errors that are returned when a new image can't be created.
Sourcepub fn get_image_errors(&self) -> &Option<Vec<ResourceError>>
pub fn get_image_errors(&self) -> &Option<Vec<ResourceError>>
Describes the errors that are returned when a new image can't be created.
Sourcepub fn latest_appstream_agent_version(
self,
input: LatestAppstreamAgentVersion,
) -> Self
pub fn latest_appstream_agent_version( self, input: LatestAppstreamAgentVersion, ) -> Self
Indicates whether the image is using the latest AppStream 2.0 agent version or not.
Sourcepub fn set_latest_appstream_agent_version(
self,
input: Option<LatestAppstreamAgentVersion>,
) -> Self
pub fn set_latest_appstream_agent_version( self, input: Option<LatestAppstreamAgentVersion>, ) -> Self
Indicates whether the image is using the latest AppStream 2.0 agent version or not.
Sourcepub fn get_latest_appstream_agent_version(
&self,
) -> &Option<LatestAppstreamAgentVersion>
pub fn get_latest_appstream_agent_version( &self, ) -> &Option<LatestAppstreamAgentVersion>
Indicates whether the image is using the latest AppStream 2.0 agent version or not.
Sourcepub fn supported_instance_families(self, input: impl Into<String>) -> Self
pub fn supported_instance_families(self, input: impl Into<String>) -> Self
Appends an item to supported_instance_families
.
To override the contents of this collection use set_supported_instance_families
.
The supported instances families that determine which image a customer can use when the customer launches a fleet or image builder. The following instances families are supported:
-
General Purpose
-
Compute Optimized
-
Memory Optimized
-
Graphics
-
Graphics Design
-
Graphics Pro
-
Graphics G4
-
Graphics G5
Sourcepub fn set_supported_instance_families(self, input: Option<Vec<String>>) -> Self
pub fn set_supported_instance_families(self, input: Option<Vec<String>>) -> Self
The supported instances families that determine which image a customer can use when the customer launches a fleet or image builder. The following instances families are supported:
-
General Purpose
-
Compute Optimized
-
Memory Optimized
-
Graphics
-
Graphics Design
-
Graphics Pro
-
Graphics G4
-
Graphics G5
Sourcepub fn get_supported_instance_families(&self) -> &Option<Vec<String>>
pub fn get_supported_instance_families(&self) -> &Option<Vec<String>>
The supported instances families that determine which image a customer can use when the customer launches a fleet or image builder. The following instances families are supported:
-
General Purpose
-
Compute Optimized
-
Memory Optimized
-
Graphics
-
Graphics Design
-
Graphics Pro
-
Graphics G4
-
Graphics G5
Sourcepub fn dynamic_app_providers_enabled(
self,
input: DynamicAppProvidersEnabled,
) -> Self
pub fn dynamic_app_providers_enabled( self, input: DynamicAppProvidersEnabled, ) -> Self
Indicates whether dynamic app providers are enabled within an AppStream 2.0 image or not.
Sourcepub fn set_dynamic_app_providers_enabled(
self,
input: Option<DynamicAppProvidersEnabled>,
) -> Self
pub fn set_dynamic_app_providers_enabled( self, input: Option<DynamicAppProvidersEnabled>, ) -> Self
Indicates whether dynamic app providers are enabled within an AppStream 2.0 image or not.
Sourcepub fn get_dynamic_app_providers_enabled(
&self,
) -> &Option<DynamicAppProvidersEnabled>
pub fn get_dynamic_app_providers_enabled( &self, ) -> &Option<DynamicAppProvidersEnabled>
Indicates whether dynamic app providers are enabled within an AppStream 2.0 image or not.
Indicates whether the image is shared with another account ID.
Indicates whether the image is shared with another account ID.
Indicates whether the image is shared with another account ID.
Trait Implementations§
Source§impl Clone for ImageBuilder
impl Clone for ImageBuilder
Source§fn clone(&self) -> ImageBuilder
fn clone(&self) -> ImageBuilder
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for ImageBuilder
impl Debug for ImageBuilder
Source§impl Default for ImageBuilder
impl Default for ImageBuilder
Source§fn default() -> ImageBuilder
fn default() -> ImageBuilder
Source§impl PartialEq for ImageBuilder
impl PartialEq for ImageBuilder
impl StructuralPartialEq for ImageBuilder
Auto Trait Implementations§
impl Freeze for ImageBuilder
impl RefUnwindSafe for ImageBuilder
impl Send for ImageBuilder
impl Sync for ImageBuilder
impl Unpin for ImageBuilder
impl UnwindSafe for ImageBuilder
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);