Class GameServerGroup
(experimental) Creates a GameLift FleetIQ game server group for managing game hosting on a collection of Amazon EC2 instances for game hosting.
Inherited Members
Namespace: Amazon.CDK.AWS.GameLift.Alpha
Assembly: Amazon.CDK.AWS.GameLift.Alpha.dll
Syntax (csharp)
public class GameServerGroup : GameServerGroupBase, IGameServerGroup, IResource, IGrantable
Syntax (vb)
Public Class GameServerGroup
Inherits GameServerGroupBase
Implements IGameServerGroup, IResource, IGrantable
Remarks
This operation creates the game server group, creates an Auto Scaling group in your AWS account, and establishes a link between the two groups. You can view the status of your game server groups in the GameLift console. Game server group metrics and events are emitted to Amazon CloudWatch. Before creating a new game server group, you must have the following:
To create a new game server group, specify a unique group name, IAM role and Amazon EC2 launch template, and provide a list of instance types that can be used in the group. You must also set initial maximum and minimum limits on the group's instance count. You can optionally set an Auto Scaling policy with target tracking based on a GameLift FleetIQ metric.
Once the game server group and corresponding Auto Scaling group are created, you have full access to change the Auto Scaling group's configuration as needed. Several properties that are set when creating a game server group, including maximum/minimum size and auto-scaling policy settings, must be updated directly in the Auto Scaling group. Keep in mind that some Auto Scaling group properties are periodically updated by GameLift FleetIQ as part of its balancing activities to optimize for availability and cost.
Stability: Experimental
See: https://docs.aws.amazon.com/gamelift/latest/fleetiqguide/gsg-intro.html
Resource: AWS::GameLift::GameServerGroup
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
GameServerGroup(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
GameServerGroup(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
GameServerGroup(Construct, String, IGameServerGroupProps) |
Properties
AutoScalingGroupArn | (experimental) The ARN of the generated AutoScaling group. |
GameServerGroupArn | (experimental) The ARN of the game server group. |
GameServerGroupName | (experimental) The name of the game server group. |
GrantPrincipal | (experimental) The principal this GameLift game server group is using. |
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) The game server group's subnets. |
Methods
FromGameServerGroupAttributes(Construct, String, IGameServerGroupAttributes) | (experimental) Import an existing game server group from its attributes. |
ParseAutoScalingPolicy(IGameServerGroupProps) | |
ParseInstanceDefinitions(IGameServerGroupProps) | |
ParseLaunchTemplate(IGameServerGroupProps) |
Constructors
GameServerGroup(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected GameServerGroup(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
GameServerGroup(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected GameServerGroup(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
GameServerGroup(Construct, String, IGameServerGroupProps)
public GameServerGroup(Construct scope, string id, IGameServerGroupProps props)
Parameters
- scope Constructs.Construct
- id System.String
- props IGameServerGroupProps
Remarks
Stability: Experimental
Properties
AutoScalingGroupArn
(experimental) The ARN of the generated AutoScaling group.
public override string AutoScalingGroupArn { get; }
Property Value
System.String
Overrides
Remarks
Stability: Experimental
GameServerGroupArn
(experimental) The ARN of the game server group.
public override string GameServerGroupArn { get; }
Property Value
System.String
Overrides
Remarks
Stability: Experimental
GameServerGroupName
(experimental) The name of the game server group.
public override string GameServerGroupName { get; }
Property Value
System.String
Overrides
Remarks
Stability: Experimental
GrantPrincipal
(experimental) The principal this GameLift game server group is using.
public override IPrincipal GrantPrincipal { get; }
Property Value
Overrides
Remarks
Stability: Experimental
Role
(experimental) The IAM role that allows Amazon GameLift to access your Amazon EC2 Auto Scaling groups.
public virtual IRole Role { get; }
Property Value
Remarks
Stability: Experimental
Vpc
(experimental) The VPC network to place the game server group in.
public virtual IVpc Vpc { get; }
Property Value
Remarks
Stability: Experimental
VpcSubnets
(experimental) The game server group's subnets.
public virtual ISubnetSelection VpcSubnets { get; }
Property Value
Remarks
Stability: Experimental
Methods
FromGameServerGroupAttributes(Construct, String, IGameServerGroupAttributes)
(experimental) Import an existing game server group from its attributes.
public static IGameServerGroup FromGameServerGroupAttributes(Construct scope, string id, IGameServerGroupAttributes attrs)
Parameters
- scope Constructs.Construct
- id System.String
- attrs IGameServerGroupAttributes
Returns
Remarks
Stability: Experimental
ParseAutoScalingPolicy(IGameServerGroupProps)
protected virtual CfnGameServerGroup.IAutoScalingPolicyProperty ParseAutoScalingPolicy(IGameServerGroupProps props)
Parameters
- props IGameServerGroupProps
Returns
CfnGameServerGroup.IAutoScalingPolicyProperty
Remarks
Stability: Experimental
ParseInstanceDefinitions(IGameServerGroupProps)
protected virtual CfnGameServerGroup.IInstanceDefinitionProperty[] ParseInstanceDefinitions(IGameServerGroupProps props)
Parameters
- props IGameServerGroupProps
Returns
CfnGameServerGroup.IInstanceDefinitionProperty[]
Remarks
Stability: Experimental
ParseLaunchTemplate(IGameServerGroupProps)
protected virtual CfnGameServerGroup.ILaunchTemplateProperty ParseLaunchTemplate(IGameServerGroupProps props)
Parameters
- props IGameServerGroupProps
Returns
CfnGameServerGroup.ILaunchTemplateProperty
Remarks
Stability: Experimental