Class GameServerGroupProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<GameServerGroupProps>
- Enclosing interface:
GameServerGroupProps
GameServerGroupProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionautoScalingPolicy
(AutoScalingPolicy autoScalingPolicy) Sets the value ofGameServerGroupProps.getAutoScalingPolicy()
balancingStrategy
(BalancingStrategy balancingStrategy) Sets the value ofGameServerGroupProps.getBalancingStrategy()
build()
Builds the configured instance.deleteOption
(DeleteOption deleteOption) Sets the value ofGameServerGroupProps.getDeleteOption()
gameServerGroupName
(String gameServerGroupName) Sets the value ofGameServerGroupProps.getGameServerGroupName()
instanceDefinitions
(List<? extends InstanceDefinition> instanceDefinitions) Sets the value ofGameServerGroupProps.getInstanceDefinitions()
launchTemplate
(ILaunchTemplate launchTemplate) Sets the value ofGameServerGroupProps.getLaunchTemplate()
Sets the value ofGameServerGroupProps.getMaxSize()
Sets the value ofGameServerGroupProps.getMinSize()
protectGameServer
(Boolean protectGameServer) Sets the value ofGameServerGroupProps.getProtectGameServer()
Sets the value ofGameServerGroupProps.getRole()
Sets the value ofGameServerGroupProps.getVpc()
vpcSubnets
(SubnetSelection vpcSubnets) Sets the value ofGameServerGroupProps.getVpcSubnets()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
gameServerGroupName
@Stability(Experimental) public GameServerGroupProps.Builder gameServerGroupName(String gameServerGroupName) Sets the value ofGameServerGroupProps.getGameServerGroupName()
- Parameters:
gameServerGroupName
- A developer-defined identifier for the game server group. This parameter is required. The name is unique for each Region in each AWS account.- Returns:
this
-
instanceDefinitions
@Stability(Experimental) public GameServerGroupProps.Builder instanceDefinitions(List<? extends InstanceDefinition> instanceDefinitions) Sets the value ofGameServerGroupProps.getInstanceDefinitions()
- Parameters:
instanceDefinitions
- The set of Amazon EC2 instance types that GameLift FleetIQ can use when balancing and automatically scaling instances in the corresponding Auto Scaling group. This parameter is required.- Returns:
this
-
launchTemplate
@Stability(Experimental) public GameServerGroupProps.Builder launchTemplate(ILaunchTemplate launchTemplate) Sets the value ofGameServerGroupProps.getLaunchTemplate()
- Parameters:
launchTemplate
- The Amazon EC2 launch template that contains configuration settings and game server code to be deployed to all instances in the game server group. This parameter is required. After the Auto Scaling group is created, update this value directly in the Auto Scaling group using the AWS console or APIs.NOTE: If you specify network interfaces in your launch template, you must explicitly set the property AssociatePublicIpAddress to
true
. If no network interface is specified in the launch template, GameLift FleetIQ uses your account's default VPC.- Returns:
this
-
vpc
Sets the value ofGameServerGroupProps.getVpc()
- Parameters:
vpc
- The VPC network to place the game server group in. This parameter is required. By default, all GameLift FleetIQ-supported Availability Zones are used.You can use this parameter to specify VPCs that you've set up.
This property cannot be updated after the game server group is created, and the corresponding Auto Scaling group will always use the property value that is set with this request, even if the Auto Scaling group is updated directly.
- Returns:
this
-
autoScalingPolicy
@Stability(Experimental) public GameServerGroupProps.Builder autoScalingPolicy(AutoScalingPolicy autoScalingPolicy) Sets the value ofGameServerGroupProps.getAutoScalingPolicy()
- Parameters:
autoScalingPolicy
- Configuration settings to define a scaling policy for the Auto Scaling group that is optimized for game hosting. The scaling policy uses the metricPercentUtilizedGameServers
to maintain a buffer of idle game servers that can immediately accommodate new games and players.After the Auto Scaling group is created, update this value directly in the Auto Scaling group using the AWS console or APIs.
- Returns:
this
-
balancingStrategy
@Stability(Experimental) public GameServerGroupProps.Builder balancingStrategy(BalancingStrategy balancingStrategy) Sets the value ofGameServerGroupProps.getBalancingStrategy()
- Parameters:
balancingStrategy
- Indicates how GameLift FleetIQ balances the use of Spot Instances and On-Demand Instances in the game server group.- Returns:
this
-
deleteOption
@Stability(Experimental) public GameServerGroupProps.Builder deleteOption(DeleteOption deleteOption) Sets the value ofGameServerGroupProps.getDeleteOption()
- Parameters:
deleteOption
- The type of delete to perform. To delete a game server group, specify the DeleteOption- Returns:
this
-
maxSize
Sets the value ofGameServerGroupProps.getMaxSize()
- Parameters:
maxSize
- The maximum number of instances allowed in the Amazon EC2 Auto Scaling group. During automatic scaling events, GameLift FleetIQ and EC2 do not scale up the group above this maximum.After the Auto Scaling group is created, update this value directly in the Auto Scaling group using the AWS console or APIs.
- Returns:
this
-
minSize
Sets the value ofGameServerGroupProps.getMinSize()
- Parameters:
minSize
- The minimum number of instances allowed in the Amazon EC2 Auto Scaling group. During automatic scaling events, GameLift FleetIQ and Amazon EC2 do not scale down the group below this minimum.In production, this value should be set to at least 1.
After the Auto Scaling group is created, update this value directly in the Auto Scaling group using the AWS console or APIs.
- Returns:
this
-
protectGameServer
@Stability(Experimental) public GameServerGroupProps.Builder protectGameServer(Boolean protectGameServer) Sets the value ofGameServerGroupProps.getProtectGameServer()
- Parameters:
protectGameServer
- 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.An exception to this is with Spot Instances, which can be terminated by AWS regardless of protection status.
- Returns:
this
-
role
Sets the value ofGameServerGroupProps.getRole()
- Parameters:
role
- The IAM role that allows Amazon GameLift to access your Amazon EC2 Auto Scaling groups.- Returns:
this
-
vpcSubnets
Sets the value ofGameServerGroupProps.getVpcSubnets()
- Parameters:
vpcSubnets
- Game server group subnet selection.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<GameServerGroupProps>
- Returns:
- a new instance of
GameServerGroupProps
- Throws:
NullPointerException
- if any required attribute was not provided
-