#[non_exhaustive]pub struct InstanceRefresh {Show 13 fields
pub instance_refresh_id: Option<String>,
pub auto_scaling_group_name: Option<String>,
pub status: Option<InstanceRefreshStatus>,
pub status_reason: Option<String>,
pub start_time: Option<DateTime>,
pub end_time: Option<DateTime>,
pub percentage_complete: Option<i32>,
pub instances_to_update: Option<i32>,
pub progress_details: Option<InstanceRefreshProgressDetails>,
pub preferences: Option<RefreshPreferences>,
pub desired_configuration: Option<DesiredConfiguration>,
pub rollback_details: Option<RollbackDetails>,
pub strategy: Option<RefreshStrategy>,
}Expand description
Describes an instance refresh for an Auto Scaling group.
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.instance_refresh_id: Option<String>The instance refresh ID.
auto_scaling_group_name: Option<String>The name of the Auto Scaling group.
status: Option<InstanceRefreshStatus>The current status for the instance refresh operation:
-
Pending- The request was created, but the instance refresh has not started. -
InProgress- An instance refresh is in progress. -
Successful- An instance refresh completed successfully. -
Failed- An instance refresh failed to complete. You can troubleshoot using the status reason and the scaling activities. -
Cancelling- An ongoing instance refresh is being cancelled. -
Cancelled- The instance refresh is cancelled. -
RollbackInProgress- An instance refresh is being rolled back. -
RollbackFailed- The rollback failed to complete. You can troubleshoot using the status reason and the scaling activities. -
RollbackSuccessful- The rollback completed successfully. -
Baking- Waiting the specified bake time after an instance refresh has finished updating instances.
status_reason: Option<String>The explanation for the specific status assigned to this operation.
start_time: Option<DateTime>The date and time at which the instance refresh began.
end_time: Option<DateTime>The date and time at which the instance refresh ended.
percentage_complete: Option<i32>The percentage of the instance refresh that is complete. For each instance replacement, Amazon EC2 Auto Scaling tracks the instance's health status and warm-up time. When the instance's health status changes to healthy and the specified warm-up time passes, the instance is considered updated and is added to the percentage complete.
PercentageComplete does not include instances that are replaced during a rollback. This value gradually goes back down to zero during a rollback.
instances_to_update: Option<i32>The number of instances remaining to update before the instance refresh is complete.
If you roll back the instance refresh, InstancesToUpdate shows you the number of instances that were not yet updated by the instance refresh. Therefore, these instances don't need to be replaced as part of the rollback.
progress_details: Option<InstanceRefreshProgressDetails>Additional progress details for an Auto Scaling group that has a warm pool.
preferences: Option<RefreshPreferences>The preferences for an instance refresh.
desired_configuration: Option<DesiredConfiguration>Describes the desired configuration for the instance refresh.
rollback_details: Option<RollbackDetails>The rollback details.
strategy: Option<RefreshStrategy>The strategy to use for the instance refresh. This determines how instances in the Auto Scaling group are updated. Default is Rolling.
-
Rolling– Terminates instances and launches replacements in batches -
ReplaceRootVolume– Updates instances by replacing only the root volume without terminating the instance
Implementations§
Source§impl InstanceRefresh
impl InstanceRefresh
Sourcepub fn instance_refresh_id(&self) -> Option<&str>
pub fn instance_refresh_id(&self) -> Option<&str>
The instance refresh ID.
Sourcepub fn auto_scaling_group_name(&self) -> Option<&str>
pub fn auto_scaling_group_name(&self) -> Option<&str>
The name of the Auto Scaling group.
Sourcepub fn status(&self) -> Option<&InstanceRefreshStatus>
pub fn status(&self) -> Option<&InstanceRefreshStatus>
The current status for the instance refresh operation:
-
Pending- The request was created, but the instance refresh has not started. -
InProgress- An instance refresh is in progress. -
Successful- An instance refresh completed successfully. -
Failed- An instance refresh failed to complete. You can troubleshoot using the status reason and the scaling activities. -
Cancelling- An ongoing instance refresh is being cancelled. -
Cancelled- The instance refresh is cancelled. -
RollbackInProgress- An instance refresh is being rolled back. -
RollbackFailed- The rollback failed to complete. You can troubleshoot using the status reason and the scaling activities. -
RollbackSuccessful- The rollback completed successfully. -
Baking- Waiting the specified bake time after an instance refresh has finished updating instances.
Sourcepub fn status_reason(&self) -> Option<&str>
pub fn status_reason(&self) -> Option<&str>
The explanation for the specific status assigned to this operation.
Sourcepub fn start_time(&self) -> Option<&DateTime>
pub fn start_time(&self) -> Option<&DateTime>
The date and time at which the instance refresh began.
Sourcepub fn end_time(&self) -> Option<&DateTime>
pub fn end_time(&self) -> Option<&DateTime>
The date and time at which the instance refresh ended.
Sourcepub fn percentage_complete(&self) -> Option<i32>
pub fn percentage_complete(&self) -> Option<i32>
The percentage of the instance refresh that is complete. For each instance replacement, Amazon EC2 Auto Scaling tracks the instance's health status and warm-up time. When the instance's health status changes to healthy and the specified warm-up time passes, the instance is considered updated and is added to the percentage complete.
PercentageComplete does not include instances that are replaced during a rollback. This value gradually goes back down to zero during a rollback.
Sourcepub fn instances_to_update(&self) -> Option<i32>
pub fn instances_to_update(&self) -> Option<i32>
The number of instances remaining to update before the instance refresh is complete.
If you roll back the instance refresh, InstancesToUpdate shows you the number of instances that were not yet updated by the instance refresh. Therefore, these instances don't need to be replaced as part of the rollback.
Sourcepub fn progress_details(&self) -> Option<&InstanceRefreshProgressDetails>
pub fn progress_details(&self) -> Option<&InstanceRefreshProgressDetails>
Additional progress details for an Auto Scaling group that has a warm pool.
Sourcepub fn preferences(&self) -> Option<&RefreshPreferences>
pub fn preferences(&self) -> Option<&RefreshPreferences>
The preferences for an instance refresh.
Sourcepub fn desired_configuration(&self) -> Option<&DesiredConfiguration>
pub fn desired_configuration(&self) -> Option<&DesiredConfiguration>
Describes the desired configuration for the instance refresh.
Sourcepub fn rollback_details(&self) -> Option<&RollbackDetails>
pub fn rollback_details(&self) -> Option<&RollbackDetails>
The rollback details.
Sourcepub fn strategy(&self) -> Option<&RefreshStrategy>
pub fn strategy(&self) -> Option<&RefreshStrategy>
The strategy to use for the instance refresh. This determines how instances in the Auto Scaling group are updated. Default is Rolling.
-
Rolling– Terminates instances and launches replacements in batches -
ReplaceRootVolume– Updates instances by replacing only the root volume without terminating the instance
Source§impl InstanceRefresh
impl InstanceRefresh
Sourcepub fn builder() -> InstanceRefreshBuilder
pub fn builder() -> InstanceRefreshBuilder
Creates a new builder-style object to manufacture InstanceRefresh.
Trait Implementations§
Source§impl Clone for InstanceRefresh
impl Clone for InstanceRefresh
Source§fn clone(&self) -> InstanceRefresh
fn clone(&self) -> InstanceRefresh
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for InstanceRefresh
impl Debug for InstanceRefresh
Source§impl PartialEq for InstanceRefresh
impl PartialEq for InstanceRefresh
impl StructuralPartialEq for InstanceRefresh
Auto Trait Implementations§
impl Freeze for InstanceRefresh
impl RefUnwindSafe for InstanceRefresh
impl Send for InstanceRefresh
impl Sync for InstanceRefresh
impl Unpin for InstanceRefresh
impl UnwindSafe for InstanceRefresh
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);