Class CfnGameServerGroupProps
Properties for defining a CfnGameServerGroup
.
Inheritance
Implements
Namespace: Amazon.CDK.AWS.GameLift
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnGameServerGroupProps : Object, ICfnGameServerGroupProps
Syntax (vb)
Public Class CfnGameServerGroupProps
Inherits Object
Implements ICfnGameServerGroupProps
Remarks
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 cfnGameServerGroupProps = 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
CfnGameServerGroupProps() |
Properties
AutoScalingPolicy | Configuration settings to define a scaling policy for the Auto Scaling group that is optimized for game hosting. |
BalancingStrategy | Indicates how Amazon GameLift Servers FleetIQ balances the use of Spot Instances and On-Demand Instances in the game server group. |
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 Servers 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 Servers to access your Amazon EC2 Auto Scaling groups. |
Tags | 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. |
Constructors
CfnGameServerGroupProps()
public CfnGameServerGroupProps()
Properties
AutoScalingPolicy
Configuration settings to define a scaling policy for the Auto Scaling group that is optimized for game hosting.
public object AutoScalingPolicy { get; set; }
Property Value
System.Object
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.
BalancingStrategy
Indicates how Amazon GameLift Servers FleetIQ balances the use of Spot Instances and On-Demand Instances in the game server group.
public string BalancingStrategy { get; set; }
Property Value
System.String
Remarks
Method options include the following:
DeleteOption
The type of delete to perform.
public string DeleteOption { get; set; }
Property Value
System.String
Remarks
To delete a game server group, specify the DeleteOption
. Options include the following:
GameServerGroupName
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.
GameServerProtectionPolicy
A flag that indicates whether instances in the game server group are protected from early termination.
public string GameServerProtectionPolicy { get; set; }
Property Value
System.String
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 (see ). An exception to this is with Spot Instances, which can be terminated by AWS regardless of protection status.
InstanceDefinitions
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.
public object InstanceDefinitions { get; set; }
Property Value
System.Object
Remarks
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 object LaunchTemplate { get; set; }
Property Value
System.Object
Remarks
You can specify the template using either the template name or ID. For help with creating a launch template, see Creating a Launch Template for an Auto Scaling Group in the Amazon Elastic Compute Cloud Auto Scaling User Guide . After the Auto Scaling group is created, update this value directly in the Auto Scaling group using the AWS console or APIs.
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, Amazon GameLift Servers FleetIQ uses your account's default VPC.
MaxSize
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, Amazon GameLift Servers 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.
MinSize
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, Amazon GameLift Servers 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.
RoleArn
The Amazon Resource Name ( ARN ) for an IAM role that allows Amazon GameLift Servers to access your Amazon EC2 Auto Scaling groups.
public string RoleArn { get; set; }
Property Value
System.String
Remarks
Tags
A list of labels to assign to the new game server group resource.
public ICfnTag[] Tags { get; set; }
Property Value
ICfnTag[]
Remarks
Tags are developer-defined key-value pairs. Tagging AWS resources is useful for resource management, access management, and cost allocation. For more information, see Tagging AWS Resources in the AWS General Reference . Once the resource is created, you can use TagResource, UntagResource, and ListTagsForResource to add, remove, and view tags, respectively. The maximum tag limit may be lower than stated. See the AWS General Reference for actual tagging limits.
VpcSubnets
A list of virtual private cloud (VPC) subnets to use with instances in the game server group.
public string[] VpcSubnets { get; set; }
Property Value
System.String[]
Remarks
By default, all Amazon GameLift Servers 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.