game_server_groups
Creates, updates, deletes or gets a game_server_group resource or lists game_server_groups in a region
Overview
| Name | game_server_groups |
| Type | Resource |
| Description | The AWS::GameLift::GameServerGroup resource creates an Amazon GameLift (GameLift) GameServerGroup. |
| Id | awscc.gamelift.game_server_groups |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
auto_scaling_group_arn | string | A generated unique ID for the EC2 Auto Scaling group that is associated with this game server group. |
auto_scaling_policy | object | Configuration 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_strategy | string | The 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_option | string | The type of delete to perform. |
game_server_group_arn | string | A generated unique ID for the game server group. |
game_server_group_name | string | An identifier for the new game server group. |
game_server_protection_policy | string | A flag that indicates whether instances in the game server group are protected from early termination. |
instance_definitions | array | A set of EC2 instance types to use when creating instances in the group. |
launch_template | object | The 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_size | number | The 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_size | number | The 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_arn | string | The Amazon Resource Name (ARN) for an IAM role that allows Amazon GameLift to access your EC2 Auto Scaling groups. |
tags | array | A 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_subnets | array | A 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. |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
game_server_group_arn | string | A generated unique ID for the game server group. |
region | string | AWS region. |
For more information, see AWS::GameLift::GameServerGroup.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | game_server_groups | INSERT | GameServerGroupName, InstanceDefinitions, RoleArn, region |
delete_resource | game_server_groups | DELETE | Identifier, region |
update_resource | game_server_groups | UPDATE | Identifier, PatchDocument, region |
list_resources | game_server_groups_list_only | SELECT | region |
get_resource | game_server_groups | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
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 awscc.gamelift.game_server_groups
WHERE
region = 'us-east-1' AND
Identifier = '{{ game_server_group_arn }}';
Lists all game_server_groups in a region.
SELECT
region,
game_server_group_arn
FROM awscc.gamelift.game_server_groups_list_only
WHERE
region = 'us-east-1';
INSERT example
Use the following StackQL query and manifest file to create a new game_server_group resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.gamelift.game_server_groups (
GameServerGroupName,
InstanceDefinitions,
RoleArn,
region
)
SELECT
'{{ game_server_group_name }}',
'{{ instance_definitions }}',
'{{ role_arn }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.gamelift.game_server_groups (
AutoScalingPolicy,
BalancingStrategy,
DeleteOption,
GameServerGroupName,
GameServerProtectionPolicy,
InstanceDefinitions,
LaunchTemplate,
MaxSize,
MinSize,
RoleArn,
Tags,
VpcSubnets,
region
)
SELECT
'{{ auto_scaling_policy }}',
'{{ balancing_strategy }}',
'{{ delete_option }}',
'{{ game_server_group_name }}',
'{{ game_server_protection_policy }}',
'{{ instance_definitions }}',
'{{ launch_template }}',
'{{ max_size }}',
'{{ min_size }}',
'{{ role_arn }}',
'{{ tags }}',
'{{ vpc_subnets }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: game_server_group
props:
- name: auto_scaling_policy
value:
estimated_instance_warmup: null
target_tracking_configuration:
target_value: null
- name: balancing_strategy
value: '{{ balancing_strategy }}'
- name: delete_option
value: '{{ delete_option }}'
- name: game_server_group_name
value: '{{ game_server_group_name }}'
- name: game_server_protection_policy
value: '{{ game_server_protection_policy }}'
- name: instance_definitions
value:
- instance_type: '{{ instance_type }}'
weighted_capacity: '{{ weighted_capacity }}'
- name: launch_template
value:
launch_template_id: '{{ launch_template_id }}'
launch_template_name: '{{ launch_template_name }}'
version: '{{ version }}'
- name: max_size
value: null
- name: min_size
value: null
- name: role_arn
value: '{{ role_arn }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
- name: vpc_subnets
value:
- '{{ vpc_subnets[0] }}'
UPDATE example
Use the following StackQL query and manifest file to update a game_server_group resource, using stack-deploy.
/*+ update */
UPDATE awscc.gamelift.game_server_groups
SET PatchDocument = string('{{ {
"AutoScalingPolicy": auto_scaling_policy,
"BalancingStrategy": balancing_strategy,
"DeleteOption": delete_option,
"GameServerGroupName": game_server_group_name,
"GameServerProtectionPolicy": game_server_protection_policy,
"InstanceDefinitions": instance_definitions,
"LaunchTemplate": launch_template,
"MaxSize": max_size,
"MinSize": min_size,
"RoleArn": role_arn,
"Tags": tags,
"VpcSubnets": vpc_subnets
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ game_server_group_arn }}';
DELETE example
/*+ delete */
DELETE FROM awscc.gamelift.game_server_groups
WHERE
Identifier = '{{ game_server_group_arn }}' AND
region = 'us-east-1';
Permissions
To operate on the game_server_groups resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
gamelift:CreateGameServerGroup,
gamelift:ListTagsForResource,
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
gamelift:DescribeGameServerGroup,
gamelift:ListTagsForResource
gamelift:UpdateGameServerGroup,
gamelift:TagResource,
gamelift:UntagResource,
gamelift:ListTagsForResource,
iam:assumeRole,
iam:PassRole,
autoscaling:DescribeAutoScalingGroups,
autoscaling:UpdateAutoScalingGroup,
autoscaling:SetInstanceProtection
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
gamelift:ListGameServerGroups