Class GameServerGroupProps
(experimental) Properties for a new Gamelift FleetIQ Game server group.
Inheritance
Implements
Namespace: Amazon.CDK.AWS.GameLift.Alpha
Assembly: Amazon.CDK.AWS.GameLift.Alpha.dll
Syntax (csharp)
public class GameServerGroupProps : Object, IGameServerGroupProps
Syntax (vb)
Public Class GameServerGroupProps
Inherits Object
Implements IGameServerGroupProps
Remarks
Stability: Experimental
ExampleMetadata: infused
Examples
ILaunchTemplate launchTemplate;
IVpc vpc;
new GameServerGroup(this, "GameServerGroup", new GameServerGroupProps {
GameServerGroupName = "sample-gameservergroup-name",
InstanceDefinitions = new [] { new InstanceDefinition {
InstanceType = InstanceType.Of(InstanceClass.C5, InstanceSize.LARGE)
}, new InstanceDefinition {
InstanceType = InstanceType.Of(InstanceClass.C4, InstanceSize.LARGE)
} },
LaunchTemplate = launchTemplate,
Vpc = vpc,
VpcSubnets = new SubnetSelection { SubnetType = SubnetType.PUBLIC }
});
Synopsis
Constructors
GameServerGroupProps() |
Properties
AutoScalingPolicy | (experimental) Configuration settings to define a scaling policy for the Auto Scaling group that is optimized for game hosting. |
BalancingStrategy | (experimental) Indicates how GameLift FleetIQ balances the use of Spot Instances and On-Demand Instances in the game server group. |
DeleteOption | (experimental) The type of delete to perform. |
GameServerGroupName | (experimental) A developer-defined identifier for the game server group. |
InstanceDefinitions | (experimental) The set of Amazon EC2 instance types that GameLift FleetIQ can use when balancing and automatically scaling instances in the corresponding Auto Scaling group. |
LaunchTemplate | (experimental) The Amazon EC2 launch template that contains configuration settings and game server code to be deployed to all instances in the game server group. |
MaxSize | (experimental) The maximum number of instances allowed in the Amazon EC2 Auto Scaling group. |
MinSize | (experimental) The minimum number of instances allowed in the Amazon EC2 Auto Scaling group. |
ProtectGameServer | (experimental) A flag that indicates whether instances in the game server group are protected from early termination. |
Role | (experimental) The IAM role that allows Amazon GameLift to access your Amazon EC2 Auto Scaling groups. |
Vpc | (experimental) The VPC network to place the game server group in. |
VpcSubnets | (experimental) Game server group subnet selection. |
Constructors
GameServerGroupProps()
public GameServerGroupProps()
Properties
AutoScalingPolicy
(experimental) Configuration settings to define a scaling policy for the Auto Scaling group that is optimized for game hosting.
public IAutoScalingPolicy AutoScalingPolicy { get; set; }
Property Value
Remarks
The scaling policy uses the metric PercentUtilizedGameServers
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.
Default: no autoscaling policy settled
Stability: Experimental
BalancingStrategy
(experimental) Indicates how GameLift FleetIQ balances the use of Spot Instances and On-Demand Instances in the game server group.
public Nullable<BalancingStrategy> BalancingStrategy { get; set; }
Property Value
System.Nullable<BalancingStrategy>
Remarks
Default: SPOT_PREFERRED
Stability: Experimental
DeleteOption
(experimental) The type of delete to perform.
public Nullable<DeleteOption> DeleteOption { get; set; }
Property Value
System.Nullable<DeleteOption>
Remarks
To delete a game server group, specify the DeleteOption
Default: SAFE_DELETE
Stability: Experimental
GameServerGroupName
(experimental) A developer-defined identifier for the game server group.
public string GameServerGroupName { get; set; }
Property Value
System.String
Remarks
The name is unique for each Region in each AWS account.
Stability: Experimental
InstanceDefinitions
(experimental) The set of Amazon EC2 instance types that GameLift FleetIQ can use when balancing and automatically scaling instances in the corresponding Auto Scaling group.
public IInstanceDefinition[] InstanceDefinitions { get; set; }
Property Value
Remarks
Stability: Experimental
LaunchTemplate
(experimental) The Amazon EC2 launch template that contains configuration settings and game server code to be deployed to all instances in the game server group.
public ILaunchTemplate LaunchTemplate { get; set; }
Property Value
Remarks
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.
Stability: Experimental
See: https://docs.aws.amazon.com/autoscaling/ec2/userguide/create-launch-template.html
MaxSize
(experimental) The maximum number of instances allowed in the Amazon EC2 Auto Scaling group.
public Nullable<double> MaxSize { get; set; }
Property Value
System.Nullable<System.Double>
Remarks
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.
Default: the default is 1
Stability: Experimental
MinSize
(experimental) The minimum number of instances allowed in the Amazon EC2 Auto Scaling group.
public Nullable<double> MinSize { get; set; }
Property Value
System.Nullable<System.Double>
Remarks
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.
Default: the default is 0
Stability: Experimental
ProtectGameServer
(experimental) A flag that indicates whether instances in the game server group are protected from early termination.
public Nullable<bool> ProtectGameServer { get; set; }
Property Value
System.Nullable<System.Boolean>
Remarks
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.
Default: game servers running might be terminated during a scale-down event
Stability: Experimental
Role
(experimental) The IAM role that allows Amazon GameLift to access your Amazon EC2 Auto Scaling groups.
public IRole Role { get; set; }
Property Value
Remarks
Default: - a role will be created with default trust to Gamelift and Autoscaling service principal with a default policy GameLiftGameServerGroupPolicy
attached.
Stability: Experimental
See: https://docs.aws.amazon.com/gamelift/latest/fleetiqguide/gsg-iam-permissions-roles.html
Vpc
(experimental) The VPC network to place the game server group in.
public IVpc Vpc { get; set; }
Property Value
Remarks
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.
Stability: Experimental
VpcSubnets
(experimental) Game server group subnet selection.
public ISubnetSelection VpcSubnets { get; set; }
Property Value
Remarks
Default: all GameLift FleetIQ-supported Availability Zones are used.
Stability: Experimental