Class CfnGameServerGroupPropsMixin

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.Mixin
software.amazon.awscdk.cfnpropertymixins.services.gamelift.CfnGameServerGroupPropsMixin
All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable, software.constructs.IMixin

@Generated(value="jsii-pacmak/1.127.0 (build 2117ad5)", date="2026-03-11T13:19:59.624Z") @Stability(Stable) public class CfnGameServerGroupPropsMixin extends Mixin implements software.constructs.IMixin
This operation is used with the Amazon GameLift FleetIQ solution and game server groups..

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

GameLift FleetIQ Guide

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:
  • Field Details

    • CFN_PROPERTY_KEYS

      @Stability(Stable) protected static final List<String> 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 to AWS::GameLift::GameServerGroup.

      Parameters:
      props - L1 properties to apply. This parameter is required.
      options - Mixin options.
    • CfnGameServerGroupPropsMixin

      @Stability(Stable) public CfnGameServerGroupPropsMixin(@NotNull CfnGameServerGroupMixinProps props)
      Create a mixin to apply properties to AWS::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.

      Specified by:
      applyTo in interface software.constructs.IMixin
      Specified by:
      applyTo in class Mixin
      Parameters:
      construct - This parameter is required.
    • supports

      @Stability(Stable) @NotNull public Boolean supports(@NotNull software.constructs.IConstruct construct)
      Check if this mixin supports the given construct.

      Specified by:
      supports in interface software.constructs.IMixin
      Overrides:
      supports in class Mixin
      Parameters:
      construct - This parameter is required.
    • getProps

      @Stability(Stable) @NotNull protected CfnGameServerGroupMixinProps getProps()
    • getStrategy

      @Stability(Stable) @NotNull protected IMergeStrategy getStrategy()