#[non_exhaustive]pub struct GameServerGroupBuilder { /* private fields */ }
Expand description
A builder for GameServerGroup
.
Implementations§
Source§impl GameServerGroupBuilder
impl GameServerGroupBuilder
Sourcepub fn game_server_group_name(self, input: impl Into<String>) -> Self
pub fn game_server_group_name(self, input: impl Into<String>) -> Self
A developer-defined identifier for the game server group. The name is unique for each Region in each Amazon Web Services account.
Sourcepub fn set_game_server_group_name(self, input: Option<String>) -> Self
pub fn set_game_server_group_name(self, input: Option<String>) -> Self
A developer-defined identifier for the game server group. The name is unique for each Region in each Amazon Web Services account.
Sourcepub fn get_game_server_group_name(&self) -> &Option<String>
pub fn get_game_server_group_name(&self) -> &Option<String>
A developer-defined identifier for the game server group. The name is unique for each Region in each Amazon Web Services account.
Sourcepub fn game_server_group_arn(self, input: impl Into<String>) -> Self
pub fn game_server_group_arn(self, input: impl Into<String>) -> Self
A generated unique ID for the game server group.
Sourcepub fn set_game_server_group_arn(self, input: Option<String>) -> Self
pub fn set_game_server_group_arn(self, input: Option<String>) -> Self
A generated unique ID for the game server group.
Sourcepub fn get_game_server_group_arn(&self) -> &Option<String>
pub fn get_game_server_group_arn(&self) -> &Option<String>
A generated unique ID for the game server group.
Sourcepub fn role_arn(self, input: impl Into<String>) -> Self
pub fn role_arn(self, input: impl Into<String>) -> Self
The Amazon Resource Name (ARN) for an IAM role that allows Amazon GameLift Servers to access your Amazon EC2 Auto Scaling groups.
Sourcepub fn set_role_arn(self, input: Option<String>) -> Self
pub fn set_role_arn(self, input: Option<String>) -> Self
The Amazon Resource Name (ARN) for an IAM role that allows Amazon GameLift Servers to access your Amazon EC2 Auto Scaling groups.
Sourcepub fn get_role_arn(&self) -> &Option<String>
pub fn get_role_arn(&self) -> &Option<String>
The Amazon Resource Name (ARN) for an IAM role that allows Amazon GameLift Servers to access your Amazon EC2 Auto Scaling groups.
Sourcepub fn instance_definitions(self, input: InstanceDefinition) -> Self
pub fn instance_definitions(self, input: InstanceDefinition) -> Self
Appends an item to instance_definitions
.
To override the contents of this collection use set_instance_definitions
.
The set of Amazon EC2 instance types that Amazon GameLift Servers FleetIQ can use when balancing and automatically scaling instances in the corresponding Auto Scaling group.
Sourcepub fn set_instance_definitions(
self,
input: Option<Vec<InstanceDefinition>>,
) -> Self
pub fn set_instance_definitions( self, input: Option<Vec<InstanceDefinition>>, ) -> Self
The set of Amazon EC2 instance types that Amazon GameLift Servers FleetIQ can use when balancing and automatically scaling instances in the corresponding Auto Scaling group.
Sourcepub fn get_instance_definitions(&self) -> &Option<Vec<InstanceDefinition>>
pub fn get_instance_definitions(&self) -> &Option<Vec<InstanceDefinition>>
The set of Amazon EC2 instance types that Amazon GameLift Servers FleetIQ can use when balancing and automatically scaling instances in the corresponding Auto Scaling group.
Sourcepub fn balancing_strategy(self, input: BalancingStrategy) -> Self
pub fn balancing_strategy(self, input: BalancingStrategy) -> Self
Indicates how Amazon GameLift Servers FleetIQ balances the use of Spot Instances and On-Demand Instances in the game server group. Method options include the following:
-
SPOT_ONLY
- Only Spot Instances are used in the game server group. If Spot Instances are unavailable or not viable for game hosting, the game server group provides no hosting capacity until Spot Instances can again be used. Until then, no new instances are started, and the existing nonviable Spot Instances are terminated (after current gameplay ends) and are not replaced. -
SPOT_PREFERRED
- (default value) Spot Instances are used whenever available in the game server group. If Spot Instances are unavailable, the game server group continues to provide hosting capacity by falling back to On-Demand Instances. Existing nonviable Spot Instances are terminated (after current gameplay ends) and are replaced with new On-Demand Instances. -
ON_DEMAND_ONLY
- Only On-Demand Instances are used in the game server group. No Spot Instances are used, even when available, while this balancing strategy is in force.
Sourcepub fn set_balancing_strategy(self, input: Option<BalancingStrategy>) -> Self
pub fn set_balancing_strategy(self, input: Option<BalancingStrategy>) -> Self
Indicates how Amazon GameLift Servers FleetIQ balances the use of Spot Instances and On-Demand Instances in the game server group. Method options include the following:
-
SPOT_ONLY
- Only Spot Instances are used in the game server group. If Spot Instances are unavailable or not viable for game hosting, the game server group provides no hosting capacity until Spot Instances can again be used. Until then, no new instances are started, and the existing nonviable Spot Instances are terminated (after current gameplay ends) and are not replaced. -
SPOT_PREFERRED
- (default value) Spot Instances are used whenever available in the game server group. If Spot Instances are unavailable, the game server group continues to provide hosting capacity by falling back to On-Demand Instances. Existing nonviable Spot Instances are terminated (after current gameplay ends) and are replaced with new On-Demand Instances. -
ON_DEMAND_ONLY
- Only On-Demand Instances are used in the game server group. No Spot Instances are used, even when available, while this balancing strategy is in force.
Sourcepub fn get_balancing_strategy(&self) -> &Option<BalancingStrategy>
pub fn get_balancing_strategy(&self) -> &Option<BalancingStrategy>
Indicates how Amazon GameLift Servers FleetIQ balances the use of Spot Instances and On-Demand Instances in the game server group. Method options include the following:
-
SPOT_ONLY
- Only Spot Instances are used in the game server group. If Spot Instances are unavailable or not viable for game hosting, the game server group provides no hosting capacity until Spot Instances can again be used. Until then, no new instances are started, and the existing nonviable Spot Instances are terminated (after current gameplay ends) and are not replaced. -
SPOT_PREFERRED
- (default value) Spot Instances are used whenever available in the game server group. If Spot Instances are unavailable, the game server group continues to provide hosting capacity by falling back to On-Demand Instances. Existing nonviable Spot Instances are terminated (after current gameplay ends) and are replaced with new On-Demand Instances. -
ON_DEMAND_ONLY
- Only On-Demand Instances are used in the game server group. No Spot Instances are used, even when available, while this balancing strategy is in force.
Sourcepub fn game_server_protection_policy(
self,
input: GameServerProtectionPolicy,
) -> Self
pub fn game_server_protection_policy( self, input: GameServerProtectionPolicy, ) -> Self
A flag that indicates whether instances in the game server group are protected from early termination. Unprotected instances that have active game servers running might be terminated during a scale-down event, causing players to be dropped from the game. Protected instances cannot be terminated while there are active game servers running except in the event of a forced game server group deletion (see ). An exception to this is with Spot Instances, which can be terminated by Amazon Web Services regardless of protection status.
Sourcepub fn set_game_server_protection_policy(
self,
input: Option<GameServerProtectionPolicy>,
) -> Self
pub fn set_game_server_protection_policy( self, input: Option<GameServerProtectionPolicy>, ) -> Self
A flag that indicates whether instances in the game server group are protected from early termination. Unprotected instances that have active game servers running might be terminated during a scale-down event, causing players to be dropped from the game. Protected instances cannot be terminated while there are active game servers running except in the event of a forced game server group deletion (see ). An exception to this is with Spot Instances, which can be terminated by Amazon Web Services regardless of protection status.
Sourcepub fn get_game_server_protection_policy(
&self,
) -> &Option<GameServerProtectionPolicy>
pub fn get_game_server_protection_policy( &self, ) -> &Option<GameServerProtectionPolicy>
A flag that indicates whether instances in the game server group are protected from early termination. Unprotected instances that have active game servers running might be terminated during a scale-down event, causing players to be dropped from the game. Protected instances cannot be terminated while there are active game servers running except in the event of a forced game server group deletion (see ). An exception to this is with Spot Instances, which can be terminated by Amazon Web Services regardless of protection status.
Sourcepub fn auto_scaling_group_arn(self, input: impl Into<String>) -> Self
pub fn auto_scaling_group_arn(self, input: impl Into<String>) -> Self
A generated unique ID for the Amazon EC2 Auto Scaling group that is associated with this game server group.
Sourcepub fn set_auto_scaling_group_arn(self, input: Option<String>) -> Self
pub fn set_auto_scaling_group_arn(self, input: Option<String>) -> Self
A generated unique ID for the Amazon EC2 Auto Scaling group that is associated with this game server group.
Sourcepub fn get_auto_scaling_group_arn(&self) -> &Option<String>
pub fn get_auto_scaling_group_arn(&self) -> &Option<String>
A generated unique ID for the Amazon EC2 Auto Scaling group that is associated with this game server group.
Sourcepub fn status(self, input: GameServerGroupStatus) -> Self
pub fn status(self, input: GameServerGroupStatus) -> Self
The current status of the game server group. Possible statuses include:
-
NEW
- Amazon GameLift Servers FleetIQ has validated theCreateGameServerGroup()
request. -
ACTIVATING
- Amazon GameLift Servers FleetIQ is setting up a game server group, which includes creating an Auto Scaling group in your Amazon Web Services account. -
ACTIVE
- The game server group has been successfully created. -
DELETE_SCHEDULED
- A request to delete the game server group has been received. -
DELETING
- Amazon GameLift Servers FleetIQ has received a validDeleteGameServerGroup()
request and is processing it. Amazon GameLift Servers FleetIQ must first complete and release hosts before it deletes the Auto Scaling group and the game server group. -
DELETED
- The game server group has been successfully deleted. -
ERROR
- The asynchronous processes of activating or deleting a game server group has failed, resulting in an error state.
Sourcepub fn set_status(self, input: Option<GameServerGroupStatus>) -> Self
pub fn set_status(self, input: Option<GameServerGroupStatus>) -> Self
The current status of the game server group. Possible statuses include:
-
NEW
- Amazon GameLift Servers FleetIQ has validated theCreateGameServerGroup()
request. -
ACTIVATING
- Amazon GameLift Servers FleetIQ is setting up a game server group, which includes creating an Auto Scaling group in your Amazon Web Services account. -
ACTIVE
- The game server group has been successfully created. -
DELETE_SCHEDULED
- A request to delete the game server group has been received. -
DELETING
- Amazon GameLift Servers FleetIQ has received a validDeleteGameServerGroup()
request and is processing it. Amazon GameLift Servers FleetIQ must first complete and release hosts before it deletes the Auto Scaling group and the game server group. -
DELETED
- The game server group has been successfully deleted. -
ERROR
- The asynchronous processes of activating or deleting a game server group has failed, resulting in an error state.
Sourcepub fn get_status(&self) -> &Option<GameServerGroupStatus>
pub fn get_status(&self) -> &Option<GameServerGroupStatus>
The current status of the game server group. Possible statuses include:
-
NEW
- Amazon GameLift Servers FleetIQ has validated theCreateGameServerGroup()
request. -
ACTIVATING
- Amazon GameLift Servers FleetIQ is setting up a game server group, which includes creating an Auto Scaling group in your Amazon Web Services account. -
ACTIVE
- The game server group has been successfully created. -
DELETE_SCHEDULED
- A request to delete the game server group has been received. -
DELETING
- Amazon GameLift Servers FleetIQ has received a validDeleteGameServerGroup()
request and is processing it. Amazon GameLift Servers FleetIQ must first complete and release hosts before it deletes the Auto Scaling group and the game server group. -
DELETED
- The game server group has been successfully deleted. -
ERROR
- The asynchronous processes of activating or deleting a game server group has failed, resulting in an error state.
Sourcepub fn status_reason(self, input: impl Into<String>) -> Self
pub fn status_reason(self, input: impl Into<String>) -> Self
Additional information about the current game server group status. This information might provide additional insight on groups that are in ERROR
status.
Sourcepub fn set_status_reason(self, input: Option<String>) -> Self
pub fn set_status_reason(self, input: Option<String>) -> Self
Additional information about the current game server group status. This information might provide additional insight on groups that are in ERROR
status.
Sourcepub fn get_status_reason(&self) -> &Option<String>
pub fn get_status_reason(&self) -> &Option<String>
Additional information about the current game server group status. This information might provide additional insight on groups that are in ERROR
status.
Sourcepub fn suspended_actions(self, input: GameServerGroupAction) -> Self
pub fn suspended_actions(self, input: GameServerGroupAction) -> Self
Appends an item to suspended_actions
.
To override the contents of this collection use set_suspended_actions
.
A list of activities that are currently suspended for this game server group. If this property is empty, all activities are occurring.
Sourcepub fn set_suspended_actions(
self,
input: Option<Vec<GameServerGroupAction>>,
) -> Self
pub fn set_suspended_actions( self, input: Option<Vec<GameServerGroupAction>>, ) -> Self
A list of activities that are currently suspended for this game server group. If this property is empty, all activities are occurring.
Sourcepub fn get_suspended_actions(&self) -> &Option<Vec<GameServerGroupAction>>
pub fn get_suspended_actions(&self) -> &Option<Vec<GameServerGroupAction>>
A list of activities that are currently suspended for this game server group. If this property is empty, all activities are occurring.
Sourcepub fn creation_time(self, input: DateTime) -> Self
pub fn creation_time(self, input: DateTime) -> Self
A time stamp indicating when this data object was created. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057"
).
Sourcepub fn set_creation_time(self, input: Option<DateTime>) -> Self
pub fn set_creation_time(self, input: Option<DateTime>) -> Self
A time stamp indicating when this data object was created. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057"
).
Sourcepub fn get_creation_time(&self) -> &Option<DateTime>
pub fn get_creation_time(&self) -> &Option<DateTime>
A time stamp indicating when this data object was created. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057"
).
Sourcepub fn last_updated_time(self, input: DateTime) -> Self
pub fn last_updated_time(self, input: DateTime) -> Self
A timestamp that indicates when this game server group was last updated.
Sourcepub fn set_last_updated_time(self, input: Option<DateTime>) -> Self
pub fn set_last_updated_time(self, input: Option<DateTime>) -> Self
A timestamp that indicates when this game server group was last updated.
Sourcepub fn get_last_updated_time(&self) -> &Option<DateTime>
pub fn get_last_updated_time(&self) -> &Option<DateTime>
A timestamp that indicates when this game server group was last updated.
Sourcepub fn build(self) -> GameServerGroup
pub fn build(self) -> GameServerGroup
Consumes the builder and constructs a GameServerGroup
.
Trait Implementations§
Source§impl Clone for GameServerGroupBuilder
impl Clone for GameServerGroupBuilder
Source§fn clone(&self) -> GameServerGroupBuilder
fn clone(&self) -> GameServerGroupBuilder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for GameServerGroupBuilder
impl Debug for GameServerGroupBuilder
Source§impl Default for GameServerGroupBuilder
impl Default for GameServerGroupBuilder
Source§fn default() -> GameServerGroupBuilder
fn default() -> GameServerGroupBuilder
Source§impl PartialEq for GameServerGroupBuilder
impl PartialEq for GameServerGroupBuilder
impl StructuralPartialEq for GameServerGroupBuilder
Auto Trait Implementations§
impl Freeze for GameServerGroupBuilder
impl RefUnwindSafe for GameServerGroupBuilder
impl Send for GameServerGroupBuilder
impl Sync for GameServerGroupBuilder
impl Unpin for GameServerGroupBuilder
impl UnwindSafe for GameServerGroupBuilder
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);