Amazon GameLift

2020/04/02 - Amazon GameLift - 13 new api methods

Changes  Update gamelift client to latest version

ResumeGameServerGroup (new) Link ¶

This action is part of Amazon GameLift FleetIQ with game server groups, which is in preview release and is subject to change.

Reinstates activity on a game server group after it has been suspended. A game server group may be suspended by calling SuspendGameServerGroup, or it may have been involuntarily suspended due to a configuration problem. You can manually resume activity on the group once the configuration problem has been resolved. Refer to the game server group status and status reason for more information on why group activity is suspended.

To resume activity, specify a game server group ARN and the type of activity to be resumed.

Learn more

GameLift FleetIQ Guide

Related operations

  • CreateGameServerGroup

  • ListGameServerGroups

  • DescribeGameServerGroup

  • UpdateGameServerGroup

  • DeleteGameServerGroup

  • ResumeGameServerGroup

  • SuspendGameServerGroup

See also: AWS API Documentation

Request Syntax

client.resume_game_server_group(
    GameServerGroupName='string',
    ResumeActions=[
        'REPLACE_INSTANCE_TYPES',
    ]
)
type GameServerGroupName:

string

param GameServerGroupName:

[REQUIRED]

The unique identifier of the game server group to resume activity on. Use either the GameServerGroup name or ARN value.

type ResumeActions:

list

param ResumeActions:

[REQUIRED]

The action to resume for this game server group.

  • (string) --

rtype:

dict

returns:

Response Syntax

{
    'GameServerGroup': {
        'GameServerGroupName': 'string',
        'GameServerGroupArn': 'string',
        'RoleArn': 'string',
        'InstanceDefinitions': [
            {
                'InstanceType': 'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'c5.large'|'c5.xlarge'|'c5.2xlarge'|'c5.4xlarge'|'c5.9xlarge'|'c5.12xlarge'|'c5.18xlarge'|'c5.24xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'r5.large'|'r5.xlarge'|'r5.2xlarge'|'r5.4xlarge'|'r5.8xlarge'|'r5.12xlarge'|'r5.16xlarge'|'r5.24xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m5.large'|'m5.xlarge'|'m5.2xlarge'|'m5.4xlarge'|'m5.8xlarge'|'m5.12xlarge'|'m5.16xlarge'|'m5.24xlarge',
                'WeightedCapacity': 'string'
            },
        ],
        'BalancingStrategy': 'SPOT_ONLY'|'SPOT_PREFERRED',
        'GameServerProtectionPolicy': 'NO_PROTECTION'|'FULL_PROTECTION',
        'AutoScalingGroupArn': 'string',
        'Status': 'NEW'|'ACTIVATING'|'ACTIVE'|'DELETE_SCHEDULED'|'DELETING'|'DELETED'|'ERROR',
        'StatusReason': 'string',
        'SuspendedActions': [
            'REPLACE_INSTANCE_TYPES',
        ],
        'CreationTime': datetime(2015, 1, 1),
        'LastUpdatedTime': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    • GameServerGroup (dict) --

      An object that describes the game server group resource, with the SuspendedActions property updated to reflect the resumed activity.

      • GameServerGroupName (string) --

        A developer-defined identifier for the game server group. The name is unique per Region per AWS account.

      • GameServerGroupArn (string) --

        A generated unique ID for the game server group.

      • RoleArn (string) --

        The Amazon Resource Name ( ARN) for an IAM role that allows Amazon GameLift to access your EC2 Auto Scaling groups. The submitted role is validated to ensure that it contains the necessary permissions for game server groups.

      • InstanceDefinitions (list) --

        The set of EC2 instance types that GameLift FleetIQ can use when rebalancing and autoscaling instances in the group.

        • (dict) --

          This data type is part of Amazon GameLift FleetIQ with game server groups, which is in preview release and is subject to change.

          An allowed instance type for your game server group. GameLift FleetIQ periodically evaluates each defined instance type for viability. It then updates the Auto Scaling group with the list of viable instance types.

          • InstanceType (string) --

            An EC2 instance type designation.

          • WeightedCapacity (string) --

            Instance weighting that indicates how much this instance type contributes to the total capacity of a game server group. Instance weights are used by GameLift FleetIQ to calculate the instance type's cost per unit hour and better identify the most cost-effective options. For detailed information on weighting instance capacity, see Instance Weighting in the Amazon EC2 Auto Scaling User Guide. Default value is "1".

      • BalancingStrategy (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. Once triggered, this method remains active until Spot instances can once again be used. Method options include:

        • SPOT_ONLY -- If Spot instances are unavailable, the game server group provides no hosting capacity. No new instances are started, and the existing nonviable Spot instances are terminated (once current gameplay ends) and not replaced.

        • SPOT_PREFERRED -- If Spot instances are unavailable, the game server group continues to provide hosting capacity by using On-Demand instances. Existing nonviable Spot instances are terminated (once current gameplay ends) and replaced with new On-Demand instances.

      • GameServerProtectionPolicy (string) --

        A flag that indicates whether instances in the game server group are protected from early termination. Unprotected instances that have active game servers running may 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 DeleteGameServerGroup). An exception to this is Spot Instances, which may be terminated by AWS regardless of protection status.

      • AutoScalingGroupArn (string) --

        A generated unique ID for the EC2 Auto Scaling group with is associated with this game server group.

      • Status (string) --

        The current status of the game server group. Possible statuses include:

        • NEW - GameLift FleetIQ has validated the CreateGameServerGroup() request.

        • ACTIVATING - GameLift FleetIQ is setting up a game server group, which includes creating an autoscaling group in your AWS account.

        • ACTIVE - The game server group has been successfully created.

        • DELETE_SCHEDULED - A request to delete the game server group has been received.

        • DELETING - GameLift FleetIQ has received a valid DeleteGameServerGroup() request and is processing it. GameLift FleetIQ must first complete and release hosts before it deletes the autoscaling group and the game server group.

        • DELETED - The game server group has been successfully deleted.

        • ERROR - The asynchronous processes of activating or deleting a game server group has failed, resulting in an error state.

      • StatusReason (string) --

        Additional information about the current game server group status. This information may provide additional insight on groups that in ERROR status.

      • SuspendedActions (list) --

        A list of activities that are currently suspended for this game server group. If this property is empty, all activities are occurring.

        • (string) --

      • CreationTime (datetime) --

        A time stamp indicating when this data object was created. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").

      • LastUpdatedTime (datetime) --

        A time stamp indicating when this game server group was last updated.

DeleteGameServerGroup (new) Link ¶

This action is part of Amazon GameLift FleetIQ with game server groups, which is in preview release and is subject to change.

Terminates a game server group and permanently deletes the game server group record. You have several options for how these resources are impacted when deleting the game server group. Depending on the type of delete action selected, this action may affect three types of resources: the game server group, the corresponding Auto Scaling group, and all game servers currently running in the group.

To delete a game server group, identify the game server group to delete and specify the type of delete action to initiate. Game server groups can only be deleted if they are in ACTIVE or ERROR status.

If the delete request is successful, a series of actions are kicked off. The game server group status is changed to DELETE_SCHEDULED, which prevents new game servers from being registered and stops autoscaling activity. Once all game servers in the game server group are de-registered, GameLift FleetIQ can begin deleting resources. If any of the delete actions fail, the game server group is placed in ERROR status.

GameLift FleetIQ emits delete events to Amazon CloudWatch.

Learn more

GameLift FleetIQ Guide

Related operations

  • CreateGameServerGroup

  • ListGameServerGroups

  • DescribeGameServerGroup

  • UpdateGameServerGroup

  • DeleteGameServerGroup

  • ResumeGameServerGroup

  • SuspendGameServerGroup

See also: AWS API Documentation

Request Syntax

client.delete_game_server_group(
    GameServerGroupName='string',
    DeleteOption='SAFE_DELETE'|'FORCE_DELETE'|'RETAIN'
)
type GameServerGroupName:

string

param GameServerGroupName:

[REQUIRED]

The unique identifier of the game server group to delete. Use either the GameServerGroup name or ARN value.

type DeleteOption:

string

param DeleteOption:

The type of delete to perform. Options include:

  • SAFE_DELETE – Terminates the game server group and EC2 Auto Scaling group only when it has no game servers that are in IN_USE status.

  • FORCE_DELETE – Terminates the game server group, including all active game servers regardless of their utilization status, and the EC2 Auto Scaling group.

  • RETAIN – Does a safe delete of the game server group but retains the EC2 Auto Scaling group as is.

rtype:

dict

returns:

Response Syntax

{
    'GameServerGroup': {
        'GameServerGroupName': 'string',
        'GameServerGroupArn': 'string',
        'RoleArn': 'string',
        'InstanceDefinitions': [
            {
                'InstanceType': 'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'c5.large'|'c5.xlarge'|'c5.2xlarge'|'c5.4xlarge'|'c5.9xlarge'|'c5.12xlarge'|'c5.18xlarge'|'c5.24xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'r5.large'|'r5.xlarge'|'r5.2xlarge'|'r5.4xlarge'|'r5.8xlarge'|'r5.12xlarge'|'r5.16xlarge'|'r5.24xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m5.large'|'m5.xlarge'|'m5.2xlarge'|'m5.4xlarge'|'m5.8xlarge'|'m5.12xlarge'|'m5.16xlarge'|'m5.24xlarge',
                'WeightedCapacity': 'string'
            },
        ],
        'BalancingStrategy': 'SPOT_ONLY'|'SPOT_PREFERRED',
        'GameServerProtectionPolicy': 'NO_PROTECTION'|'FULL_PROTECTION',
        'AutoScalingGroupArn': 'string',
        'Status': 'NEW'|'ACTIVATING'|'ACTIVE'|'DELETE_SCHEDULED'|'DELETING'|'DELETED'|'ERROR',
        'StatusReason': 'string',
        'SuspendedActions': [
            'REPLACE_INSTANCE_TYPES',
        ],
        'CreationTime': datetime(2015, 1, 1),
        'LastUpdatedTime': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    • GameServerGroup (dict) --

      An object that describes the deleted game server group resource, with status updated to DELETE_SCHEDULED.

      • GameServerGroupName (string) --

        A developer-defined identifier for the game server group. The name is unique per Region per AWS account.

      • GameServerGroupArn (string) --

        A generated unique ID for the game server group.

      • RoleArn (string) --

        The Amazon Resource Name ( ARN) for an IAM role that allows Amazon GameLift to access your EC2 Auto Scaling groups. The submitted role is validated to ensure that it contains the necessary permissions for game server groups.

      • InstanceDefinitions (list) --

        The set of EC2 instance types that GameLift FleetIQ can use when rebalancing and autoscaling instances in the group.

        • (dict) --

          This data type is part of Amazon GameLift FleetIQ with game server groups, which is in preview release and is subject to change.

          An allowed instance type for your game server group. GameLift FleetIQ periodically evaluates each defined instance type for viability. It then updates the Auto Scaling group with the list of viable instance types.

          • InstanceType (string) --

            An EC2 instance type designation.

          • WeightedCapacity (string) --

            Instance weighting that indicates how much this instance type contributes to the total capacity of a game server group. Instance weights are used by GameLift FleetIQ to calculate the instance type's cost per unit hour and better identify the most cost-effective options. For detailed information on weighting instance capacity, see Instance Weighting in the Amazon EC2 Auto Scaling User Guide. Default value is "1".

      • BalancingStrategy (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. Once triggered, this method remains active until Spot instances can once again be used. Method options include:

        • SPOT_ONLY -- If Spot instances are unavailable, the game server group provides no hosting capacity. No new instances are started, and the existing nonviable Spot instances are terminated (once current gameplay ends) and not replaced.

        • SPOT_PREFERRED -- If Spot instances are unavailable, the game server group continues to provide hosting capacity by using On-Demand instances. Existing nonviable Spot instances are terminated (once current gameplay ends) and replaced with new On-Demand instances.

      • GameServerProtectionPolicy (string) --

        A flag that indicates whether instances in the game server group are protected from early termination. Unprotected instances that have active game servers running may 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 DeleteGameServerGroup). An exception to this is Spot Instances, which may be terminated by AWS regardless of protection status.

      • AutoScalingGroupArn (string) --

        A generated unique ID for the EC2 Auto Scaling group with is associated with this game server group.

      • Status (string) --

        The current status of the game server group. Possible statuses include:

        • NEW - GameLift FleetIQ has validated the CreateGameServerGroup() request.

        • ACTIVATING - GameLift FleetIQ is setting up a game server group, which includes creating an autoscaling group in your AWS account.

        • ACTIVE - The game server group has been successfully created.

        • DELETE_SCHEDULED - A request to delete the game server group has been received.

        • DELETING - GameLift FleetIQ has received a valid DeleteGameServerGroup() request and is processing it. GameLift FleetIQ must first complete and release hosts before it deletes the autoscaling group and the game server group.

        • DELETED - The game server group has been successfully deleted.

        • ERROR - The asynchronous processes of activating or deleting a game server group has failed, resulting in an error state.

      • StatusReason (string) --

        Additional information about the current game server group status. This information may provide additional insight on groups that in ERROR status.

      • SuspendedActions (list) --

        A list of activities that are currently suspended for this game server group. If this property is empty, all activities are occurring.

        • (string) --

      • CreationTime (datetime) --

        A time stamp indicating when this data object was created. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").

      • LastUpdatedTime (datetime) --

        A time stamp indicating when this game server group was last updated.

UpdateGameServerGroup (new) Link ¶

This action is part of Amazon GameLift FleetIQ with game server groups, which is in preview release and is subject to change.

Updates GameLift FleetIQ-specific properties for a game server group. These properties include instance rebalancing and game server protection. Many Auto Scaling group properties are updated directly. These include autoscaling policies, minimum/maximum/desired instance counts, and launch template.

To update the game server group, specify the game server group ID and provide the updated values.

Updated properties are validated to ensure that GameLift FleetIQ can continue to perform its core instance rebalancing activity. When you change Auto Scaling group properties directly and the changes cause errors with GameLift FleetIQ activities, an alert is sent.

Learn more

GameLift FleetIQ Guide

Updating a GameLift FleetIQ-Linked Auto Scaling Group

Related operations

  • CreateGameServerGroup

  • ListGameServerGroups

  • DescribeGameServerGroup

  • UpdateGameServerGroup

  • DeleteGameServerGroup

  • ResumeGameServerGroup

  • SuspendGameServerGroup

See also: AWS API Documentation

Request Syntax

client.update_game_server_group(
    GameServerGroupName='string',
    RoleArn='string',
    InstanceDefinitions=[
        {
            'InstanceType': 'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'c5.large'|'c5.xlarge'|'c5.2xlarge'|'c5.4xlarge'|'c5.9xlarge'|'c5.12xlarge'|'c5.18xlarge'|'c5.24xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'r5.large'|'r5.xlarge'|'r5.2xlarge'|'r5.4xlarge'|'r5.8xlarge'|'r5.12xlarge'|'r5.16xlarge'|'r5.24xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m5.large'|'m5.xlarge'|'m5.2xlarge'|'m5.4xlarge'|'m5.8xlarge'|'m5.12xlarge'|'m5.16xlarge'|'m5.24xlarge',
            'WeightedCapacity': 'string'
        },
    ],
    GameServerProtectionPolicy='NO_PROTECTION'|'FULL_PROTECTION',
    BalancingStrategy='SPOT_ONLY'|'SPOT_PREFERRED'
)
type GameServerGroupName:

string

param GameServerGroupName:

[REQUIRED]

The unique identifier of the game server group to update. Use either the GameServerGroup name or ARN value.

type RoleArn:

string

param RoleArn:

The Amazon Resource Name ( ARN) for an IAM role that allows Amazon GameLift to access your EC2 Auto Scaling groups. The submitted role is validated to ensure that it contains the necessary permissions for game server groups.

type InstanceDefinitions:

list

param InstanceDefinitions:

An updated list of EC2 instance types to use when creating instances in the group. The instance definition must specify instance types that are supported by GameLift FleetIQ, and must include at least two instance types. This updated list replaces the entire current list of instance definitions for the game server group. For more information on instance types, see EC2 Instance Types in the Amazon EC2 User Guide..

  • (dict) --

    This data type is part of Amazon GameLift FleetIQ with game server groups, which is in preview release and is subject to change.

    An allowed instance type for your game server group. GameLift FleetIQ periodically evaluates each defined instance type for viability. It then updates the Auto Scaling group with the list of viable instance types.

    • InstanceType (string) -- [REQUIRED]

      An EC2 instance type designation.

    • WeightedCapacity (string) --

      Instance weighting that indicates how much this instance type contributes to the total capacity of a game server group. Instance weights are used by GameLift FleetIQ to calculate the instance type's cost per unit hour and better identify the most cost-effective options. For detailed information on weighting instance capacity, see Instance Weighting in the Amazon EC2 Auto Scaling User Guide. Default value is "1".

type GameServerProtectionPolicy:

string

param GameServerProtectionPolicy:

A flag that indicates whether instances in the game server group are protected from early termination. Unprotected instances that have active game servers running may by 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. An exception to this is Spot Instances, which may be terminated by AWS regardless of protection status. This property is set to NO_PROTECTION by default.

type BalancingStrategy:

string

param BalancingStrategy:

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. Once triggered, this method remains active until Spot instances can once again be used. Method options include:

  • SPOT_ONLY -- If Spot instances are unavailable, the game server group provides no hosting capacity. No new instances are started, and the existing nonviable Spot instances are terminated (once current gameplay ends) and not replaced.

  • SPOT_PREFERRED -- If Spot instances are unavailable, the game server group continues to provide hosting capacity by using On-Demand instances. Existing nonviable Spot instances are terminated (once current gameplay ends) and replaced with new On-Demand instances.

rtype:

dict

returns:

Response Syntax

{
    'GameServerGroup': {
        'GameServerGroupName': 'string',
        'GameServerGroupArn': 'string',
        'RoleArn': 'string',
        'InstanceDefinitions': [
            {
                'InstanceType': 'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'c5.large'|'c5.xlarge'|'c5.2xlarge'|'c5.4xlarge'|'c5.9xlarge'|'c5.12xlarge'|'c5.18xlarge'|'c5.24xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'r5.large'|'r5.xlarge'|'r5.2xlarge'|'r5.4xlarge'|'r5.8xlarge'|'r5.12xlarge'|'r5.16xlarge'|'r5.24xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m5.large'|'m5.xlarge'|'m5.2xlarge'|'m5.4xlarge'|'m5.8xlarge'|'m5.12xlarge'|'m5.16xlarge'|'m5.24xlarge',
                'WeightedCapacity': 'string'
            },
        ],
        'BalancingStrategy': 'SPOT_ONLY'|'SPOT_PREFERRED',
        'GameServerProtectionPolicy': 'NO_PROTECTION'|'FULL_PROTECTION',
        'AutoScalingGroupArn': 'string',
        'Status': 'NEW'|'ACTIVATING'|'ACTIVE'|'DELETE_SCHEDULED'|'DELETING'|'DELETED'|'ERROR',
        'StatusReason': 'string',
        'SuspendedActions': [
            'REPLACE_INSTANCE_TYPES',
        ],
        'CreationTime': datetime(2015, 1, 1),
        'LastUpdatedTime': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    • GameServerGroup (dict) --

      An object that describes the game server group resource with updated properties.

      • GameServerGroupName (string) --

        A developer-defined identifier for the game server group. The name is unique per Region per AWS account.

      • GameServerGroupArn (string) --

        A generated unique ID for the game server group.

      • RoleArn (string) --

        The Amazon Resource Name ( ARN) for an IAM role that allows Amazon GameLift to access your EC2 Auto Scaling groups. The submitted role is validated to ensure that it contains the necessary permissions for game server groups.

      • InstanceDefinitions (list) --

        The set of EC2 instance types that GameLift FleetIQ can use when rebalancing and autoscaling instances in the group.

        • (dict) --

          This data type is part of Amazon GameLift FleetIQ with game server groups, which is in preview release and is subject to change.

          An allowed instance type for your game server group. GameLift FleetIQ periodically evaluates each defined instance type for viability. It then updates the Auto Scaling group with the list of viable instance types.

          • InstanceType (string) --

            An EC2 instance type designation.

          • WeightedCapacity (string) --

            Instance weighting that indicates how much this instance type contributes to the total capacity of a game server group. Instance weights are used by GameLift FleetIQ to calculate the instance type's cost per unit hour and better identify the most cost-effective options. For detailed information on weighting instance capacity, see Instance Weighting in the Amazon EC2 Auto Scaling User Guide. Default value is "1".

      • BalancingStrategy (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. Once triggered, this method remains active until Spot instances can once again be used. Method options include:

        • SPOT_ONLY -- If Spot instances are unavailable, the game server group provides no hosting capacity. No new instances are started, and the existing nonviable Spot instances are terminated (once current gameplay ends) and not replaced.

        • SPOT_PREFERRED -- If Spot instances are unavailable, the game server group continues to provide hosting capacity by using On-Demand instances. Existing nonviable Spot instances are terminated (once current gameplay ends) and replaced with new On-Demand instances.

      • GameServerProtectionPolicy (string) --

        A flag that indicates whether instances in the game server group are protected from early termination. Unprotected instances that have active game servers running may 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 DeleteGameServerGroup). An exception to this is Spot Instances, which may be terminated by AWS regardless of protection status.

      • AutoScalingGroupArn (string) --

        A generated unique ID for the EC2 Auto Scaling group with is associated with this game server group.

      • Status (string) --

        The current status of the game server group. Possible statuses include:

        • NEW - GameLift FleetIQ has validated the CreateGameServerGroup() request.

        • ACTIVATING - GameLift FleetIQ is setting up a game server group, which includes creating an autoscaling group in your AWS account.

        • ACTIVE - The game server group has been successfully created.

        • DELETE_SCHEDULED - A request to delete the game server group has been received.

        • DELETING - GameLift FleetIQ has received a valid DeleteGameServerGroup() request and is processing it. GameLift FleetIQ must first complete and release hosts before it deletes the autoscaling group and the game server group.

        • DELETED - The game server group has been successfully deleted.

        • ERROR - The asynchronous processes of activating or deleting a game server group has failed, resulting in an error state.

      • StatusReason (string) --

        Additional information about the current game server group status. This information may provide additional insight on groups that in ERROR status.

      • SuspendedActions (list) --

        A list of activities that are currently suspended for this game server group. If this property is empty, all activities are occurring.

        • (string) --

      • CreationTime (datetime) --

        A time stamp indicating when this data object was created. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").

      • LastUpdatedTime (datetime) --

        A time stamp indicating when this game server group was last updated.

CreateGameServerGroup (new) Link ¶

This action is part of Amazon GameLift FleetIQ with game server groups, which is in preview release and is subject to change.

Creates a GameLift FleetIQ game server group to manage a collection of EC2 instances for game hosting. In addition to creating the game server group, this action also creates an Auto Scaling group in your AWS account and establishes a link between the two groups. You have full control over configuration of the Auto Scaling group, but GameLift FleetIQ routinely certain Auto Scaling group properties in order to optimize the group's instances for low-cost game hosting. 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.

Prior creating a new game server group, you must set up the following:

  • An EC2 launch template. The template provides configuration settings for a set of EC2 instances and includes the game server build that you want to deploy and run on each instance. For more information on creating a launch template, see Launching an Instance from a Launch Template in the Amazon EC2 User Guide.

  • An IAM role. The role sets up limited access to your AWS account, allowing GameLift FleetIQ to create and manage the EC2 Auto Scaling group, get instance data, and emit metrics and events to CloudWatch. For more information on setting up an IAM permissions policy with principal access for GameLift, see Specifying a Principal in a Policy in the Amazon S3 Developer Guide.

To create a new game server group, provide a name and specify the IAM role and EC2 launch template. You also need to provide a list of instance types to be used in the group and set initial maximum and minimum limits on the group's instance count. You can optionally set an autoscaling 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. Keep in mind, however, that some properties are periodically updated by GameLift FleetIQ as it balances the group's instances based on availability and cost.

Learn more

GameLift FleetIQ Guide

Updating a GameLift FleetIQ-Linked Auto Scaling Group

Related operations

  • CreateGameServerGroup

  • ListGameServerGroups

  • DescribeGameServerGroup

  • UpdateGameServerGroup

  • DeleteGameServerGroup

  • ResumeGameServerGroup

  • SuspendGameServerGroup

See also: AWS API Documentation

Request Syntax

client.create_game_server_group(
    GameServerGroupName='string',
    RoleArn='string',
    MinSize=123,
    MaxSize=123,
    LaunchTemplate={
        'LaunchTemplateId': 'string',
        'LaunchTemplateName': 'string',
        'Version': 'string'
    },
    InstanceDefinitions=[
        {
            'InstanceType': 'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'c5.large'|'c5.xlarge'|'c5.2xlarge'|'c5.4xlarge'|'c5.9xlarge'|'c5.12xlarge'|'c5.18xlarge'|'c5.24xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'r5.large'|'r5.xlarge'|'r5.2xlarge'|'r5.4xlarge'|'r5.8xlarge'|'r5.12xlarge'|'r5.16xlarge'|'r5.24xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m5.large'|'m5.xlarge'|'m5.2xlarge'|'m5.4xlarge'|'m5.8xlarge'|'m5.12xlarge'|'m5.16xlarge'|'m5.24xlarge',
            'WeightedCapacity': 'string'
        },
    ],
    AutoScalingPolicy={
        'EstimatedInstanceWarmup': 123,
        'TargetTrackingConfiguration': {
            'TargetValue': 123.0
        }
    },
    BalancingStrategy='SPOT_ONLY'|'SPOT_PREFERRED',
    GameServerProtectionPolicy='NO_PROTECTION'|'FULL_PROTECTION',
    VpcSubnets=[
        'string',
    ],
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
type GameServerGroupName:

string

param GameServerGroupName:

[REQUIRED]

An identifier for the new game server group. This value is used to generate unique ARN identifiers for the EC2 Auto Scaling group and the GameLift FleetIQ game server group. The name must be unique per Region per AWS account.

type RoleArn:

string

param RoleArn:

[REQUIRED]

The Amazon Resource Name ( ARN) for an IAM role that allows Amazon GameLift to access your EC2 Auto Scaling groups. The submitted role is validated to ensure that it contains the necessary permissions for game server groups.

type MinSize:

integer

param MinSize:

[REQUIRED]

The minimum number of instances allowed in the EC2 Auto Scaling group. During autoscaling events, GameLift FleetIQ and EC2 do not scale down the group below this minimum. In production, this value should be set to at least 1.

type MaxSize:

integer

param MaxSize:

[REQUIRED]

The maximum number of instances allowed in the EC2 Auto Scaling group. During autoscaling events, GameLift FleetIQ and EC2 do not scale up the group above this maximum.

type LaunchTemplate:

dict

param LaunchTemplate:

[REQUIRED]

The EC2 launch template that contains configuration settings and game server code to be deployed to all instances in the game server group. 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 EC2 Auto Scaling User Guide.

  • LaunchTemplateId (string) --

    A unique identifier for an existing EC2 launch template.

  • LaunchTemplateName (string) --

    A readable identifier for an existing EC2 launch template.

  • Version (string) --

    The version of the EC2 launch template to use. If no version is specified, the default version will be used. EC2 allows you to specify a default version for a launch template, if none is set, the default is the first version created.

type InstanceDefinitions:

list

param InstanceDefinitions:

[REQUIRED]

A set of EC2 instance types to use when creating instances in the group. The instance definitions must specify at least two different instance types that are supported by GameLift FleetIQ. For more information on instance types, see EC2 Instance Types in the Amazon EC2 User Guide.

  • (dict) --

    This data type is part of Amazon GameLift FleetIQ with game server groups, which is in preview release and is subject to change.

    An allowed instance type for your game server group. GameLift FleetIQ periodically evaluates each defined instance type for viability. It then updates the Auto Scaling group with the list of viable instance types.

    • InstanceType (string) -- [REQUIRED]

      An EC2 instance type designation.

    • WeightedCapacity (string) --

      Instance weighting that indicates how much this instance type contributes to the total capacity of a game server group. Instance weights are used by GameLift FleetIQ to calculate the instance type's cost per unit hour and better identify the most cost-effective options. For detailed information on weighting instance capacity, see Instance Weighting in the Amazon EC2 Auto Scaling User Guide. Default value is "1".

type AutoScalingPolicy:

dict

param AutoScalingPolicy:

Configuration settings to define a scaling policy for the Auto Scaling group that is optimized for game hosting. The scaling policy uses the metric "PercentUtilizedGameServers" to maintain a buffer of idle game servers that can immediately accommodate new games and players. Once the game server and Auto Scaling groups are created, you can update the scaling policy settings directly in Auto Scaling Groups.

  • EstimatedInstanceWarmup (integer) --

    Length of time, in seconds, it takes for a new instance to start new game server processes and register with GameLift FleetIQ. Specifying a warm-up time can be useful, particularly with game servers that take a long time to start up, because it avoids prematurely starting new instances

  • TargetTrackingConfiguration (dict) -- [REQUIRED]

    Settings for a target-based scaling policy applied to Auto Scaling group. These settings are used to create a target-based policy that tracks the GameLift FleetIQ metric "PercentUtilizedGameServers" and specifies a target value for the metric. As player usage changes, the policy triggers to adjust the game server group capacity so that the metric returns to the target value.

    • TargetValue (float) -- [REQUIRED]

      Desired value to use with a game server group target-based scaling policy.

type BalancingStrategy:

string

param BalancingStrategy:

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. Once triggered, this method remains active until Spot instances can once again be used. Method options include:

  • SPOT_ONLY -- If Spot instances are unavailable, the game server group provides no hosting capacity. No new instances are started, and the existing nonviable Spot instances are terminated (once current gameplay ends) and not replaced.

  • SPOT_PREFERRED -- If Spot instances are unavailable, the game server group continues to provide hosting capacity by using On-Demand instances. Existing nonviable Spot instances are terminated (once current gameplay ends) and replaced with new On-Demand instances.

type GameServerProtectionPolicy:

string

param GameServerProtectionPolicy:

A flag that indicates whether instances in the game server group are protected from early termination. Unprotected instances that have active game servers running may by 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. An exception to this is Spot Instances, which may be terminated by AWS regardless of protection status. This property is set to NO_PROTECTION by default.

type VpcSubnets:

list

param VpcSubnets:

A list of virtual private cloud (VPC) subnets to use with instances in the game server group. By default, all GameLift FleetIQ-supported availability zones are used; this parameter allows you to specify VPCs that you've set up.

  • (string) --

type Tags:

list

param Tags:

A list of labels to assign to the new game server group resource. Tags are developer-defined key-value pairs. Tagging AWS resources are 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. The maximum tag limit may be lower than stated. See the AWS General Reference for actual tagging limits.

  • (dict) --

    A label that can be assigned to a GameLift resource.

    Learn more

    Tagging AWS Resources in the AWS General Reference

    AWS Tagging Strategies

    Related operations

    • TagResource

    • UntagResource

    • ListTagsForResource

    • Key (string) -- [REQUIRED]

      The key for a developer-defined key:value pair for tagging an AWS resource.

    • Value (string) -- [REQUIRED]

      The value for a developer-defined key:value pair for tagging an AWS resource.

rtype:

dict

returns:

Response Syntax

{
    'GameServerGroup': {
        'GameServerGroupName': 'string',
        'GameServerGroupArn': 'string',
        'RoleArn': 'string',
        'InstanceDefinitions': [
            {
                'InstanceType': 'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'c5.large'|'c5.xlarge'|'c5.2xlarge'|'c5.4xlarge'|'c5.9xlarge'|'c5.12xlarge'|'c5.18xlarge'|'c5.24xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'r5.large'|'r5.xlarge'|'r5.2xlarge'|'r5.4xlarge'|'r5.8xlarge'|'r5.12xlarge'|'r5.16xlarge'|'r5.24xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m5.large'|'m5.xlarge'|'m5.2xlarge'|'m5.4xlarge'|'m5.8xlarge'|'m5.12xlarge'|'m5.16xlarge'|'m5.24xlarge',
                'WeightedCapacity': 'string'
            },
        ],
        'BalancingStrategy': 'SPOT_ONLY'|'SPOT_PREFERRED',
        'GameServerProtectionPolicy': 'NO_PROTECTION'|'FULL_PROTECTION',
        'AutoScalingGroupArn': 'string',
        'Status': 'NEW'|'ACTIVATING'|'ACTIVE'|'DELETE_SCHEDULED'|'DELETING'|'DELETED'|'ERROR',
        'StatusReason': 'string',
        'SuspendedActions': [
            'REPLACE_INSTANCE_TYPES',
        ],
        'CreationTime': datetime(2015, 1, 1),
        'LastUpdatedTime': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    • GameServerGroup (dict) --

      The newly created game server group object, including the new ARN value for the GameLift FleetIQ game server group and the object's status. The EC2 Auto Scaling group ARN is initially null, since the group has not yet been created. This value is added once the game server group status reaches ACTIVE.

      • GameServerGroupName (string) --

        A developer-defined identifier for the game server group. The name is unique per Region per AWS account.

      • GameServerGroupArn (string) --

        A generated unique ID for the game server group.

      • RoleArn (string) --

        The Amazon Resource Name ( ARN) for an IAM role that allows Amazon GameLift to access your EC2 Auto Scaling groups. The submitted role is validated to ensure that it contains the necessary permissions for game server groups.

      • InstanceDefinitions (list) --

        The set of EC2 instance types that GameLift FleetIQ can use when rebalancing and autoscaling instances in the group.

        • (dict) --

          This data type is part of Amazon GameLift FleetIQ with game server groups, which is in preview release and is subject to change.

          An allowed instance type for your game server group. GameLift FleetIQ periodically evaluates each defined instance type for viability. It then updates the Auto Scaling group with the list of viable instance types.

          • InstanceType (string) --

            An EC2 instance type designation.

          • WeightedCapacity (string) --

            Instance weighting that indicates how much this instance type contributes to the total capacity of a game server group. Instance weights are used by GameLift FleetIQ to calculate the instance type's cost per unit hour and better identify the most cost-effective options. For detailed information on weighting instance capacity, see Instance Weighting in the Amazon EC2 Auto Scaling User Guide. Default value is "1".

      • BalancingStrategy (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. Once triggered, this method remains active until Spot instances can once again be used. Method options include:

        • SPOT_ONLY -- If Spot instances are unavailable, the game server group provides no hosting capacity. No new instances are started, and the existing nonviable Spot instances are terminated (once current gameplay ends) and not replaced.

        • SPOT_PREFERRED -- If Spot instances are unavailable, the game server group continues to provide hosting capacity by using On-Demand instances. Existing nonviable Spot instances are terminated (once current gameplay ends) and replaced with new On-Demand instances.

      • GameServerProtectionPolicy (string) --

        A flag that indicates whether instances in the game server group are protected from early termination. Unprotected instances that have active game servers running may 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 DeleteGameServerGroup). An exception to this is Spot Instances, which may be terminated by AWS regardless of protection status.

      • AutoScalingGroupArn (string) --

        A generated unique ID for the EC2 Auto Scaling group with is associated with this game server group.

      • Status (string) --

        The current status of the game server group. Possible statuses include:

        • NEW - GameLift FleetIQ has validated the CreateGameServerGroup() request.

        • ACTIVATING - GameLift FleetIQ is setting up a game server group, which includes creating an autoscaling group in your AWS account.

        • ACTIVE - The game server group has been successfully created.

        • DELETE_SCHEDULED - A request to delete the game server group has been received.

        • DELETING - GameLift FleetIQ has received a valid DeleteGameServerGroup() request and is processing it. GameLift FleetIQ must first complete and release hosts before it deletes the autoscaling group and the game server group.

        • DELETED - The game server group has been successfully deleted.

        • ERROR - The asynchronous processes of activating or deleting a game server group has failed, resulting in an error state.

      • StatusReason (string) --

        Additional information about the current game server group status. This information may provide additional insight on groups that in ERROR status.

      • SuspendedActions (list) --

        A list of activities that are currently suspended for this game server group. If this property is empty, all activities are occurring.

        • (string) --

      • CreationTime (datetime) --

        A time stamp indicating when this data object was created. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").

      • LastUpdatedTime (datetime) --

        A time stamp indicating when this game server group was last updated.

SuspendGameServerGroup (new) Link ¶

This action is part of Amazon GameLift FleetIQ with game server groups, which is in preview release and is subject to change.

Temporarily stops activity on a game server group without terminating instances or the game server group. Activity can be restarted by calling ResumeGameServerGroup. Activities that can suspended are:

  • Instance type replacement. This activity evaluates the current Spot viability of all instance types that are defined for the game server group. It updates the Auto Scaling group to remove nonviable Spot instance types (which have a higher chance of game server interruptions) and rebalances capacity across the remaining viable Spot instance types. When this activity is suspended, the Auto Scaling group continues with its current balance, regardless of viability. Instance protection, utilization metrics, and capacity autoscaling activities continue to be active.

To suspend activity, specify a game server group ARN and the type of activity to be suspended.

Learn more

GameLift FleetIQ Guide

Related operations

  • CreateGameServerGroup

  • ListGameServerGroups

  • DescribeGameServerGroup

  • UpdateGameServerGroup

  • DeleteGameServerGroup

  • ResumeGameServerGroup

  • SuspendGameServerGroup

See also: AWS API Documentation

Request Syntax

client.suspend_game_server_group(
    GameServerGroupName='string',
    SuspendActions=[
        'REPLACE_INSTANCE_TYPES',
    ]
)
type GameServerGroupName:

string

param GameServerGroupName:

[REQUIRED]

The unique identifier of the game server group to stop activity on. Use either the GameServerGroup name or ARN value.

type SuspendActions:

list

param SuspendActions:

[REQUIRED]

The action to suspend for this game server group.

  • (string) --

rtype:

dict

returns:

Response Syntax

{
    'GameServerGroup': {
        'GameServerGroupName': 'string',
        'GameServerGroupArn': 'string',
        'RoleArn': 'string',
        'InstanceDefinitions': [
            {
                'InstanceType': 'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'c5.large'|'c5.xlarge'|'c5.2xlarge'|'c5.4xlarge'|'c5.9xlarge'|'c5.12xlarge'|'c5.18xlarge'|'c5.24xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'r5.large'|'r5.xlarge'|'r5.2xlarge'|'r5.4xlarge'|'r5.8xlarge'|'r5.12xlarge'|'r5.16xlarge'|'r5.24xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m5.large'|'m5.xlarge'|'m5.2xlarge'|'m5.4xlarge'|'m5.8xlarge'|'m5.12xlarge'|'m5.16xlarge'|'m5.24xlarge',
                'WeightedCapacity': 'string'
            },
        ],
        'BalancingStrategy': 'SPOT_ONLY'|'SPOT_PREFERRED',
        'GameServerProtectionPolicy': 'NO_PROTECTION'|'FULL_PROTECTION',
        'AutoScalingGroupArn': 'string',
        'Status': 'NEW'|'ACTIVATING'|'ACTIVE'|'DELETE_SCHEDULED'|'DELETING'|'DELETED'|'ERROR',
        'StatusReason': 'string',
        'SuspendedActions': [
            'REPLACE_INSTANCE_TYPES',
        ],
        'CreationTime': datetime(2015, 1, 1),
        'LastUpdatedTime': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    • GameServerGroup (dict) --

      An object that describes the game server group resource, with the SuspendedActions property updated to reflect the suspended activity.

      • GameServerGroupName (string) --

        A developer-defined identifier for the game server group. The name is unique per Region per AWS account.

      • GameServerGroupArn (string) --

        A generated unique ID for the game server group.

      • RoleArn (string) --

        The Amazon Resource Name ( ARN) for an IAM role that allows Amazon GameLift to access your EC2 Auto Scaling groups. The submitted role is validated to ensure that it contains the necessary permissions for game server groups.

      • InstanceDefinitions (list) --

        The set of EC2 instance types that GameLift FleetIQ can use when rebalancing and autoscaling instances in the group.

        • (dict) --

          This data type is part of Amazon GameLift FleetIQ with game server groups, which is in preview release and is subject to change.

          An allowed instance type for your game server group. GameLift FleetIQ periodically evaluates each defined instance type for viability. It then updates the Auto Scaling group with the list of viable instance types.

          • InstanceType (string) --

            An EC2 instance type designation.

          • WeightedCapacity (string) --

            Instance weighting that indicates how much this instance type contributes to the total capacity of a game server group. Instance weights are used by GameLift FleetIQ to calculate the instance type's cost per unit hour and better identify the most cost-effective options. For detailed information on weighting instance capacity, see Instance Weighting in the Amazon EC2 Auto Scaling User Guide. Default value is "1".

      • BalancingStrategy (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. Once triggered, this method remains active until Spot instances can once again be used. Method options include:

        • SPOT_ONLY -- If Spot instances are unavailable, the game server group provides no hosting capacity. No new instances are started, and the existing nonviable Spot instances are terminated (once current gameplay ends) and not replaced.

        • SPOT_PREFERRED -- If Spot instances are unavailable, the game server group continues to provide hosting capacity by using On-Demand instances. Existing nonviable Spot instances are terminated (once current gameplay ends) and replaced with new On-Demand instances.

      • GameServerProtectionPolicy (string) --

        A flag that indicates whether instances in the game server group are protected from early termination. Unprotected instances that have active game servers running may 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 DeleteGameServerGroup). An exception to this is Spot Instances, which may be terminated by AWS regardless of protection status.

      • AutoScalingGroupArn (string) --

        A generated unique ID for the EC2 Auto Scaling group with is associated with this game server group.

      • Status (string) --

        The current status of the game server group. Possible statuses include:

        • NEW - GameLift FleetIQ has validated the CreateGameServerGroup() request.

        • ACTIVATING - GameLift FleetIQ is setting up a game server group, which includes creating an autoscaling group in your AWS account.

        • ACTIVE - The game server group has been successfully created.

        • DELETE_SCHEDULED - A request to delete the game server group has been received.

        • DELETING - GameLift FleetIQ has received a valid DeleteGameServerGroup() request and is processing it. GameLift FleetIQ must first complete and release hosts before it deletes the autoscaling group and the game server group.

        • DELETED - The game server group has been successfully deleted.

        • ERROR - The asynchronous processes of activating or deleting a game server group has failed, resulting in an error state.

      • StatusReason (string) --

        Additional information about the current game server group status. This information may provide additional insight on groups that in ERROR status.

      • SuspendedActions (list) --

        A list of activities that are currently suspended for this game server group. If this property is empty, all activities are occurring.

        • (string) --

      • CreationTime (datetime) --

        A time stamp indicating when this data object was created. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").

      • LastUpdatedTime (datetime) --

        A time stamp indicating when this game server group was last updated.

DescribeGameServerGroup (new) Link ¶

This action is part of Amazon GameLift FleetIQ with game server groups, which is in preview release and is subject to change.

Retrieves information on a game server group.

To get attributes for a game server group, provide a group name or ARN value. If successful, a GameServerGroup object is returned.

Learn more

GameLift FleetIQ Guide

Related operations

  • CreateGameServerGroup

  • ListGameServerGroups

  • DescribeGameServerGroup

  • UpdateGameServerGroup

  • DeleteGameServerGroup

  • ResumeGameServerGroup

  • SuspendGameServerGroup

See also: AWS API Documentation

Request Syntax

client.describe_game_server_group(
    GameServerGroupName='string'
)
type GameServerGroupName:

string

param GameServerGroupName:

[REQUIRED]

The unique identifier for the game server group being requested. Use either the GameServerGroup name or ARN value.

rtype:

dict

returns:

Response Syntax

{
    'GameServerGroup': {
        'GameServerGroupName': 'string',
        'GameServerGroupArn': 'string',
        'RoleArn': 'string',
        'InstanceDefinitions': [
            {
                'InstanceType': 'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'c5.large'|'c5.xlarge'|'c5.2xlarge'|'c5.4xlarge'|'c5.9xlarge'|'c5.12xlarge'|'c5.18xlarge'|'c5.24xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'r5.large'|'r5.xlarge'|'r5.2xlarge'|'r5.4xlarge'|'r5.8xlarge'|'r5.12xlarge'|'r5.16xlarge'|'r5.24xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m5.large'|'m5.xlarge'|'m5.2xlarge'|'m5.4xlarge'|'m5.8xlarge'|'m5.12xlarge'|'m5.16xlarge'|'m5.24xlarge',
                'WeightedCapacity': 'string'
            },
        ],
        'BalancingStrategy': 'SPOT_ONLY'|'SPOT_PREFERRED',
        'GameServerProtectionPolicy': 'NO_PROTECTION'|'FULL_PROTECTION',
        'AutoScalingGroupArn': 'string',
        'Status': 'NEW'|'ACTIVATING'|'ACTIVE'|'DELETE_SCHEDULED'|'DELETING'|'DELETED'|'ERROR',
        'StatusReason': 'string',
        'SuspendedActions': [
            'REPLACE_INSTANCE_TYPES',
        ],
        'CreationTime': datetime(2015, 1, 1),
        'LastUpdatedTime': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    • GameServerGroup (dict) --

      An object that describes the requested game server group resource.

      • GameServerGroupName (string) --

        A developer-defined identifier for the game server group. The name is unique per Region per AWS account.

      • GameServerGroupArn (string) --

        A generated unique ID for the game server group.

      • RoleArn (string) --

        The Amazon Resource Name ( ARN) for an IAM role that allows Amazon GameLift to access your EC2 Auto Scaling groups. The submitted role is validated to ensure that it contains the necessary permissions for game server groups.

      • InstanceDefinitions (list) --

        The set of EC2 instance types that GameLift FleetIQ can use when rebalancing and autoscaling instances in the group.

        • (dict) --

          This data type is part of Amazon GameLift FleetIQ with game server groups, which is in preview release and is subject to change.

          An allowed instance type for your game server group. GameLift FleetIQ periodically evaluates each defined instance type for viability. It then updates the Auto Scaling group with the list of viable instance types.

          • InstanceType (string) --

            An EC2 instance type designation.

          • WeightedCapacity (string) --

            Instance weighting that indicates how much this instance type contributes to the total capacity of a game server group. Instance weights are used by GameLift FleetIQ to calculate the instance type's cost per unit hour and better identify the most cost-effective options. For detailed information on weighting instance capacity, see Instance Weighting in the Amazon EC2 Auto Scaling User Guide. Default value is "1".

      • BalancingStrategy (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. Once triggered, this method remains active until Spot instances can once again be used. Method options include:

        • SPOT_ONLY -- If Spot instances are unavailable, the game server group provides no hosting capacity. No new instances are started, and the existing nonviable Spot instances are terminated (once current gameplay ends) and not replaced.

        • SPOT_PREFERRED -- If Spot instances are unavailable, the game server group continues to provide hosting capacity by using On-Demand instances. Existing nonviable Spot instances are terminated (once current gameplay ends) and replaced with new On-Demand instances.

      • GameServerProtectionPolicy (string) --

        A flag that indicates whether instances in the game server group are protected from early termination. Unprotected instances that have active game servers running may 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 DeleteGameServerGroup). An exception to this is Spot Instances, which may be terminated by AWS regardless of protection status.

      • AutoScalingGroupArn (string) --

        A generated unique ID for the EC2 Auto Scaling group with is associated with this game server group.

      • Status (string) --

        The current status of the game server group. Possible statuses include:

        • NEW - GameLift FleetIQ has validated the CreateGameServerGroup() request.

        • ACTIVATING - GameLift FleetIQ is setting up a game server group, which includes creating an autoscaling group in your AWS account.

        • ACTIVE - The game server group has been successfully created.

        • DELETE_SCHEDULED - A request to delete the game server group has been received.

        • DELETING - GameLift FleetIQ has received a valid DeleteGameServerGroup() request and is processing it. GameLift FleetIQ must first complete and release hosts before it deletes the autoscaling group and the game server group.

        • DELETED - The game server group has been successfully deleted.

        • ERROR - The asynchronous processes of activating or deleting a game server group has failed, resulting in an error state.

      • StatusReason (string) --

        Additional information about the current game server group status. This information may provide additional insight on groups that in ERROR status.

      • SuspendedActions (list) --

        A list of activities that are currently suspended for this game server group. If this property is empty, all activities are occurring.

        • (string) --

      • CreationTime (datetime) --

        A time stamp indicating when this data object was created. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").

      • LastUpdatedTime (datetime) --

        A time stamp indicating when this game server group was last updated.

ListGameServers (new) Link ¶

This action is part of Amazon GameLift FleetIQ with game server groups, which is in preview release and is subject to change.

Retrieves information on all game servers that are currently running in a specified game server group. If there are custom key sort values for your game servers, you can opt to have the returned list sorted based on these values. Use the pagination parameters to retrieve results in a set of sequential pages.

Learn more

GameLift FleetIQ Guide

Related operations

  • RegisterGameServer

  • ListGameServers

  • ClaimGameServer

  • DescribeGameServer

  • UpdateGameServer

  • DeregisterGameServer

See also: AWS API Documentation

Request Syntax

client.list_game_servers(
    GameServerGroupName='string',
    SortOrder='ASCENDING'|'DESCENDING',
    Limit=123,
    NextToken='string'
)
type GameServerGroupName:

string

param GameServerGroupName:

[REQUIRED]

An identifier for the game server group for the game server you want to list. Use either the GameServerGroup name or ARN value.

type SortOrder:

string

param SortOrder:

Indicates how to sort the returned data based on the game servers' custom key sort value. If this parameter is left empty, the list of game servers is returned in no particular order.

type Limit:

integer

param Limit:

The maximum number of results to return. Use this parameter with NextToken to get results as a set of sequential pages.

type NextToken:

string

param NextToken:

A token that indicates the start of the next sequential page of results. Use the token that is returned with a previous call to this action. To start at the beginning of the result set, do not specify a value.

rtype:

dict

returns:

Response Syntax

{
    'GameServers': [
        {
            'GameServerGroupName': 'string',
            'GameServerGroupArn': 'string',
            'GameServerId': 'string',
            'InstanceId': 'string',
            'ConnectionInfo': 'string',
            'GameServerData': 'string',
            'CustomSortKey': 'string',
            'ClaimStatus': 'CLAIMED',
            'UtilizationStatus': 'AVAILABLE'|'UTILIZED',
            'RegistrationTime': datetime(2015, 1, 1),
            'LastClaimTime': datetime(2015, 1, 1),
            'LastHealthCheckTime': datetime(2015, 1, 1)
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • GameServers (list) --

      A collection of game server objects that match the request.

      • (dict) --

        This data type is part of Amazon GameLift FleetIQ with game server groups, which is in preview release and is subject to change.

        Properties describing a game server resource.

        A game server resource is created by a successful call to RegisterGameServer and deleted by calling DeregisterGameServer.

        • GameServerGroupName (string) --

          The name identifier for the game server group where the game server is located.

        • GameServerGroupArn (string) --

          The ARN identifier for the game server group where the game server is located.

        • GameServerId (string) --

          A custom string that uniquely identifies the game server. Game server IDs are developer-defined and are unique across all game server groups in an AWS account.

        • InstanceId (string) --

          The unique identifier for the instance where the game server is located.

        • ConnectionInfo (string) --

          The port and IP address that must be used to establish a client connection to the game server.

        • GameServerData (string) --

          A set of custom game server properties, formatted as a single string value. This data is passed to a game client or service in response to requests ListGameServers or ClaimGameServer. This property can be updated using UpdateGameServer.

        • CustomSortKey (string) --

          A game server tag that can be used to request sorted lists of game servers when calling ListGameServers. Custom sort keys are developer-defined. This property can be updated using UpdateGameServer.

        • ClaimStatus (string) --

          Indicates when an available game server has been reserved but has not yet started hosting a game. Once it is claimed, game server remains in CLAIMED status for a maximum of one minute. During this time, game clients must connect to the game server and start the game, which triggers the game server to update its utilization status. After one minute, the game server claim status reverts to null.

        • UtilizationStatus (string) --

          Indicates whether the game server is currently available for new games or is busy. Possible statuses include:

          • AVAILABLE - The game server is available to be claimed. A game server that has been claimed remains in this status until it reports game hosting activity.

          • IN_USE - The game server is currently hosting a game session with players.

        • RegistrationTime (datetime) --

          Time stamp indicating when the game server resource was created with a RegisterGameServer request. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").

        • LastClaimTime (datetime) --

          Time stamp indicating the last time the game server was claimed with a ClaimGameServer request. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057"). This value is used to calculate when the game server's claim status.

        • LastHealthCheckTime (datetime) --

          Time stamp indicating the last time the game server was updated with health status using an UpdateGameServer request. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057"). After game server registration, this property is only changed when a game server update specifies a health check value.

    • NextToken (string) --

      A token that indicates where to resume retrieving results on the next call to this action. If no token is returned, these results represent the end of the list.

ListGameServerGroups (new) Link ¶

This action is part of Amazon GameLift FleetIQ with game server groups, which is in preview release and is subject to change.

Retrieves information on all game servers groups that exist in the current AWS account for the selected region. Use the pagination parameters to retrieve results in a set of sequential pages.

Learn more

GameLift FleetIQ Guide

Related operations

  • CreateGameServerGroup

  • ListGameServerGroups

  • DescribeGameServerGroup

  • UpdateGameServerGroup

  • DeleteGameServerGroup

  • ResumeGameServerGroup

  • SuspendGameServerGroup

See also: AWS API Documentation

Request Syntax

client.list_game_server_groups(
    Limit=123,
    NextToken='string'
)
type Limit:

integer

param Limit:

The maximum number of results to return. Use this parameter with NextToken to get results as a set of sequential pages.

type NextToken:

string

param NextToken:

A token that indicates the start of the next sequential page of results. Use the token that is returned with a previous call to this action. To start at the beginning of the result set, do not specify a value.

rtype:

dict

returns:

Response Syntax

{
    'GameServerGroups': [
        {
            'GameServerGroupName': 'string',
            'GameServerGroupArn': 'string',
            'RoleArn': 'string',
            'InstanceDefinitions': [
                {
                    'InstanceType': 'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'c5.large'|'c5.xlarge'|'c5.2xlarge'|'c5.4xlarge'|'c5.9xlarge'|'c5.12xlarge'|'c5.18xlarge'|'c5.24xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'r5.large'|'r5.xlarge'|'r5.2xlarge'|'r5.4xlarge'|'r5.8xlarge'|'r5.12xlarge'|'r5.16xlarge'|'r5.24xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m5.large'|'m5.xlarge'|'m5.2xlarge'|'m5.4xlarge'|'m5.8xlarge'|'m5.12xlarge'|'m5.16xlarge'|'m5.24xlarge',
                    'WeightedCapacity': 'string'
                },
            ],
            'BalancingStrategy': 'SPOT_ONLY'|'SPOT_PREFERRED',
            'GameServerProtectionPolicy': 'NO_PROTECTION'|'FULL_PROTECTION',
            'AutoScalingGroupArn': 'string',
            'Status': 'NEW'|'ACTIVATING'|'ACTIVE'|'DELETE_SCHEDULED'|'DELETING'|'DELETED'|'ERROR',
            'StatusReason': 'string',
            'SuspendedActions': [
                'REPLACE_INSTANCE_TYPES',
            ],
            'CreationTime': datetime(2015, 1, 1),
            'LastUpdatedTime': datetime(2015, 1, 1)
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • GameServerGroups (list) --

      A collection of game server group objects that match the request.

      • (dict) --

        This data type is part of Amazon GameLift FleetIQ with game server groups, which is in preview release and is subject to change.

        Properties describing a game server group resource. A game server group manages certain properties of a corresponding EC2 Auto Scaling group.

        A game server group is created by a successful call to CreateGameServerGroup and deleted by calling DeleteGameServerGroup. Game server group activity can be temporarily suspended and resumed by calling SuspendGameServerGroup and ResumeGameServerGroup.

        • GameServerGroupName (string) --

          A developer-defined identifier for the game server group. The name is unique per Region per AWS account.

        • GameServerGroupArn (string) --

          A generated unique ID for the game server group.

        • RoleArn (string) --

          The Amazon Resource Name ( ARN) for an IAM role that allows Amazon GameLift to access your EC2 Auto Scaling groups. The submitted role is validated to ensure that it contains the necessary permissions for game server groups.

        • InstanceDefinitions (list) --

          The set of EC2 instance types that GameLift FleetIQ can use when rebalancing and autoscaling instances in the group.

          • (dict) --

            This data type is part of Amazon GameLift FleetIQ with game server groups, which is in preview release and is subject to change.

            An allowed instance type for your game server group. GameLift FleetIQ periodically evaluates each defined instance type for viability. It then updates the Auto Scaling group with the list of viable instance types.

            • InstanceType (string) --

              An EC2 instance type designation.

            • WeightedCapacity (string) --

              Instance weighting that indicates how much this instance type contributes to the total capacity of a game server group. Instance weights are used by GameLift FleetIQ to calculate the instance type's cost per unit hour and better identify the most cost-effective options. For detailed information on weighting instance capacity, see Instance Weighting in the Amazon EC2 Auto Scaling User Guide. Default value is "1".

        • BalancingStrategy (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. Once triggered, this method remains active until Spot instances can once again be used. Method options include:

          • SPOT_ONLY -- If Spot instances are unavailable, the game server group provides no hosting capacity. No new instances are started, and the existing nonviable Spot instances are terminated (once current gameplay ends) and not replaced.

          • SPOT_PREFERRED -- If Spot instances are unavailable, the game server group continues to provide hosting capacity by using On-Demand instances. Existing nonviable Spot instances are terminated (once current gameplay ends) and replaced with new On-Demand instances.

        • GameServerProtectionPolicy (string) --

          A flag that indicates whether instances in the game server group are protected from early termination. Unprotected instances that have active game servers running may 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 DeleteGameServerGroup). An exception to this is Spot Instances, which may be terminated by AWS regardless of protection status.

        • AutoScalingGroupArn (string) --

          A generated unique ID for the EC2 Auto Scaling group with is associated with this game server group.

        • Status (string) --

          The current status of the game server group. Possible statuses include:

          • NEW - GameLift FleetIQ has validated the CreateGameServerGroup() request.

          • ACTIVATING - GameLift FleetIQ is setting up a game server group, which includes creating an autoscaling group in your AWS account.

          • ACTIVE - The game server group has been successfully created.

          • DELETE_SCHEDULED - A request to delete the game server group has been received.

          • DELETING - GameLift FleetIQ has received a valid DeleteGameServerGroup() request and is processing it. GameLift FleetIQ must first complete and release hosts before it deletes the autoscaling group and the game server group.

          • DELETED - The game server group has been successfully deleted.

          • ERROR - The asynchronous processes of activating or deleting a game server group has failed, resulting in an error state.

        • StatusReason (string) --

          Additional information about the current game server group status. This information may provide additional insight on groups that in ERROR status.

        • SuspendedActions (list) --

          A list of activities that are currently suspended for this game server group. If this property is empty, all activities are occurring.

          • (string) --

        • CreationTime (datetime) --

          A time stamp indicating when this data object was created. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").

        • LastUpdatedTime (datetime) --

          A time stamp indicating when this game server group was last updated.

    • NextToken (string) --

      A token that indicates where to resume retrieving results on the next call to this action. If no token is returned, these results represent the end of the list.

DeregisterGameServer (new) Link ¶

This action is part of Amazon GameLift FleetIQ with game server groups, which is in preview release and is subject to change.

Removes the game server resource from the game server group. As a result of this action, the de-registered game server can no longer be claimed and will not returned in a list of active game servers.

To de-register a game server, specify the game server group and game server ID. If successful, this action emits a CloudWatch event with termination time stamp and reason.

Learn more

GameLift FleetIQ Guide

Related operations

  • RegisterGameServer

  • ListGameServers

  • ClaimGameServer

  • DescribeGameServer

  • UpdateGameServer

  • DeregisterGameServer

See also: AWS API Documentation

Request Syntax

client.deregister_game_server(
    GameServerGroupName='string',
    GameServerId='string'
)
type GameServerGroupName:

string

param GameServerGroupName:

[REQUIRED]

An identifier for the game server group where the game server to be de-registered is running. Use either the GameServerGroup name or ARN value.

type GameServerId:

string

param GameServerId:

[REQUIRED]

The identifier for the game server to be de-registered.

returns:

None

DescribeGameServer (new) Link ¶

This action is part of Amazon GameLift FleetIQ with game server groups, which is in preview release and is subject to change.

Retrieves information for a game server resource. Information includes the game server statuses, health check info, and the instance the game server is running on.

To retrieve game server information, specify the game server ID. If successful, the requested game server object is returned.

Learn more

GameLift FleetIQ Guide

Related operations

  • RegisterGameServer

  • ListGameServers

  • ClaimGameServer

  • DescribeGameServer

  • UpdateGameServer

  • DeregisterGameServer

See also: AWS API Documentation

Request Syntax

client.describe_game_server(
    GameServerGroupName='string',
    GameServerId='string'
)
type GameServerGroupName:

string

param GameServerGroupName:

[REQUIRED]

An identifier for the game server group where the game server is running. Use either the GameServerGroup name or ARN value.

type GameServerId:

string

param GameServerId:

[REQUIRED]

The identifier for the game server to be retrieved.

rtype:

dict

returns:

Response Syntax

{
    'GameServer': {
        'GameServerGroupName': 'string',
        'GameServerGroupArn': 'string',
        'GameServerId': 'string',
        'InstanceId': 'string',
        'ConnectionInfo': 'string',
        'GameServerData': 'string',
        'CustomSortKey': 'string',
        'ClaimStatus': 'CLAIMED',
        'UtilizationStatus': 'AVAILABLE'|'UTILIZED',
        'RegistrationTime': datetime(2015, 1, 1),
        'LastClaimTime': datetime(2015, 1, 1),
        'LastHealthCheckTime': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    • GameServer (dict) --

      Object that describes the requested game server resource.

      • GameServerGroupName (string) --

        The name identifier for the game server group where the game server is located.

      • GameServerGroupArn (string) --

        The ARN identifier for the game server group where the game server is located.

      • GameServerId (string) --

        A custom string that uniquely identifies the game server. Game server IDs are developer-defined and are unique across all game server groups in an AWS account.

      • InstanceId (string) --

        The unique identifier for the instance where the game server is located.

      • ConnectionInfo (string) --

        The port and IP address that must be used to establish a client connection to the game server.

      • GameServerData (string) --

        A set of custom game server properties, formatted as a single string value. This data is passed to a game client or service in response to requests ListGameServers or ClaimGameServer. This property can be updated using UpdateGameServer.

      • CustomSortKey (string) --

        A game server tag that can be used to request sorted lists of game servers when calling ListGameServers. Custom sort keys are developer-defined. This property can be updated using UpdateGameServer.

      • ClaimStatus (string) --

        Indicates when an available game server has been reserved but has not yet started hosting a game. Once it is claimed, game server remains in CLAIMED status for a maximum of one minute. During this time, game clients must connect to the game server and start the game, which triggers the game server to update its utilization status. After one minute, the game server claim status reverts to null.

      • UtilizationStatus (string) --

        Indicates whether the game server is currently available for new games or is busy. Possible statuses include:

        • AVAILABLE - The game server is available to be claimed. A game server that has been claimed remains in this status until it reports game hosting activity.

        • IN_USE - The game server is currently hosting a game session with players.

      • RegistrationTime (datetime) --

        Time stamp indicating when the game server resource was created with a RegisterGameServer request. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").

      • LastClaimTime (datetime) --

        Time stamp indicating the last time the game server was claimed with a ClaimGameServer request. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057"). This value is used to calculate when the game server's claim status.

      • LastHealthCheckTime (datetime) --

        Time stamp indicating the last time the game server was updated with health status using an UpdateGameServer request. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057"). After game server registration, this property is only changed when a game server update specifies a health check value.

ClaimGameServer (new) Link ¶

This action is part of Amazon GameLift FleetIQ with game server groups, which is in preview release and is subject to change.

Locates an available game server and temporarily reserves it to host gameplay and players. This action is called by a game client or client service (such as a matchmaker) to request hosting resources for a new game session. In response, GameLift FleetIQ searches for an available game server in the specified game server group, places the game server in "claimed" status for 60 seconds, and returns connection information back to the requester so that players can connect to the game server.

There are two ways you can claim a game server. For the first option, you provide a game server group ID only, which prompts GameLift FleetIQ to search for an available game server in the specified group and claim it. With this option, GameLift FleetIQ attempts to consolidate gameplay on as few instances as possible to minimize hosting costs. For the second option, you request a specific game server by its ID. This option results in a less efficient claiming process because it does not take advantage of consolidation and may fail if the requested game server is unavailable.

To claim a game server, identify a game server group and (optionally) a game server ID. If your game requires that game data be provided to the game server at the start of a game, such as a game map or player information, you can provide it in your claim request.

When a game server is successfully claimed, connection information is returned. A claimed game server's utilization status remains AVAILABLE, while the claim status is set to CLAIMED for up to 60 seconds. This time period allows the game server to be prompted to update its status to UTILIZED (using UpdateGameServer). If the game server's status is not updated within 60 seconds, the game server reverts to unclaimed status and is available to be claimed by another request.

If you try to claim a specific game server, this request will fail in the following cases: (1) if the game server utilization status is UTILIZED, (2) if the game server claim status is CLAIMED, or (3) if the instance that the game server is running on is flagged as draining.

Learn more

GameLift FleetIQ Guide

Related operations

  • RegisterGameServer

  • ListGameServers

  • ClaimGameServer

  • DescribeGameServer

  • UpdateGameServer

  • DeregisterGameServer

See also: AWS API Documentation

Request Syntax

client.claim_game_server(
    GameServerGroupName='string',
    GameServerId='string',
    GameServerData='string'
)
type GameServerGroupName:

string

param GameServerGroupName:

[REQUIRED]

An identifier for the game server group. When claiming a specific game server, this is the game server group whether the game server is located. When requesting that GameLift FleetIQ locate an available game server, this is the game server group to search on. You can use either the GameServerGroup name or ARN value.

type GameServerId:

string

param GameServerId:

A custom string that uniquely identifies the game server to claim. If this parameter is left empty, GameLift FleetIQ searches for an available game server in the specified game server group.

type GameServerData:

string

param GameServerData:

A set of custom game server properties, formatted as a single string value, to be passed to the claimed game server.

rtype:

dict

returns:

Response Syntax

{
    'GameServer': {
        'GameServerGroupName': 'string',
        'GameServerGroupArn': 'string',
        'GameServerId': 'string',
        'InstanceId': 'string',
        'ConnectionInfo': 'string',
        'GameServerData': 'string',
        'CustomSortKey': 'string',
        'ClaimStatus': 'CLAIMED',
        'UtilizationStatus': 'AVAILABLE'|'UTILIZED',
        'RegistrationTime': datetime(2015, 1, 1),
        'LastClaimTime': datetime(2015, 1, 1),
        'LastHealthCheckTime': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    • GameServer (dict) --

      Object that describes the newly claimed game server resource.

      • GameServerGroupName (string) --

        The name identifier for the game server group where the game server is located.

      • GameServerGroupArn (string) --

        The ARN identifier for the game server group where the game server is located.

      • GameServerId (string) --

        A custom string that uniquely identifies the game server. Game server IDs are developer-defined and are unique across all game server groups in an AWS account.

      • InstanceId (string) --

        The unique identifier for the instance where the game server is located.

      • ConnectionInfo (string) --

        The port and IP address that must be used to establish a client connection to the game server.

      • GameServerData (string) --

        A set of custom game server properties, formatted as a single string value. This data is passed to a game client or service in response to requests ListGameServers or ClaimGameServer. This property can be updated using UpdateGameServer.

      • CustomSortKey (string) --

        A game server tag that can be used to request sorted lists of game servers when calling ListGameServers. Custom sort keys are developer-defined. This property can be updated using UpdateGameServer.

      • ClaimStatus (string) --

        Indicates when an available game server has been reserved but has not yet started hosting a game. Once it is claimed, game server remains in CLAIMED status for a maximum of one minute. During this time, game clients must connect to the game server and start the game, which triggers the game server to update its utilization status. After one minute, the game server claim status reverts to null.

      • UtilizationStatus (string) --

        Indicates whether the game server is currently available for new games or is busy. Possible statuses include:

        • AVAILABLE - The game server is available to be claimed. A game server that has been claimed remains in this status until it reports game hosting activity.

        • IN_USE - The game server is currently hosting a game session with players.

      • RegistrationTime (datetime) --

        Time stamp indicating when the game server resource was created with a RegisterGameServer request. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").

      • LastClaimTime (datetime) --

        Time stamp indicating the last time the game server was claimed with a ClaimGameServer request. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057"). This value is used to calculate when the game server's claim status.

      • LastHealthCheckTime (datetime) --

        Time stamp indicating the last time the game server was updated with health status using an UpdateGameServer request. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057"). After game server registration, this property is only changed when a game server update specifies a health check value.

RegisterGameServer (new) Link ¶

This action is part of Amazon GameLift FleetIQ with game server groups, which is in preview release and is subject to change.

Creates a new game server resource and notifies GameLift FleetIQ that the game server is ready to host gameplay and players. This action is called by a game server process that is running on an instance in a game server group. Registering game servers enables GameLift FleetIQ to track available game servers and enables game clients and services to claim a game server for a new game session.

To register a game server, identify the game server group and instance where the game server is running, and provide a unique identifier for the game server. You can also include connection and game server data; when a game client or service requests a game server by calling ClaimGameServer, this information is returned in response.

Once a game server is successfully registered, it is put in status AVAILABLE. A request to register a game server may fail if the instance it is in the process of shutting down as part of instance rebalancing or scale-down activity.

Learn more

GameLift FleetIQ Guide

Related operations

  • RegisterGameServer

  • ListGameServers

  • ClaimGameServer

  • DescribeGameServer

  • UpdateGameServer

  • DeregisterGameServer

See also: AWS API Documentation

Request Syntax

client.register_game_server(
    GameServerGroupName='string',
    GameServerId='string',
    InstanceId='string',
    ConnectionInfo='string',
    GameServerData='string',
    CustomSortKey='string',
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
type GameServerGroupName:

string

param GameServerGroupName:

[REQUIRED]

An identifier for the game server group where the game server is running. You can use either the GameServerGroup name or ARN value.

type GameServerId:

string

param GameServerId:

[REQUIRED]

A custom string that uniquely identifies the new game server. Game server IDs are developer-defined and must be unique across all game server groups in your AWS account.

type InstanceId:

string

param InstanceId:

[REQUIRED]

The unique identifier for the instance where the game server is running. This ID is available in the instance metadata.

type ConnectionInfo:

string

param ConnectionInfo:

Information needed to make inbound client connections to the game server. This might include IP address and port, DNS name, etc.

type GameServerData:

string

param GameServerData:

A set of custom game server properties, formatted as a single string value. This data is passed to a game client or service when it requests information on a game servers using ListGameServers or ClaimGameServer.

type CustomSortKey:

string

param CustomSortKey:

A game server tag that can be used to request sorted lists of game servers using ListGameServers. Custom sort keys are developer-defined based on how you want to organize the retrieved game server information.

type Tags:

list

param Tags:

A list of labels to assign to the new game server resource. Tags are developer-defined key-value pairs. Tagging AWS resources are 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. The maximum tag limit may be lower than stated. See the AWS General Reference for actual tagging limits.

  • (dict) --

    A label that can be assigned to a GameLift resource.

    Learn more

    Tagging AWS Resources in the AWS General Reference

    AWS Tagging Strategies

    Related operations

    • TagResource

    • UntagResource

    • ListTagsForResource

    • Key (string) -- [REQUIRED]

      The key for a developer-defined key:value pair for tagging an AWS resource.

    • Value (string) -- [REQUIRED]

      The value for a developer-defined key:value pair for tagging an AWS resource.

rtype:

dict

returns:

Response Syntax

{
    'GameServer': {
        'GameServerGroupName': 'string',
        'GameServerGroupArn': 'string',
        'GameServerId': 'string',
        'InstanceId': 'string',
        'ConnectionInfo': 'string',
        'GameServerData': 'string',
        'CustomSortKey': 'string',
        'ClaimStatus': 'CLAIMED',
        'UtilizationStatus': 'AVAILABLE'|'UTILIZED',
        'RegistrationTime': datetime(2015, 1, 1),
        'LastClaimTime': datetime(2015, 1, 1),
        'LastHealthCheckTime': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    • GameServer (dict) --

      Object that describes the newly created game server resource.

      • GameServerGroupName (string) --

        The name identifier for the game server group where the game server is located.

      • GameServerGroupArn (string) --

        The ARN identifier for the game server group where the game server is located.

      • GameServerId (string) --

        A custom string that uniquely identifies the game server. Game server IDs are developer-defined and are unique across all game server groups in an AWS account.

      • InstanceId (string) --

        The unique identifier for the instance where the game server is located.

      • ConnectionInfo (string) --

        The port and IP address that must be used to establish a client connection to the game server.

      • GameServerData (string) --

        A set of custom game server properties, formatted as a single string value. This data is passed to a game client or service in response to requests ListGameServers or ClaimGameServer. This property can be updated using UpdateGameServer.

      • CustomSortKey (string) --

        A game server tag that can be used to request sorted lists of game servers when calling ListGameServers. Custom sort keys are developer-defined. This property can be updated using UpdateGameServer.

      • ClaimStatus (string) --

        Indicates when an available game server has been reserved but has not yet started hosting a game. Once it is claimed, game server remains in CLAIMED status for a maximum of one minute. During this time, game clients must connect to the game server and start the game, which triggers the game server to update its utilization status. After one minute, the game server claim status reverts to null.

      • UtilizationStatus (string) --

        Indicates whether the game server is currently available for new games or is busy. Possible statuses include:

        • AVAILABLE - The game server is available to be claimed. A game server that has been claimed remains in this status until it reports game hosting activity.

        • IN_USE - The game server is currently hosting a game session with players.

      • RegistrationTime (datetime) --

        Time stamp indicating when the game server resource was created with a RegisterGameServer request. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").

      • LastClaimTime (datetime) --

        Time stamp indicating the last time the game server was claimed with a ClaimGameServer request. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057"). This value is used to calculate when the game server's claim status.

      • LastHealthCheckTime (datetime) --

        Time stamp indicating the last time the game server was updated with health status using an UpdateGameServer request. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057"). After game server registration, this property is only changed when a game server update specifies a health check value.

UpdateGameServer (new) Link ¶

This action is part of Amazon GameLift FleetIQ with game server groups, which is in preview release and is subject to change.

Updates information about a registered game server. This action is called by a game server process that is running on an instance in a game server group. There are three reasons to update game server information: (1) to change the utilization status of the game server, (2) to report game server health status, and (3) to change game server metadata. A registered game server should regularly report health and should update utilization status when it is supporting gameplay so that GameLift FleetIQ can accurately track game server availability. You can make all three types of updates in the same request.

  • To update the game server's utilization status, identify the game server and game server group and specify the current utilization status. Use this status to identify when game servers are currently hosting games and when they are available to be claimed.

  • To report health status, identify the game server and game server group and set health check to HEALTHY. If a game server does not report health status for a certain length of time, the game server is no longer considered healthy and will be eventually de-registered from the game server group to avoid affecting utilization metrics. The best practice is to report health every 60 seconds.

  • To change game server metadata, provide updated game server data and custom sort key values.

Once a game server is successfully updated, the relevant statuses and timestamps are updated.

Learn more

GameLift FleetIQ Guide

Related operations

  • RegisterGameServer

  • ListGameServers

  • ClaimGameServer

  • DescribeGameServer

  • UpdateGameServer

  • DeregisterGameServer

See also: AWS API Documentation

Request Syntax

client.update_game_server(
    GameServerGroupName='string',
    GameServerId='string',
    GameServerData='string',
    CustomSortKey='string',
    UtilizationStatus='AVAILABLE'|'UTILIZED',
    HealthCheck='HEALTHY'
)
type GameServerGroupName:

string

param GameServerGroupName:

[REQUIRED]

An identifier for the game server group where the game server is running. Use either the GameServerGroup name or ARN value.

type GameServerId:

string

param GameServerId:

[REQUIRED]

The identifier for the game server to be updated.

type GameServerData:

string

param GameServerData:

A set of custom game server properties, formatted as a single string value. This data is passed to a game client or service when it requests information on a game servers using DescribeGameServer or ClaimGameServer.

type CustomSortKey:

string

param CustomSortKey:

A game server tag that can be used to request sorted lists of game servers using ListGameServers. Custom sort keys are developer-defined based on how you want to organize the retrieved game server information.

type UtilizationStatus:

string

param UtilizationStatus:

Indicates whether the game server is available or is currently hosting gameplay.

type HealthCheck:

string

param HealthCheck:

Indicates health status of the game server. An update that explicitly includes this parameter updates the game server's LastHealthCheckTime time stamp.

rtype:

dict

returns:

Response Syntax

{
    'GameServer': {
        'GameServerGroupName': 'string',
        'GameServerGroupArn': 'string',
        'GameServerId': 'string',
        'InstanceId': 'string',
        'ConnectionInfo': 'string',
        'GameServerData': 'string',
        'CustomSortKey': 'string',
        'ClaimStatus': 'CLAIMED',
        'UtilizationStatus': 'AVAILABLE'|'UTILIZED',
        'RegistrationTime': datetime(2015, 1, 1),
        'LastClaimTime': datetime(2015, 1, 1),
        'LastHealthCheckTime': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    • GameServer (dict) --

      Object that describes the newly updated game server resource.

      • GameServerGroupName (string) --

        The name identifier for the game server group where the game server is located.

      • GameServerGroupArn (string) --

        The ARN identifier for the game server group where the game server is located.

      • GameServerId (string) --

        A custom string that uniquely identifies the game server. Game server IDs are developer-defined and are unique across all game server groups in an AWS account.

      • InstanceId (string) --

        The unique identifier for the instance where the game server is located.

      • ConnectionInfo (string) --

        The port and IP address that must be used to establish a client connection to the game server.

      • GameServerData (string) --

        A set of custom game server properties, formatted as a single string value. This data is passed to a game client or service in response to requests ListGameServers or ClaimGameServer. This property can be updated using UpdateGameServer.

      • CustomSortKey (string) --

        A game server tag that can be used to request sorted lists of game servers when calling ListGameServers. Custom sort keys are developer-defined. This property can be updated using UpdateGameServer.

      • ClaimStatus (string) --

        Indicates when an available game server has been reserved but has not yet started hosting a game. Once it is claimed, game server remains in CLAIMED status for a maximum of one minute. During this time, game clients must connect to the game server and start the game, which triggers the game server to update its utilization status. After one minute, the game server claim status reverts to null.

      • UtilizationStatus (string) --

        Indicates whether the game server is currently available for new games or is busy. Possible statuses include:

        • AVAILABLE - The game server is available to be claimed. A game server that has been claimed remains in this status until it reports game hosting activity.

        • IN_USE - The game server is currently hosting a game session with players.

      • RegistrationTime (datetime) --

        Time stamp indicating when the game server resource was created with a RegisterGameServer request. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").

      • LastClaimTime (datetime) --

        Time stamp indicating the last time the game server was claimed with a ClaimGameServer request. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057"). This value is used to calculate when the game server's claim status.

      • LastHealthCheckTime (datetime) --

        Time stamp indicating the last time the game server was updated with health status using an UpdateGameServer request. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057"). After game server registration, this property is only changed when a game server update specifies a health check value.