Skip to main content

game_server_groups

Creates, updates, deletes or gets a game_server_group resource or lists game_server_groups in a region

Overview

Namegame_server_groups
TypeResource
DescriptionThe AWS::GameLift::GameServerGroup resource creates an Amazon GameLift (GameLift) GameServerGroup.
Idaws.gamelift.game_server_groups

Fields

NameDatatypeDescription
auto_scaling_group_arnstringA generated unique ID for the EC2 Auto Scaling group that is associated with this game server group.
auto_scaling_policyobjectConfiguration settings to define a scaling policy for the Auto Scaling group that is optimized for game hosting. Updating this game server group property will not take effect for the created EC2 Auto Scaling group, please update the EC2 Auto Scaling group directly after creating the resource.
balancing_strategystringThe fallback balancing method to use for the game server group when Spot Instances in a Region become unavailable or are not viable for game hosting.
delete_optionstringThe type of delete to perform.
game_server_group_arnstringA generated unique ID for the game server group.
game_server_group_namestringAn identifier for the new game server group.
game_server_protection_policystringA flag that indicates whether instances in the game server group are protected from early termination.
instance_definitionsarrayA set of EC2 instance types to use when creating instances in the group.
launch_templateobjectThe EC2 launch template that contains configuration settings and game server code to be deployed to all instances in the game server group. Updating this game server group property will not take effect for the created EC2 Auto Scaling group, please update the EC2 Auto Scaling group directly after creating the resource.
max_sizenumberThe maximum number of instances allowed in the EC2 Auto Scaling group. Updating this game server group property will not take effect for the created EC2 Auto Scaling group, please update the EC2 Auto Scaling group directly after creating the resource.
min_sizenumberThe minimum number of instances allowed in the EC2 Auto Scaling group. Updating this game server group property will not take effect for the created EC2 Auto Scaling group, please update the EC2 Auto Scaling group directly after creating the resource.
role_arnstringThe Amazon Resource Name (ARN) for an IAM role that allows Amazon GameLift to access your EC2 Auto Scaling groups.
tagsarrayA list of labels to assign to the new game server group resource. Updating game server group tags with CloudFormation will not take effect. Please update this property using AWS GameLift APIs instead.
vpc_subnetsarrayA list of virtual private cloud (VPC) subnets to use with instances in the game server group. Updating this game server group property will not take effect for the created EC2 Auto Scaling group, please update the EC2 Auto Scaling group directly after creating the resource.
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTGameServerGroupName, InstanceDefinitions, RoleArn, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all game_server_groups in a region.

SELECT
region,
auto_scaling_group_arn,
auto_scaling_policy,
balancing_strategy,
delete_option,
game_server_group_arn,
game_server_group_name,
game_server_protection_policy,
instance_definitions,
launch_template,
max_size,
min_size,
role_arn,
tags,
vpc_subnets
FROM aws.gamelift.game_server_groups
WHERE region = 'us-east-1';

Gets all properties from an individual game_server_group.

SELECT
region,
auto_scaling_group_arn,
auto_scaling_policy,
balancing_strategy,
delete_option,
game_server_group_arn,
game_server_group_name,
game_server_protection_policy,
instance_definitions,
launch_template,
max_size,
min_size,
role_arn,
tags,
vpc_subnets
FROM aws.gamelift.game_server_groups
WHERE region = 'us-east-1' AND data__Identifier = '<GameServerGroupArn>';

INSERT example

Use the following StackQL query and manifest file to create a new game_server_group resource, using stack-deploy.

/*+ create */
INSERT INTO aws.gamelift.game_server_groups (
GameServerGroupName,
InstanceDefinitions,
RoleArn,
region
)
SELECT
'{{ GameServerGroupName }}',
'{{ InstanceDefinitions }}',
'{{ RoleArn }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.gamelift.game_server_groups
WHERE data__Identifier = '<GameServerGroupArn>'
AND region = 'us-east-1';

Permissions

To operate on the game_server_groups resource, the following permissions are required:

Create

gamelift:CreateGameServerGroup,
gamelift:TagResource,
gamelift:DescribeGameServerGroup,
iam:assumeRole,
iam:PassRole,
iam:CreateServiceLinkedRole,
ec2:DescribeAvailabilityZones,
ec2:DescribeSubnets,
ec2:RunInstances,
ec2:CreateTags,
ec2:DescribeLaunchTemplateVersions,
autoscaling:CreateAutoScalingGroup,
autoscaling:DescribeLifecycleHooks,
autoscaling:DescribeNotificationConfigurations,
autoscaling:CreateAutoScalingGroup,
autoscaling:CreateOrUpdateTags,
autoscaling:DescribeAutoScalingGroups,
autoscaling:ExitStandby,
autoscaling:PutLifecycleHook,
autoscaling:PutScalingPolicy,
autoscaling:ResumeProcesses,
autoscaling:SetInstanceProtection,
autoscaling:UpdateAutoScalingGroup,
events:PutRule,
events:PutTargets

Read

gamelift:DescribeGameServerGroup

Update

gamelift:UpdateGameServerGroup,
iam:assumeRole,
iam:PassRole,
autoscaling:DescribeAutoScalingGroups,
autoscaling:UpdateAutoScalingGroup,
autoscaling:SetInstanceProtection

Delete

gamelift:DeleteGameServerGroup,
gamelift:DescribeGameServerGroup,
iam:assumeRole,
iam:PassRole,
iam:CreateServiceLinkedRole,
ec2:DescribeAvailabilityZones,
ec2:DescribeSubnets,
ec2:DescribeLaunchTemplateVersions,
autoscaling:CreateAutoScalingGroup,
autoscaling:DescribeLifecycleHooks,
autoscaling:DescribeNotificationConfigurations,
autoscaling:DescribeAutoScalingGroups,
autoscaling:ExitStandby,
autoscaling:PutLifecycleHook,
autoscaling:PutScalingPolicy,
autoscaling:ResumeProcesses,
autoscaling:SetInstanceProtection,
autoscaling:UpdateAutoScalingGroup,
autoscaling:DeleteAutoScalingGroup,
events:PutRule,
events:PutTargets

List

gamelift:ListGameServerGroups