Class CfnGameServerGroupPropsMixin
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable,software.constructs.IMixin
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:
- An Amazon EC2 launch template that specifies how to launch Amazon EC2 instances with your game server build. For more information, see Launching an Instance from a Launch Template in the Amazon EC2 User Guide .
- An IAM role that extends limited access to your AWS account to allow GameLift FleetIQ to create and interact with the Auto Scaling group. For more information, see Create IAM roles for cross-service interaction in the GameLift FleetIQ Developer Guide .
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
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.cfnpropertymixins.services.gamelift.*;
import software.amazon.awscdk.*;
IMergeStrategy mergeStrategy;
CfnGameServerGroupPropsMixin cfnGameServerGroupPropsMixin = CfnGameServerGroupPropsMixin.Builder.create(CfnGameServerGroupMixinProps.builder()
.autoScalingPolicy(AutoScalingPolicyProperty.builder()
.estimatedInstanceWarmup(123)
.targetTrackingConfiguration(TargetTrackingConfigurationProperty.builder()
.targetValue(123)
.build())
.build())
.balancingStrategy("balancingStrategy")
.deleteOption("deleteOption")
.gameServerGroupName("gameServerGroupName")
.gameServerProtectionPolicy("gameServerProtectionPolicy")
.instanceDefinitions(List.of(InstanceDefinitionProperty.builder()
.instanceType("instanceType")
.weightedCapacity("weightedCapacity")
.build()))
.launchTemplate(LaunchTemplateProperty.builder()
.launchTemplateId("launchTemplateId")
.launchTemplateName("launchTemplateName")
.version("version")
.build())
.maxSize(123)
.minSize(123)
.roleArn("roleArn")
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.vpcSubnets(List.of("vpcSubnets"))
.build())
.strategy(mergeStrategy)
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceThis data type is used with the GameLift FleetIQ and game server groups..static final classA fluent builder forCfnGameServerGroupPropsMixin.static interfaceThis data type is used with the Amazon GameLift FleetIQ and game server groups..static interfaceThis data type is used with the GameLift FleetIQ and game server groups..static interfaceThis data type is used with the Amazon GameLift FleetIQ and game server groups..Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IMixin
software.constructs.IMixin.Jsii$Default, software.constructs.IMixin.Jsii$Proxy -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionCreate a mixin to apply properties toAWS::GameLift::GameServerGroup.Create a mixin to apply properties toAWS::GameLift::GameServerGroup.protectedCfnGameServerGroupPropsMixin(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnGameServerGroupPropsMixin(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyTo(software.constructs.IConstruct construct) Apply the mixin properties to the construct.protected CfnGameServerGroupMixinPropsgetProps()protected IMergeStrategysupports(software.constructs.IConstruct construct) Check if this mixin supports the given construct.Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_PROPERTY_KEYS
-
-
Constructor Details
-
CfnGameServerGroupPropsMixin
protected CfnGameServerGroupPropsMixin(software.amazon.jsii.JsiiObjectRef objRef) -
CfnGameServerGroupPropsMixin
protected CfnGameServerGroupPropsMixin(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnGameServerGroupPropsMixin
@Stability(Stable) public CfnGameServerGroupPropsMixin(@NotNull CfnGameServerGroupMixinProps props, @Nullable CfnPropertyMixinOptions options) Create a mixin to apply properties toAWS::GameLift::GameServerGroup.- Parameters:
props- L1 properties to apply. This parameter is required.options- Mixin options.
-
CfnGameServerGroupPropsMixin
Create a mixin to apply properties toAWS::GameLift::GameServerGroup.- Parameters:
props- L1 properties to apply. This parameter is required.
-
-
Method Details
-
applyTo
@Stability(Stable) public void applyTo(@NotNull software.constructs.IConstruct construct) Apply the mixin properties to the construct. -
supports
@Stability(Stable) @NotNull public Boolean supports(@NotNull software.constructs.IConstruct construct) Check if this mixin supports the given construct. -
getProps
-
getStrategy
-