Class CfnGameServerGroup
This operation is used with the Amazon GameLift FleetIQ solution and game server groups..
Inherited Members
Namespace: Amazon.CDK.AWS.GameLift
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnGameServerGroup : CfnResource, IInspectable, ITaggable
Syntax (vb)
Public Class CfnGameServerGroup
Inherits CfnResource
Implements IInspectable, ITaggable
Remarks
Creates a GameLift FleetIQ game server group for managing game hosting on a collection of Amazon EC2 instances for game hosting. 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.
Learn more
CloudformationResource: AWS::GameLift::GameServerGroup
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.GameLift;
var cfnGameServerGroup = new CfnGameServerGroup(this, "MyCfnGameServerGroup", new CfnGameServerGroupProps {
GameServerGroupName = "gameServerGroupName",
InstanceDefinitions = new [] { new InstanceDefinitionProperty {
InstanceType = "instanceType",
// the properties below are optional
WeightedCapacity = "weightedCapacity"
} },
RoleArn = "roleArn",
// the properties below are optional
AutoScalingPolicy = new AutoScalingPolicyProperty {
TargetTrackingConfiguration = new TargetTrackingConfigurationProperty {
TargetValue = 123
},
// the properties below are optional
EstimatedInstanceWarmup = 123
},
BalancingStrategy = "balancingStrategy",
DeleteOption = "deleteOption",
GameServerProtectionPolicy = "gameServerProtectionPolicy",
LaunchTemplate = new LaunchTemplateProperty {
LaunchTemplateId = "launchTemplateId",
LaunchTemplateName = "launchTemplateName",
Version = "version"
},
MaxSize = 123,
MinSize = 123,
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} },
VpcSubnets = new [] { "vpcSubnets" }
});
Synopsis
Constructors
CfnGameServerGroup(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
CfnGameServerGroup(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
CfnGameServerGroup(Construct, String, ICfnGameServerGroupProps) |
Properties
AttrAutoScalingGroupArn | A unique identifier for the auto scaling group. |
AttrGameServerGroupArn | A unique identifier for the game server group. |
AutoScalingPolicy | Configuration settings to define a scaling policy for the Auto Scaling group that is optimized for game hosting. |
BalancingStrategy | Indicates how Amazon GameLift FleetIQ balances the use of Spot Instances and On-Demand Instances in the game server group. |
CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
CfnProperties | |
DeleteOption | The type of delete to perform. |
GameServerGroupName | A developer-defined identifier for the game server group. |
GameServerProtectionPolicy | A flag that indicates whether instances in the game server group are protected from early termination. |
InstanceDefinitions | The set of Amazon EC2 instance types that Amazon GameLift FleetIQ can use when balancing and automatically scaling instances in the corresponding Auto Scaling group. |
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. |
MaxSize | The maximum number of instances allowed in the Amazon EC2 Auto Scaling group. |
MinSize | The minimum number of instances allowed in the Amazon EC2 Auto Scaling group. |
RoleArn | The Amazon Resource Name ( ARN ) for an IAM role that allows Amazon GameLift to access your Amazon EC2 Auto Scaling groups. |
Tags | Tag Manager which manages the tags for this resource. |
TagsRaw | A list of labels to assign to the new game server group resource. |
VpcSubnets | A list of virtual private cloud (VPC) subnets to use with instances in the game server group. |
Methods
Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
RenderProperties(IDictionary<String, Object>) |
Constructors
CfnGameServerGroup(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected CfnGameServerGroup(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
CfnGameServerGroup(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected CfnGameServerGroup(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
CfnGameServerGroup(Construct, String, ICfnGameServerGroupProps)
public CfnGameServerGroup(Construct scope, string id, ICfnGameServerGroupProps props)
Parameters
- scope Constructs.Construct
Scope in which this resource is defined.
- id System.String
Construct identifier for this resource (unique in its scope).
- props ICfnGameServerGroupProps
Resource properties.
Properties
AttrAutoScalingGroupArn
A unique identifier for the auto scaling group.
public virtual string AttrAutoScalingGroupArn { get; }
Property Value
System.String
Remarks
CloudformationAttribute: AutoScalingGroupArn
AttrGameServerGroupArn
A unique identifier for the game server group.
public virtual string AttrGameServerGroupArn { get; }
Property Value
System.String
Remarks
CloudformationAttribute: GameServerGroupArn
AutoScalingPolicy
Configuration settings to define a scaling policy for the Auto Scaling group that is optimized for game hosting.
public virtual object AutoScalingPolicy { get; set; }
Property Value
System.Object
BalancingStrategy
Indicates how Amazon GameLift FleetIQ balances the use of Spot Instances and On-Demand Instances in the game server group.
public virtual string BalancingStrategy { get; set; }
Property Value
System.String
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value
System.String
CfnProperties
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.Object>
Overrides
DeleteOption
The type of delete to perform.
public virtual string DeleteOption { get; set; }
Property Value
System.String
GameServerGroupName
A developer-defined identifier for the game server group.
public virtual string GameServerGroupName { get; set; }
Property Value
System.String
GameServerProtectionPolicy
A flag that indicates whether instances in the game server group are protected from early termination.
public virtual string GameServerProtectionPolicy { get; set; }
Property Value
System.String
InstanceDefinitions
The set of Amazon EC2 instance types that Amazon GameLift FleetIQ can use when balancing and automatically scaling instances in the corresponding Auto Scaling group.
public virtual object InstanceDefinitions { get; set; }
Property Value
System.Object
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.
public virtual object LaunchTemplate { get; set; }
Property Value
System.Object
MaxSize
The maximum number of instances allowed in the Amazon EC2 Auto Scaling group.
public virtual Nullable<double> MaxSize { get; set; }
Property Value
System.Nullable<System.Double>
MinSize
The minimum number of instances allowed in the Amazon EC2 Auto Scaling group.
public virtual Nullable<double> MinSize { get; set; }
Property Value
System.Nullable<System.Double>
RoleArn
The Amazon Resource Name ( ARN ) for an IAM role that allows Amazon GameLift to access your Amazon EC2 Auto Scaling groups.
public virtual string RoleArn { get; set; }
Property Value
System.String
Tags
Tag Manager which manages the tags for this resource.
public virtual TagManager Tags { get; }
Property Value
TagsRaw
A list of labels to assign to the new game server group resource.
public virtual ICfnTag[] TagsRaw { get; set; }
Property Value
ICfnTag[]
VpcSubnets
A list of virtual private cloud (VPC) subnets to use with instances in the game server group.
public virtual string[] VpcSubnets { get; set; }
Property Value
System.String[]
Methods
Inspect(TreeInspector)
Examines the CloudFormation resource and discloses attributes.
public virtual void Inspect(TreeInspector inspector)
Parameters
- inspector TreeInspector
tree inspector to collect and process attributes.
RenderProperties(IDictionary<String, Object>)
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
- props System.Collections.Generic.IDictionary<System.String, System.Object>
Returns
System.Collections.Generic.IDictionary<System.String, System.Object>