Amazon GameLift

2017/02/22 - Amazon GameLift - 7 new 12 updated api methods

Changes  Allow developers to configure global queues for creating GameSessions. Allow PlayerData on PlayerSessions to store player-specific data.

DescribeGameSessionQueues (new) Link ¶

Retrieves the properties for one or more game session queues. When requesting multiple queues, use the pagination parameters to retrieve results as a set of sequential pages. If successful, a GameSessionQueue object is returned for each requested queue. When specifying a list of queues, objects are returned only for queues that currently exist in the region.

See also: AWS API Documentation

Request Syntax

client.describe_game_session_queues(
    Names=[
        'string',
    ],
    Limit=123,
    NextToken='string'
)
type Names

list

param Names

List of queue names to retrieve information for. To request settings for all queues, leave this parameter empty.

  • (string) --

type Limit

integer

param Limit

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

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 specify the start of the result set, do not specify a value.

rtype

dict

returns

Response Syntax

{
    'GameSessionQueues': [
        {
            'Name': 'string',
            'TimeoutInSeconds': 123,
            'Destinations': [
                {
                    'DestinationArn': 'string'
                },
            ]
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • GameSessionQueues (list) --

      Collection of objects that describes the requested game session queues.

      • (dict) --

        Configuration of a queue used to process game session placement requests. The queue configuration identifies the fleets that new game session can be placed on, given available resources, and the length of time a request can remain in the queue waiting for placement.

        Queue-related operations include:

        • CreateGameSessionQueue

        • DescribeGameSessionQueues

        • UpdateGameSessionQueue

        • DeleteGameSessionQueue

        • Name (string) --

          Descriptive label that is associated with queue. Queue names must be unique within each region.

        • TimeoutInSeconds (integer) --

          Maximum time, in seconds, that a new game session placement request remains in the queue. When a request exceeds this time, the game session placement changes to a TIMED_OUT status.

        • Destinations (list) --

          List of fleets that can be used to fulfill game session placement requests in the queue. Fleets are identified by either a fleet ARN or a fleet alias ARN. Destinations are listed in default preference order.

          • (dict) --

            Fleet designated in a game session queue. Requests for new game sessions in the queue are fulfilled by starting a new game session on any destination listed for a queue.

            • DestinationArn (string) --

              Amazon Resource Name (ARN) assigned to fleet or fleet alias. ARNs, which include a fleet ID or alias ID and a region name, provide a unique identifier across all regions.

    • NextToken (string) --

      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.

DeleteGameSessionQueue (new) Link ¶

Deletes a game session queue. This action means that any StartGameSessionPlacement requests that reference this queue will fail. To delete a queue, specify the queue name.

See also: AWS API Documentation

Request Syntax

client.delete_game_session_queue(
    Name='string'
)
type Name

string

param Name

[REQUIRED]

Descriptive label that is associated with queue. Queue names must be unique within each region.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

CreateGameSessionQueue (new) Link ¶

Establishes a new queue for processing requests for new game sessions. A queue identifies where new game sessions can be hosted--by specifying a list of fleet destinations--and how long a request can remain in the queue waiting to be placed before timing out. Requests for new game sessions are added to a queue by calling StartGameSessionPlacement and referencing the queue name.

When processing a request for a game session, Amazon GameLift tries each destination in order until it finds one with available resources to host the new game session. A queue's default order is determined by how destinations are listed. This default order can be overridden in a game session placement request.

To create a new queue, provide a name, timeout value, and a list of destinations. If successful, a new queue object is returned.

See also: AWS API Documentation

Request Syntax

client.create_game_session_queue(
    Name='string',
    TimeoutInSeconds=123,
    Destinations=[
        {
            'DestinationArn': 'string'
        },
    ]
)
type Name

string

param Name

[REQUIRED]

Descriptive label that is associated with queue. Queue names must be unique within each region.

type TimeoutInSeconds

integer

param TimeoutInSeconds

Maximum time, in seconds, that a new game session placement request remains in the queue. When a request exceeds this time, the game session placement changes to a TIMED_OUT status.

type Destinations

list

param Destinations

List of fleets that can be used to fulfill game session placement requests in the queue. Fleets are identified by either a fleet ARN or a fleet alias ARN. Destinations are listed in default preference order.

  • (dict) --

    Fleet designated in a game session queue. Requests for new game sessions in the queue are fulfilled by starting a new game session on any destination listed for a queue.

    • DestinationArn (string) --

      Amazon Resource Name (ARN) assigned to fleet or fleet alias. ARNs, which include a fleet ID or alias ID and a region name, provide a unique identifier across all regions.

rtype

dict

returns

Response Syntax

{
    'GameSessionQueue': {
        'Name': 'string',
        'TimeoutInSeconds': 123,
        'Destinations': [
            {
                'DestinationArn': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) --

    • GameSessionQueue (dict) --

      Object that describes the newly created game session queue.

      • Name (string) --

        Descriptive label that is associated with queue. Queue names must be unique within each region.

      • TimeoutInSeconds (integer) --

        Maximum time, in seconds, that a new game session placement request remains in the queue. When a request exceeds this time, the game session placement changes to a TIMED_OUT status.

      • Destinations (list) --

        List of fleets that can be used to fulfill game session placement requests in the queue. Fleets are identified by either a fleet ARN or a fleet alias ARN. Destinations are listed in default preference order.

        • (dict) --

          Fleet designated in a game session queue. Requests for new game sessions in the queue are fulfilled by starting a new game session on any destination listed for a queue.

          • DestinationArn (string) --

            Amazon Resource Name (ARN) assigned to fleet or fleet alias. ARNs, which include a fleet ID or alias ID and a region name, provide a unique identifier across all regions.

DescribeGameSessionPlacement (new) Link ¶

Retrieves properties and current status of a game session placement request. To get game session placement details, specify the placement ID. If successful, a GameSessionPlacement object is returned.

See also: AWS API Documentation

Request Syntax

client.describe_game_session_placement(
    PlacementId='string'
)
type PlacementId

string

param PlacementId

[REQUIRED]

Unique identifier for a game session placement to retrieve.

rtype

dict

returns

Response Syntax

{
    'GameSessionPlacement': {
        'PlacementId': 'string',
        'GameSessionQueueName': 'string',
        'Status': 'PENDING'|'FULFILLED'|'CANCELLED'|'TIMED_OUT',
        'GameProperties': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ],
        'MaximumPlayerSessionCount': 123,
        'GameSessionName': 'string',
        'GameSessionArn': 'string',
        'GameSessionRegion': 'string',
        'PlayerLatencies': [
            {
                'PlayerId': 'string',
                'RegionIdentifier': 'string',
                'LatencyInMilliseconds': ...
            },
        ],
        'StartTime': datetime(2015, 1, 1),
        'EndTime': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    • GameSessionPlacement (dict) --

      Object that describes the requested game session placement.

      • PlacementId (string) --

        Unique identifier for a game session placement.

      • GameSessionQueueName (string) --

        Descriptive label that is associated with queue. Queue names must be unique within each region.

      • Status (string) --

        Current status of the game session placement request.

        • PENDING – The placement request is currently in the queue waiting to be processed.

        • FULFILLED – A new game session and player sessions (if requested) have been successfully created. Values for GameSessionArn and GameSessionRegion are available.

        • CANCELLED – The placement request was cancelled with a call to StopGameSessionPlacement.

        • TIMED_OUT – A new game session was not successfully created before the time limit expired. You can resubmit the placement request as needed.

      • GameProperties (list) --

        Set of developer-defined properties for a game session. These properties are passed to the server process hosting the game session.

        • (dict) --

          Set of key-value pairs containing information a server process requires to set up a game session. This object allows you to pass in any set of data needed for your game. For more information, see the Amazon GameLift Developer Guide.

          • Key (string) --

            TBD

          • Value (string) --

            TBD

      • MaximumPlayerSessionCount (integer) --

        Maximum number of players that can be connected simultaneously to the game session.

      • GameSessionName (string) --

        Descriptive label that is associated with a game session. Session names do not need to be unique.

      • GameSessionArn (string) --

        Identifier for the game session created by this placement request. This value exists only if the game session placement status is Completed. This identifier is unique across all regions.

      • GameSessionRegion (string) --

        Name of the region where the game session created by this placement request is running. This value exists only if the game session placement status is Completed.

      • PlayerLatencies (list) --

        Set of values, expressed in milliseconds, indicating the amount of latency that players experience when connected to AWS regions.

        • (dict) --

          Regional latency information for a player, used when requesting a new game session with StartGameSessionPlacement. This value indicates the amount of time lag that exists when the player is connected to a fleet in the specified region. The relative difference between a player's latency values for multiple regions are used to determine which fleets are best suited to place a new game session for the player.

          • PlayerId (string) --

            Unique identifier for a player associated with the latency data.

          • RegionIdentifier (string) --

            Name of the region that is associated with the latency value.

          • LatencyInMilliseconds (float) --

            Amount of time that represents the time lag experienced by the player when connected to the specified region.

      • StartTime (datetime) --

        Time stamp indicating when this request was placed in the queue. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").

      • EndTime (datetime) --

        Time stamp indicating when this request was completed, cancelled, or timed out.

StopGameSessionPlacement (new) Link ¶

Cancels a game session placement that is in Pending status. To stop a placement, provide the placement ID values. If successful, the placement is moved to Cancelled status.

See also: AWS API Documentation

Request Syntax

client.stop_game_session_placement(
    PlacementId='string'
)
type PlacementId

string

param PlacementId

[REQUIRED]

Unique identifier for a game session placement to cancel.

rtype

dict

returns

Response Syntax

{
    'GameSessionPlacement': {
        'PlacementId': 'string',
        'GameSessionQueueName': 'string',
        'Status': 'PENDING'|'FULFILLED'|'CANCELLED'|'TIMED_OUT',
        'GameProperties': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ],
        'MaximumPlayerSessionCount': 123,
        'GameSessionName': 'string',
        'GameSessionArn': 'string',
        'GameSessionRegion': 'string',
        'PlayerLatencies': [
            {
                'PlayerId': 'string',
                'RegionIdentifier': 'string',
                'LatencyInMilliseconds': ...
            },
        ],
        'StartTime': datetime(2015, 1, 1),
        'EndTime': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    • GameSessionPlacement (dict) --

      Object that describes the cancelled game session placement, with cancelled status and an end time stamp.

      • PlacementId (string) --

        Unique identifier for a game session placement.

      • GameSessionQueueName (string) --

        Descriptive label that is associated with queue. Queue names must be unique within each region.

      • Status (string) --

        Current status of the game session placement request.

        • PENDING – The placement request is currently in the queue waiting to be processed.

        • FULFILLED – A new game session and player sessions (if requested) have been successfully created. Values for GameSessionArn and GameSessionRegion are available.

        • CANCELLED – The placement request was cancelled with a call to StopGameSessionPlacement.

        • TIMED_OUT – A new game session was not successfully created before the time limit expired. You can resubmit the placement request as needed.

      • GameProperties (list) --

        Set of developer-defined properties for a game session. These properties are passed to the server process hosting the game session.

        • (dict) --

          Set of key-value pairs containing information a server process requires to set up a game session. This object allows you to pass in any set of data needed for your game. For more information, see the Amazon GameLift Developer Guide.

          • Key (string) --

            TBD

          • Value (string) --

            TBD

      • MaximumPlayerSessionCount (integer) --

        Maximum number of players that can be connected simultaneously to the game session.

      • GameSessionName (string) --

        Descriptive label that is associated with a game session. Session names do not need to be unique.

      • GameSessionArn (string) --

        Identifier for the game session created by this placement request. This value exists only if the game session placement status is Completed. This identifier is unique across all regions.

      • GameSessionRegion (string) --

        Name of the region where the game session created by this placement request is running. This value exists only if the game session placement status is Completed.

      • PlayerLatencies (list) --

        Set of values, expressed in milliseconds, indicating the amount of latency that players experience when connected to AWS regions.

        • (dict) --

          Regional latency information for a player, used when requesting a new game session with StartGameSessionPlacement. This value indicates the amount of time lag that exists when the player is connected to a fleet in the specified region. The relative difference between a player's latency values for multiple regions are used to determine which fleets are best suited to place a new game session for the player.

          • PlayerId (string) --

            Unique identifier for a player associated with the latency data.

          • RegionIdentifier (string) --

            Name of the region that is associated with the latency value.

          • LatencyInMilliseconds (float) --

            Amount of time that represents the time lag experienced by the player when connected to the specified region.

      • StartTime (datetime) --

        Time stamp indicating when this request was placed in the queue. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").

      • EndTime (datetime) --

        Time stamp indicating when this request was completed, cancelled, or timed out.

StartGameSessionPlacement (new) Link ¶

Places a request for a new game session in a queue (see CreateGameSessionQueue ). When processing a placement request, Amazon GameLift attempts to create a new game session on one of the fleets associated with the queue. If no resources are available, Amazon GameLift tries again with another and so on until resources are found or the placement request times out. A game session placement request can also request player sessions. When a new game session is successfully created, Amazon GameLift creates a player session for each player included in the request.

When placing a game session, by default Amazon GameLift tries each fleet in the order they are listed in the queue configuration. Ideally, a queue's destinations are listed in preference order. Alternatively, when requesting a game session with players, you can also provide latency data for each player in relevant regions. Latency data indicates the performance lag a player experiences when connected to a fleet in the region. Amazon GameLift uses latency data to reorder the list of destinations to place the game session in a region with minimal lag. If latency data is provided for multiple players, Amazon GameLift calculates each region's average lag for all players and reorders to get the best game play across all players.

To place a new game session request, specify the queue name and a set of game session properties and settings. Also provide a unique ID (such as a UUID) for the placement. You'll use this ID to track the status of the placement request. Optionally, provide a set of IDs and player data for each player you want to join to the new game session. To optimize game play for the players, also provide latency data for all players. If successful, a new game session placement is created. To track the status of a placement request, call DescribeGameSessionPlacement and check the request's status. If the status is Fulfilled, a new game session has been created and a game session ARN and region are referenced. If the placement request times out, you have the option of resubmitting the request or retrying it with a different queue.

See also: AWS API Documentation

Request Syntax

client.start_game_session_placement(
    PlacementId='string',
    GameSessionQueueName='string',
    GameProperties=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ],
    MaximumPlayerSessionCount=123,
    GameSessionName='string',
    PlayerLatencies=[
        {
            'PlayerId': 'string',
            'RegionIdentifier': 'string',
            'LatencyInMilliseconds': ...
        },
    ],
    DesiredPlayerSessions=[
        {
            'PlayerId': 'string',
            'PlayerData': 'string'
        },
    ]
)
type PlacementId

string

param PlacementId

[REQUIRED]

Unique identifier to assign to the new game session placement. This value is developer-defined. The value must be unique across all regions and cannot be reused unless you are resubmitting a cancelled or timed-out placement request.

type GameSessionQueueName

string

param GameSessionQueueName

[REQUIRED]

Name of the queue to use to place the new game session.

type GameProperties

list

param GameProperties

Set of developer-defined properties for a game session. These properties are passed to the server process hosting the game session.

  • (dict) --

    Set of key-value pairs containing information a server process requires to set up a game session. This object allows you to pass in any set of data needed for your game. For more information, see the Amazon GameLift Developer Guide.

    • Key (string) -- [REQUIRED]

      TBD

    • Value (string) -- [REQUIRED]

      TBD

type MaximumPlayerSessionCount

integer

param MaximumPlayerSessionCount

[REQUIRED]

Maximum number of players that can be connected simultaneously to the game session.

type GameSessionName

string

param GameSessionName

Descriptive label that is associated with a game session. Session names do not need to be unique.

type PlayerLatencies

list

param PlayerLatencies

Set of values, expressed in milliseconds, indicating the amount of latency that players experience when connected to AWS regions. This information is relevant when requesting player sessions. Latency information provided for player IDs not included in DesiredPlayerSessions are ignored.

  • (dict) --

    Regional latency information for a player, used when requesting a new game session with StartGameSessionPlacement. This value indicates the amount of time lag that exists when the player is connected to a fleet in the specified region. The relative difference between a player's latency values for multiple regions are used to determine which fleets are best suited to place a new game session for the player.

    • PlayerId (string) --

      Unique identifier for a player associated with the latency data.

    • RegionIdentifier (string) --

      Name of the region that is associated with the latency value.

    • LatencyInMilliseconds (float) --

      Amount of time that represents the time lag experienced by the player when connected to the specified region.

type DesiredPlayerSessions

list

param DesiredPlayerSessions

Set of information on each player to create a player session for.

  • (dict) --

    Player information for use when creating player sessions using a game session placement request with StartGameSessionPlacement.

    • PlayerId (string) --

      Unique identifier for a player to associate with the player session.

    • PlayerData (string) --

      Developer-defined information related to a player. Amazon GameLift does not use this data, so it can be formatted as needed for use in the game.

rtype

dict

returns

Response Syntax

{
    'GameSessionPlacement': {
        'PlacementId': 'string',
        'GameSessionQueueName': 'string',
        'Status': 'PENDING'|'FULFILLED'|'CANCELLED'|'TIMED_OUT',
        'GameProperties': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ],
        'MaximumPlayerSessionCount': 123,
        'GameSessionName': 'string',
        'GameSessionArn': 'string',
        'GameSessionRegion': 'string',
        'PlayerLatencies': [
            {
                'PlayerId': 'string',
                'RegionIdentifier': 'string',
                'LatencyInMilliseconds': ...
            },
        ],
        'StartTime': datetime(2015, 1, 1),
        'EndTime': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    • GameSessionPlacement (dict) --

      Object that describes the newly created game session placement. This object includes all the information provided in the request, as well as start/end time stamps and placement status.

      • PlacementId (string) --

        Unique identifier for a game session placement.

      • GameSessionQueueName (string) --

        Descriptive label that is associated with queue. Queue names must be unique within each region.

      • Status (string) --

        Current status of the game session placement request.

        • PENDING – The placement request is currently in the queue waiting to be processed.

        • FULFILLED – A new game session and player sessions (if requested) have been successfully created. Values for GameSessionArn and GameSessionRegion are available.

        • CANCELLED – The placement request was cancelled with a call to StopGameSessionPlacement.

        • TIMED_OUT – A new game session was not successfully created before the time limit expired. You can resubmit the placement request as needed.

      • GameProperties (list) --

        Set of developer-defined properties for a game session. These properties are passed to the server process hosting the game session.

        • (dict) --

          Set of key-value pairs containing information a server process requires to set up a game session. This object allows you to pass in any set of data needed for your game. For more information, see the Amazon GameLift Developer Guide.

          • Key (string) --

            TBD

          • Value (string) --

            TBD

      • MaximumPlayerSessionCount (integer) --

        Maximum number of players that can be connected simultaneously to the game session.

      • GameSessionName (string) --

        Descriptive label that is associated with a game session. Session names do not need to be unique.

      • GameSessionArn (string) --

        Identifier for the game session created by this placement request. This value exists only if the game session placement status is Completed. This identifier is unique across all regions.

      • GameSessionRegion (string) --

        Name of the region where the game session created by this placement request is running. This value exists only if the game session placement status is Completed.

      • PlayerLatencies (list) --

        Set of values, expressed in milliseconds, indicating the amount of latency that players experience when connected to AWS regions.

        • (dict) --

          Regional latency information for a player, used when requesting a new game session with StartGameSessionPlacement. This value indicates the amount of time lag that exists when the player is connected to a fleet in the specified region. The relative difference between a player's latency values for multiple regions are used to determine which fleets are best suited to place a new game session for the player.

          • PlayerId (string) --

            Unique identifier for a player associated with the latency data.

          • RegionIdentifier (string) --

            Name of the region that is associated with the latency value.

          • LatencyInMilliseconds (float) --

            Amount of time that represents the time lag experienced by the player when connected to the specified region.

      • StartTime (datetime) --

        Time stamp indicating when this request was placed in the queue. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").

      • EndTime (datetime) --

        Time stamp indicating when this request was completed, cancelled, or timed out.

UpdateGameSessionQueue (new) Link ¶

Updates settings for a game session queue, which determines how new game session requests in the queue are processed. To update settings, specify the queue name to be updated and provide the new settings. When updating destinations, provide a complete list of destinations.

See also: AWS API Documentation

Request Syntax

client.update_game_session_queue(
    Name='string',
    TimeoutInSeconds=123,
    Destinations=[
        {
            'DestinationArn': 'string'
        },
    ]
)
type Name

string

param Name

[REQUIRED]

Descriptive label that is associated with queue. Queue names must be unique within each region.

type TimeoutInSeconds

integer

param TimeoutInSeconds

Maximum time, in seconds, that a new game session placement request remains in the queue. When a request exceeds this time, the game session placement changes to a TIMED_OUT status.

type Destinations

list

param Destinations

List of fleets that can be used to fulfill game session placement requests in the queue. Fleets are identified by either a fleet ARN or a fleet alias ARN. Destinations are listed in default preference order.

  • (dict) --

    Fleet designated in a game session queue. Requests for new game sessions in the queue are fulfilled by starting a new game session on any destination listed for a queue.

    • DestinationArn (string) --

      Amazon Resource Name (ARN) assigned to fleet or fleet alias. ARNs, which include a fleet ID or alias ID and a region name, provide a unique identifier across all regions.

rtype

dict

returns

Response Syntax

{
    'GameSessionQueue': {
        'Name': 'string',
        'TimeoutInSeconds': 123,
        'Destinations': [
            {
                'DestinationArn': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) --

    • GameSessionQueue (dict) --

      Object that describes the newly updated game session queue.

      • Name (string) --

        Descriptive label that is associated with queue. Queue names must be unique within each region.

      • TimeoutInSeconds (integer) --

        Maximum time, in seconds, that a new game session placement request remains in the queue. When a request exceeds this time, the game session placement changes to a TIMED_OUT status.

      • Destinations (list) --

        List of fleets that can be used to fulfill game session placement requests in the queue. Fleets are identified by either a fleet ARN or a fleet alias ARN. Destinations are listed in default preference order.

        • (dict) --

          Fleet designated in a game session queue. Requests for new game sessions in the queue are fulfilled by starting a new game session on any destination listed for a queue.

          • DestinationArn (string) --

            Amazon Resource Name (ARN) assigned to fleet or fleet alias. ARNs, which include a fleet ID or alias ID and a region name, provide a unique identifier across all regions.

CreateAlias (updated) Link ¶
Changes (response)
{'Alias': {'AliasArn': 'string'}}

Creates an alias and sets a target fleet. A fleet alias can be used in place of a fleet ID, such as when calling CreateGameSession from a game client or game service or adding destinations to a game session queue. By changing an alias's target fleet, you can switch your players to the new fleet without changing any other component. In production, this feature is particularly useful to redirect your player base seamlessly to the latest game server update.

Amazon GameLift supports two types of routing strategies for aliases: simple and terminal. Use a simple alias to point to an active fleet. Use a terminal alias to display a message to incoming traffic instead of routing players to an active fleet. This option is useful when a game server is no longer supported but you want to provide better messaging than a standard 404 error.

To create a fleet alias, specify an alias name, routing strategy, and optional description. If successful, a new alias record is returned, including an alias ID, which you can reference when creating a game session. To reassign the alias to another fleet ID, call UpdateAlias.

See also: AWS API Documentation

Request Syntax

client.create_alias(
    Name='string',
    Description='string',
    RoutingStrategy={
        'Type': 'SIMPLE'|'TERMINAL',
        'FleetId': 'string',
        'Message': 'string'
    }
)
type Name

string

param Name

[REQUIRED]

Descriptive label that is associated with an alias. Alias names do not need to be unique.

type Description

string

param Description

Human-readable description of an alias.

type RoutingStrategy

dict

param RoutingStrategy

[REQUIRED]

Object that specifies the fleet and routing type to use for the alias.

  • Type (string) --

    Type of routing strategy.

    Possible routing types include the following:

    • SIMPLE – The alias resolves to one specific fleet. Use this type when routing to active fleets.

    • TERMINAL – The alias does not resolve to a fleet but instead can be used to display a message to the user. A terminal alias throws a TerminalRoutingStrategyException with the RoutingStrategy message embedded.

  • FleetId (string) --

    Unique identifier for a fleet that the alias points to.

  • Message (string) --

    Message text to be used with a terminal routing strategy.

rtype

dict

returns

Response Syntax

{
    'Alias': {
        'AliasId': 'string',
        'Name': 'string',
        'AliasArn': 'string',
        'Description': 'string',
        'RoutingStrategy': {
            'Type': 'SIMPLE'|'TERMINAL',
            'FleetId': 'string',
            'Message': 'string'
        },
        'CreationTime': datetime(2015, 1, 1),
        'LastUpdatedTime': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    Represents the returned data in response to a request action.

    • Alias (dict) --

      Object that describes the newly created alias record.

      • AliasId (string) --

        Unique identifier for an alias; alias IDs are unique within a region.

      • Name (string) --

        Descriptive label that is associated with an alias. Alias names do not need to be unique.

      • AliasArn (string) --

        Unique identifier for an alias; alias ARNs are unique across all regions.

      • Description (string) --

        Human-readable description of an alias.

      • RoutingStrategy (dict) --

        Alias configuration for the alias, including routing type and settings.

        • Type (string) --

          Type of routing strategy.

          Possible routing types include the following:

          • SIMPLE – The alias resolves to one specific fleet. Use this type when routing to active fleets.

          • TERMINAL – The alias does not resolve to a fleet but instead can be used to display a message to the user. A terminal alias throws a TerminalRoutingStrategyException with the RoutingStrategy message embedded.

        • FleetId (string) --

          Unique identifier for a fleet that the alias points to.

        • Message (string) --

          Message text to be used with a terminal routing strategy.

      • CreationTime (datetime) --

        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) --

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

CreateFleet (updated) Link ¶
Changes (response)
{'FleetAttributes': {'FleetArn': 'string'}}

Creates a new fleet to run your game servers. A fleet is a set of Amazon Elastic Compute Cloud (Amazon EC2) instances, each of which can run multiple server processes to host game sessions. You configure a fleet to create instances with certain hardware specifications (see Amazon EC2 Instance Types for more information), and deploy a specified game build to each instance. A newly created fleet passes through several statuses; once it reaches the ACTIVE status, it can begin hosting game sessions.

To create a new fleet, provide a fleet name, an EC2 instance type, and a build ID of the game build to deploy. You can also configure the new fleet with the following settings: (1) a runtime configuration describing what server processes to run on each instance in the fleet (required to create fleet), (2) access permissions for inbound traffic, (3) fleet-wide game session protection, and (4) the location of default log files for Amazon GameLift to upload and store.

If the CreateFleet call is successful, Amazon GameLift performs the following tasks:

  • Creates a fleet record and sets the status to NEW (followed by other statuses as the fleet is activated).

  • Sets the fleet's capacity to 1 "desired", which causes Amazon GameLift to start one new EC2 instance.

  • Starts launching server processes on the instance. If the fleet is configured to run multiple server processes per instance, Amazon GameLift staggers each launch by a few seconds.

  • Begins writing events to the fleet event log, which can be accessed in the Amazon GameLift console.

  • Sets the fleet's status to ACTIVE once one server process in the fleet is ready to host a game session.

After a fleet is created, use the following actions to change fleet properties and configuration:

  • UpdateFleetAttributes -- Update fleet metadata, including name and description.

  • UpdateFleetCapacity -- Increase or decrease the number of instances you want the fleet to maintain.

  • UpdateFleetPortSettings -- Change the IP address and port ranges that allow access to incoming traffic.

  • UpdateRuntimeConfiguration -- Change how server processes are launched in the fleet, including launch path, launch parameters, and the number of concurrent processes.

  • PutScalingPolicy -- Create or update rules that are used to set the fleet's capacity (autoscaling).

See also: AWS API Documentation

Request Syntax

client.create_fleet(
    Name='string',
    Description='string',
    BuildId='string',
    ServerLaunchPath='string',
    ServerLaunchParameters='string',
    LogPaths=[
        'string',
    ],
    EC2InstanceType='t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge',
    EC2InboundPermissions=[
        {
            'FromPort': 123,
            'ToPort': 123,
            'IpRange': 'string',
            'Protocol': 'TCP'|'UDP'
        },
    ],
    NewGameSessionProtectionPolicy='NoProtection'|'FullProtection',
    RuntimeConfiguration={
        'ServerProcesses': [
            {
                'LaunchPath': 'string',
                'Parameters': 'string',
                'ConcurrentExecutions': 123
            },
        ]
    },
    ResourceCreationLimitPolicy={
        'NewGameSessionsPerCreator': 123,
        'PolicyPeriodInMinutes': 123
    }
)
type Name

string

param Name

[REQUIRED]

Descriptive label that is associated with a fleet. Fleet names do not need to be unique.

type Description

string

param Description

Human-readable description of a fleet.

type BuildId

string

param BuildId

[REQUIRED]

Unique identifier for a build to be deployed on the new fleet. The build must have been successfully uploaded to Amazon GameLift and be in a READY status. This fleet setting cannot be changed once the fleet is created.

type ServerLaunchPath

string

param ServerLaunchPath

This parameter is no longer used. Instead, specify a server launch path using the RuntimeConfiguration parameter. (Requests that specify a server launch path and launch parameters instead of a runtime configuration will continue to work.)

type ServerLaunchParameters

string

param ServerLaunchParameters

This parameter is no longer used. Instead, specify server launch parameters in the RuntimeConfiguration parameter. (Requests that specify a server launch path and launch parameters instead of a runtime configuration will continue to work.)

type LogPaths

list

param LogPaths

This parameter is no longer used. Instead, to specify where Amazon GameLift should store log files once a server process shuts down, use the Amazon GameLift server API ProcessReady() and specify one or more directory paths in logParameters . See more information in the Server API Reference.

  • (string) --

type EC2InstanceType

string

param EC2InstanceType

[REQUIRED]

Name of an EC2 instance type that is supported in Amazon GameLift. A fleet instance type determines the computing resources of each instance in the fleet, including CPU, memory, storage, and networking capacity. Amazon GameLift supports the following EC2 instance types. See Amazon EC2 Instance Types for detailed descriptions.

type EC2InboundPermissions

list

param EC2InboundPermissions

Range of IP addresses and port settings that permit inbound traffic to access server processes running on the fleet. If no inbound permissions are set, including both IP address range and port range, the server processes in the fleet cannot accept connections. You can specify one or more sets of permissions for a fleet.

  • (dict) --

    A range of IP addresses and port settings that allow inbound traffic to connect to server processes on Amazon GameLift. Each game session hosted on a fleet is assigned a unique combination of IP address and port number, which must fall into the fleet's allowed ranges. This combination is included in the GameSession object.

    • FromPort (integer) -- [REQUIRED]

      Starting value for a range of allowed port numbers.

    • ToPort (integer) -- [REQUIRED]

      Ending value for a range of allowed port numbers. Port numbers are end-inclusive. This value must be higher than FromPort .

    • IpRange (string) -- [REQUIRED]

      Range of allowed IP addresses. This value must be expressed in CIDR notation. Example: " 000.000.000.000/[subnet mask] " or optionally the shortened version " 0.0.0.0/[subnet mask] ".

    • Protocol (string) -- [REQUIRED]

      Network communication protocol used by the fleet.

type NewGameSessionProtectionPolicy

string

param NewGameSessionProtectionPolicy

Game session protection policy to apply to all instances in this fleet. If this parameter is not set, instances in this fleet default to no protection. You can change a fleet's protection policy using UpdateFleetAttributes, but this change will only affect sessions created after the policy change. You can also set protection for individual instances using UpdateGameSession.

  • NoProtection – The game session can be terminated during a scale-down event.

  • FullProtection – If the game session is in an ACTIVE status, it cannot be terminated during a scale-down event.

type RuntimeConfiguration

dict

param RuntimeConfiguration

Instructions for launching server processes on each instance in the fleet. The runtime configuration for a fleet has a collection of server process configurations, one for each type of server process to run on an instance. A server process configuration specifies the location of the server executable, launch parameters, and the number of concurrent processes with that configuration to maintain on each instance. A CreateFleet request must include a runtime configuration with at least one server process configuration; otherwise the request will fail with an invalid request exception. (This parameter replaces the parameters ServerLaunchPath and ServerLaunchParameters ; requests that contain values for these parameters instead of a runtime configuration will continue to work.)

  • ServerProcesses (list) --

    Collection of server process configurations describing what server processes to run on each instance in a fleet

    • (dict) --

      A set of instructions for launching server processes on each instance in a fleet. Each instruction set identifies the location of the server executable, optional launch parameters, and the number of server processes with this configuration to maintain concurrently on the instance. Server process configurations make up a fleet's RuntimeConfiguration .

      • LaunchPath (string) -- [REQUIRED]

        Location of the server executable in a game build. All game builds are installed on instances at the root : for Windows instances C:\game , and for Linux instances /local/game . A Windows game build with an executable file located at MyGame\latest\server.exe must have a launch path of " C:\game\MyGame\latest\server.exe ". A Linux game build with an executable file located at MyGame/latest/server.exe must have a launch path of " /local/game/MyGame/latest/server.exe ".

      • Parameters (string) --

        Optional list of parameters to pass to the server executable on launch.

      • ConcurrentExecutions (integer) -- [REQUIRED]

        Number of server processes using this configuration to run concurrently on an instance.

type ResourceCreationLimitPolicy

dict

param ResourceCreationLimitPolicy

Policy that limits the number of game sessions an individual player can create over a span of time for this fleet.

  • NewGameSessionsPerCreator (integer) --

    Maximum number of game sessions that an individual can create during the policy period.

  • PolicyPeriodInMinutes (integer) --

    Time span used in evaluating the resource creation limit policy.

rtype

dict

returns

Response Syntax

{
    'FleetAttributes': {
        'FleetId': 'string',
        'FleetArn': 'string',
        'Description': 'string',
        'Name': 'string',
        'CreationTime': datetime(2015, 1, 1),
        'TerminationTime': datetime(2015, 1, 1),
        'Status': 'NEW'|'DOWNLOADING'|'VALIDATING'|'BUILDING'|'ACTIVATING'|'ACTIVE'|'DELETING'|'ERROR'|'TERMINATED',
        'BuildId': 'string',
        'ServerLaunchPath': 'string',
        'ServerLaunchParameters': 'string',
        'LogPaths': [
            'string',
        ],
        'NewGameSessionProtectionPolicy': 'NoProtection'|'FullProtection',
        'OperatingSystem': 'WINDOWS_2012'|'AMAZON_LINUX',
        'ResourceCreationLimitPolicy': {
            'NewGameSessionsPerCreator': 123,
            'PolicyPeriodInMinutes': 123
        }
    }
}

Response Structure

  • (dict) --

    Represents the returned data in response to a request action.

    • FleetAttributes (dict) --

      Properties for the newly created fleet.

      • FleetId (string) --

        Unique identifier for a fleet.

      • FleetArn (string) --

        Identifier for a fleet that is unique across all regions.

      • Description (string) --

        Human-readable description of the fleet.

      • Name (string) --

        Descriptive label that is associated with a fleet. Fleet names do not need to be unique.

      • CreationTime (datetime) --

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

      • TerminationTime (datetime) --

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

      • Status (string) --

        Current status of the fleet.

        Possible fleet statuses include the following:

        • NEW – A new fleet has been defined and desired instances is set to 1.

        • DOWNLOADING/VALIDATING/BUILDING/ACTIVATING – Amazon GameLift is setting up the new fleet, creating new instances with the game build and starting server processes.

        • ACTIVE – Hosts can now accept game sessions.

        • ERROR – An error occurred when downloading, validating, building, or activating the fleet.

        • DELETING – Hosts are responding to a delete fleet request.

        • TERMINATED – The fleet no longer exists.

      • BuildId (string) --

        Unique identifier for a build.

      • ServerLaunchPath (string) --

        Path to a game server executable in the fleet's build, specified for fleets created prior to 2016-08-04 (or AWS SDK v. 0.12.16). Server launch paths for fleets created after this date are specified in the fleet's RuntimeConfiguration.

      • ServerLaunchParameters (string) --

        Game server launch parameters specified for fleets created prior to 2016-08-04 (or AWS SDK v. 0.12.16). Server launch parameters for fleets created after this date are specified in the fleet's RuntimeConfiguration.

      • LogPaths (list) --

        Location of default log files. When a server process is shut down, Amazon GameLift captures and stores any log files in this location. These logs are in addition to game session logs; see more on game session logs in the Amazon GameLift Developer Guide. If no default log path for a fleet is specified, Amazon GameLift will automatically upload logs that are stored on each instance at C:\game\logs (for Windows) or /local/game/logs (for Linux). Use the Amazon GameLift console to access stored logs.

        • (string) --

      • NewGameSessionProtectionPolicy (string) --

        Type of game session protection to set for all new instances started in the fleet.

        • NoProtection – The game session can be terminated during a scale-down event.

        • FullProtection – If the game session is in an ACTIVE status, it cannot be terminated during a scale-down event.

      • OperatingSystem (string) --

        Operating system of the fleet's computing resources. A fleet's operating system depends on the OS specified for the build that is deployed on this fleet.

      • ResourceCreationLimitPolicy (dict) --

        Fleet policy to limit the number of game sessions an individual player can create over a span of time.

        • NewGameSessionsPerCreator (integer) --

          Maximum number of game sessions that an individual can create during the policy period.

        • PolicyPeriodInMinutes (integer) --

          Time span used in evaluating the resource creation limit policy.

CreatePlayerSession (updated) Link ¶
Changes (request, response)
Request
{'PlayerData': 'string'}
Response
{'PlayerSession': {'PlayerData': 'string'}}

Adds a player to a game session and creates a player session record. Before a player can be added, a game session must have an ACTIVE status, have a creation policy of ALLOW_ALL , and have an open player slot. To add a group of players to a game session, use CreatePlayerSessions.

To create a player session, specify a game session ID, player ID, and optionally a string of player data. If successful, the player is added to the game session and a new PlayerSession object is returned. Player sessions cannot be updated.

See also: AWS API Documentation

Request Syntax

client.create_player_session(
    GameSessionId='string',
    PlayerId='string',
    PlayerData='string'
)
type GameSessionId

string

param GameSessionId

[REQUIRED]

Unique identifier for the game session to add a player to.

type PlayerId

string

param PlayerId

[REQUIRED]

Unique identifier for a player. Player IDs are developer-defined.

type PlayerData

string

param PlayerData

Developer-defined information related to a player. Amazon GameLift does not use this data, so it can be formatted as needed for use in the game.

rtype

dict

returns

Response Syntax

{
    'PlayerSession': {
        'PlayerSessionId': 'string',
        'PlayerId': 'string',
        'GameSessionId': 'string',
        'FleetId': 'string',
        'CreationTime': datetime(2015, 1, 1),
        'TerminationTime': datetime(2015, 1, 1),
        'Status': 'RESERVED'|'ACTIVE'|'COMPLETED'|'TIMEDOUT',
        'IpAddress': 'string',
        'Port': 123,
        'PlayerData': 'string'
    }
}

Response Structure

  • (dict) --

    Represents the returned data in response to a request action.

    • PlayerSession (dict) --

      Object that describes the newly created player session record.

      • PlayerSessionId (string) --

        Unique identifier for a player session.

      • PlayerId (string) --

        Unique identifier for a player that is associated with this player session.

      • GameSessionId (string) --

        Unique identifier for the game session that the player session is connected to.

      • FleetId (string) --

        Unique identifier for a fleet that the player's game session is running on.

      • CreationTime (datetime) --

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

      • TerminationTime (datetime) --

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

      • Status (string) --

        Current status of the player session.

        Possible player session statuses include the following:

        • RESERVED – The player session request has been received, but the player has not yet connected to the server process and/or been validated.

        • ACTIVE – The player has been validated by the server process and is currently connected.

        • COMPLETED – The player connection has been dropped.

        • TIMEDOUT – A player session request was received, but the player did not connect and/or was not validated within the time-out limit (60 seconds).

      • IpAddress (string) --

        Game session IP address. All player sessions reference the game session location.

      • Port (integer) --

        Port number for the game session. To connect to a Amazon GameLift server process, an app needs both the IP address and port number.

      • PlayerData (string) --

        Developer-defined information related to a player. Amazon GameLift does not use this data, so it can be formatted as needed for use in the game.

CreatePlayerSessions (updated) Link ¶
Changes (request, response)
Request
{'PlayerDataMap': {'string': 'string'}}
Response
{'PlayerSessions': {'PlayerData': 'string'}}

Adds a group of players to a game session. This action is useful with a team matching feature. Before players can be added, a game session must have an ACTIVE status, have a creation policy of ALLOW_ALL , and have an open player slot. To add a single player to a game session, use CreatePlayerSession.

To create player sessions, specify a game session ID, a list of player IDs, and optionally a set of player data strings. If successful, the players are added to the game session and a set of new PlayerSession objects is returned. Player sessions cannot be updated.

See also: AWS API Documentation

Request Syntax

client.create_player_sessions(
    GameSessionId='string',
    PlayerIds=[
        'string',
    ],
    PlayerDataMap={
        'string': 'string'
    }
)
type GameSessionId

string

param GameSessionId

[REQUIRED]

Unique identifier for the game session to add players to.

type PlayerIds

list

param PlayerIds

[REQUIRED]

List of unique identifiers for the players to be added.

  • (string) --

type PlayerDataMap

dict

param PlayerDataMap

Map of string pairs, each specifying a player ID and a set of developer-defined information related to the player. Amazon GameLift does not use this data, so it can be formatted as needed for use in the game. Player data strings for player IDs not included in the PlayerIds parameter are ignored.

  • (string) --

    • (string) --

rtype

dict

returns

Response Syntax

{
    'PlayerSessions': [
        {
            'PlayerSessionId': 'string',
            'PlayerId': 'string',
            'GameSessionId': 'string',
            'FleetId': 'string',
            'CreationTime': datetime(2015, 1, 1),
            'TerminationTime': datetime(2015, 1, 1),
            'Status': 'RESERVED'|'ACTIVE'|'COMPLETED'|'TIMEDOUT',
            'IpAddress': 'string',
            'Port': 123,
            'PlayerData': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    Represents the returned data in response to a request action.

    • PlayerSessions (list) --

      Collection of player session objects created for the added players.

      • (dict) --

        Properties describing a player session. A player session represents either a player reservation for a game session or actual player activity in a game session. A player session object (including player data) is automatically passed to a game session when the player connects to the game session and is validated.

        Player session-related operations include:

        • CreatePlayerSession

        • CreatePlayerSessions

        • DescribePlayerSessions

        • PlayerSessionId (string) --

          Unique identifier for a player session.

        • PlayerId (string) --

          Unique identifier for a player that is associated with this player session.

        • GameSessionId (string) --

          Unique identifier for the game session that the player session is connected to.

        • FleetId (string) --

          Unique identifier for a fleet that the player's game session is running on.

        • CreationTime (datetime) --

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

        • TerminationTime (datetime) --

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

        • Status (string) --

          Current status of the player session.

          Possible player session statuses include the following:

          • RESERVED – The player session request has been received, but the player has not yet connected to the server process and/or been validated.

          • ACTIVE – The player has been validated by the server process and is currently connected.

          • COMPLETED – The player connection has been dropped.

          • TIMEDOUT – A player session request was received, but the player did not connect and/or was not validated within the time-out limit (60 seconds).

        • IpAddress (string) --

          Game session IP address. All player sessions reference the game session location.

        • Port (integer) --

          Port number for the game session. To connect to a Amazon GameLift server process, an app needs both the IP address and port number.

        • PlayerData (string) --

          Developer-defined information related to a player. Amazon GameLift does not use this data, so it can be formatted as needed for use in the game.

DescribeAlias (updated) Link ¶
Changes (response)
{'Alias': {'AliasArn': 'string'}}

Retrieves properties for a fleet alias. This operation returns all alias metadata and settings. To get just the fleet ID an alias is currently pointing to, use ResolveAlias.

To get alias properties, specify the alias ID. If successful, an Alias object is returned.

See also: AWS API Documentation

Request Syntax

client.describe_alias(
    AliasId='string'
)
type AliasId

string

param AliasId

[REQUIRED]

Unique identifier for a fleet alias. Specify the alias you want to retrieve.

rtype

dict

returns

Response Syntax

{
    'Alias': {
        'AliasId': 'string',
        'Name': 'string',
        'AliasArn': 'string',
        'Description': 'string',
        'RoutingStrategy': {
            'Type': 'SIMPLE'|'TERMINAL',
            'FleetId': 'string',
            'Message': 'string'
        },
        'CreationTime': datetime(2015, 1, 1),
        'LastUpdatedTime': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    Represents the returned data in response to a request action.

    • Alias (dict) --

      Object that contains the requested alias.

      • AliasId (string) --

        Unique identifier for an alias; alias IDs are unique within a region.

      • Name (string) --

        Descriptive label that is associated with an alias. Alias names do not need to be unique.

      • AliasArn (string) --

        Unique identifier for an alias; alias ARNs are unique across all regions.

      • Description (string) --

        Human-readable description of an alias.

      • RoutingStrategy (dict) --

        Alias configuration for the alias, including routing type and settings.

        • Type (string) --

          Type of routing strategy.

          Possible routing types include the following:

          • SIMPLE – The alias resolves to one specific fleet. Use this type when routing to active fleets.

          • TERMINAL – The alias does not resolve to a fleet but instead can be used to display a message to the user. A terminal alias throws a TerminalRoutingStrategyException with the RoutingStrategy message embedded.

        • FleetId (string) --

          Unique identifier for a fleet that the alias points to.

        • Message (string) --

          Message text to be used with a terminal routing strategy.

      • CreationTime (datetime) --

        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) --

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

DescribeFleetAttributes (updated) Link ¶
Changes (response)
{'FleetAttributes': {'FleetArn': 'string'}}

Retrieves fleet properties, including metadata, status, and configuration, for one or more fleets. You can request attributes for all fleets, or specify a list of one or more fleet IDs. When requesting multiple fleets, use the pagination parameters to retrieve results as a set of sequential pages. If successful, a FleetAttributes object is returned for each requested fleet ID. When specifying a list of fleet IDs, attribute objects are returned only for fleets that currently exist.

Note

Some API actions may limit the number of fleet IDs allowed in one request. If a request exceeds this limit, the request fails and the error message includes the maximum allowed.

See also: AWS API Documentation

Request Syntax

client.describe_fleet_attributes(
    FleetIds=[
        'string',
    ],
    Limit=123,
    NextToken='string'
)
type FleetIds

list

param FleetIds

Unique identifier for a fleet(s) to retrieve attributes for. To request attributes for all fleets, leave this parameter empty.

  • (string) --

type Limit

integer

param Limit

Maximum number of results to return. Use this parameter with NextToken to get results as a set of sequential pages. This parameter is ignored when the request specifies one or a list of fleet IDs.

type NextToken

string

param NextToken

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 specify the start of the result set, do not specify a value. This parameter is ignored when the request specifies one or a list of fleet IDs.

rtype

dict

returns

Response Syntax

{
    'FleetAttributes': [
        {
            'FleetId': 'string',
            'FleetArn': 'string',
            'Description': 'string',
            'Name': 'string',
            'CreationTime': datetime(2015, 1, 1),
            'TerminationTime': datetime(2015, 1, 1),
            'Status': 'NEW'|'DOWNLOADING'|'VALIDATING'|'BUILDING'|'ACTIVATING'|'ACTIVE'|'DELETING'|'ERROR'|'TERMINATED',
            'BuildId': 'string',
            'ServerLaunchPath': 'string',
            'ServerLaunchParameters': 'string',
            'LogPaths': [
                'string',
            ],
            'NewGameSessionProtectionPolicy': 'NoProtection'|'FullProtection',
            'OperatingSystem': 'WINDOWS_2012'|'AMAZON_LINUX',
            'ResourceCreationLimitPolicy': {
                'NewGameSessionsPerCreator': 123,
                'PolicyPeriodInMinutes': 123
            }
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    Represents the returned data in response to a request action.

    • FleetAttributes (list) --

      Collection of objects containing attribute metadata for each requested fleet ID.

      • (dict) --

        General properties describing a fleet.

        • FleetId (string) --

          Unique identifier for a fleet.

        • FleetArn (string) --

          Identifier for a fleet that is unique across all regions.

        • Description (string) --

          Human-readable description of the fleet.

        • Name (string) --

          Descriptive label that is associated with a fleet. Fleet names do not need to be unique.

        • CreationTime (datetime) --

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

        • TerminationTime (datetime) --

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

        • Status (string) --

          Current status of the fleet.

          Possible fleet statuses include the following:

          • NEW – A new fleet has been defined and desired instances is set to 1.

          • DOWNLOADING/VALIDATING/BUILDING/ACTIVATING – Amazon GameLift is setting up the new fleet, creating new instances with the game build and starting server processes.

          • ACTIVE – Hosts can now accept game sessions.

          • ERROR – An error occurred when downloading, validating, building, or activating the fleet.

          • DELETING – Hosts are responding to a delete fleet request.

          • TERMINATED – The fleet no longer exists.

        • BuildId (string) --

          Unique identifier for a build.

        • ServerLaunchPath (string) --

          Path to a game server executable in the fleet's build, specified for fleets created prior to 2016-08-04 (or AWS SDK v. 0.12.16). Server launch paths for fleets created after this date are specified in the fleet's RuntimeConfiguration.

        • ServerLaunchParameters (string) --

          Game server launch parameters specified for fleets created prior to 2016-08-04 (or AWS SDK v. 0.12.16). Server launch parameters for fleets created after this date are specified in the fleet's RuntimeConfiguration.

        • LogPaths (list) --

          Location of default log files. When a server process is shut down, Amazon GameLift captures and stores any log files in this location. These logs are in addition to game session logs; see more on game session logs in the Amazon GameLift Developer Guide. If no default log path for a fleet is specified, Amazon GameLift will automatically upload logs that are stored on each instance at C:\game\logs (for Windows) or /local/game/logs (for Linux). Use the Amazon GameLift console to access stored logs.

          • (string) --

        • NewGameSessionProtectionPolicy (string) --

          Type of game session protection to set for all new instances started in the fleet.

          • NoProtection – The game session can be terminated during a scale-down event.

          • FullProtection – If the game session is in an ACTIVE status, it cannot be terminated during a scale-down event.

        • OperatingSystem (string) --

          Operating system of the fleet's computing resources. A fleet's operating system depends on the OS specified for the build that is deployed on this fleet.

        • ResourceCreationLimitPolicy (dict) --

          Fleet policy to limit the number of game sessions an individual player can create over a span of time.

          • NewGameSessionsPerCreator (integer) --

            Maximum number of game sessions that an individual can create during the policy period.

          • PolicyPeriodInMinutes (integer) --

            Time span used in evaluating the resource creation limit policy.

    • NextToken (string) --

      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.

DescribeFleetEvents (updated) Link ¶
Changes (response)
{'Events': {'EventCode': {'GAME_SESSION_ACTIVATION_TIMEOUT'}}}

Retrieves entries from the specified fleet's event log. You can specify a time range to limit the result set. Use the pagination parameters to retrieve results as a set of sequential pages. If successful, a collection of event log entries matching the request are returned.

See also: AWS API Documentation

Request Syntax

client.describe_fleet_events(
    FleetId='string',
    StartTime=datetime(2015, 1, 1),
    EndTime=datetime(2015, 1, 1),
    Limit=123,
    NextToken='string'
)
type FleetId

string

param FleetId

[REQUIRED]

Unique identifier for a fleet to get event logs for.

type StartTime

datetime

param StartTime

Earliest date to retrieve event logs for. If no start time is specified, this call returns entries starting from when the fleet was created to the specified end time. Format is a number expressed in Unix time as milliseconds (ex: "1469498468.057").

type EndTime

datetime

param EndTime

Most recent date to retrieve event logs for. If no end time is specified, this call returns entries from the specified start time up to the present. Format is a number expressed in Unix time as milliseconds (ex: "1469498468.057").

type Limit

integer

param Limit

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

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 specify the start of the result set, do not specify a value.

rtype

dict

returns

Response Syntax

{
    'Events': [
        {
            'EventId': 'string',
            'ResourceId': 'string',
            'EventCode': 'GENERIC_EVENT'|'FLEET_CREATED'|'FLEET_DELETED'|'FLEET_SCALING_EVENT'|'FLEET_STATE_DOWNLOADING'|'FLEET_STATE_VALIDATING'|'FLEET_STATE_BUILDING'|'FLEET_STATE_ACTIVATING'|'FLEET_STATE_ACTIVE'|'FLEET_STATE_ERROR'|'FLEET_INITIALIZATION_FAILED'|'FLEET_BINARY_DOWNLOAD_FAILED'|'FLEET_VALIDATION_LAUNCH_PATH_NOT_FOUND'|'FLEET_VALIDATION_EXECUTABLE_RUNTIME_FAILURE'|'FLEET_VALIDATION_TIMED_OUT'|'FLEET_ACTIVATION_FAILED'|'FLEET_ACTIVATION_FAILED_NO_INSTANCES'|'FLEET_NEW_GAME_SESSION_PROTECTION_POLICY_UPDATED'|'SERVER_PROCESS_INVALID_PATH'|'SERVER_PROCESS_SDK_INITIALIZATION_TIMEOUT'|'SERVER_PROCESS_PROCESS_READY_TIMEOUT'|'SERVER_PROCESS_CRASHED'|'SERVER_PROCESS_TERMINATED_UNHEALTHY'|'SERVER_PROCESS_FORCE_TERMINATED'|'SERVER_PROCESS_PROCESS_EXIT_TIMEOUT'|'GAME_SESSION_ACTIVATION_TIMEOUT',
            'Message': 'string',
            'EventTime': datetime(2015, 1, 1)
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    Represents the returned data in response to a request action.

    • Events (list) --

      Collection of objects containing event log entries for the specified fleet.

      • (dict) --

        Log entry describing an event involving Amazon GameLift resources (such as a fleet). In addition to tracking activity, event codes and messages can provide additional information for troubleshooting and debugging problems.

        • EventId (string) --

          Unique identifier for a fleet event.

        • ResourceId (string) --

          Unique identifier for an event resource, such as a fleet ID.

        • EventCode (string) --

          Type of event being logged.

        • Message (string) --

          Additional information related to the event.

        • EventTime (datetime) --

          Time stamp indicating when this event occurred. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").

    • NextToken (string) --

      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.

DescribePlayerSessions (updated) Link ¶
Changes (response)
{'PlayerSessions': {'PlayerData': 'string'}}

Retrieves properties for one or more player sessions. This action can be used in several ways: (1) provide a PlayerSessionId parameter to request properties for a specific player session; (2) provide a GameSessionId parameter to request properties for all player sessions in the specified game session; (3) provide a PlayerId parameter to request properties for all player sessions of a specified player.

To get game session record(s), specify only one of the following: a player session ID, a game session ID, or a player ID. You can filter this request by player session status. Use the pagination parameters to retrieve results as a set of sequential pages. If successful, a PlayerSession object is returned for each session matching the request.

See also: AWS API Documentation

Request Syntax

client.describe_player_sessions(
    GameSessionId='string',
    PlayerId='string',
    PlayerSessionId='string',
    PlayerSessionStatusFilter='string',
    Limit=123,
    NextToken='string'
)
type GameSessionId

string

param GameSessionId

Unique identifier for the game session to retrieve player sessions for.

type PlayerId

string

param PlayerId

Unique identifier for a player to retrieve player sessions for.

type PlayerSessionId

string

param PlayerSessionId

Unique identifier for a player session to retrieve.

type PlayerSessionStatusFilter

string

param PlayerSessionStatusFilter

Player session status to filter results on.

Possible player session statuses include the following:

  • RESERVED – The player session request has been received, but the player has not yet connected to the server process and/or been validated.

  • ACTIVE – The player has been validated by the server process and is currently connected.

  • COMPLETED – The player connection has been dropped.

  • TIMEDOUT – A player session request was received, but the player did not connect and/or was not validated within the time-out limit (60 seconds).

type Limit

integer

param Limit

Maximum number of results to return. Use this parameter with NextToken to get results as a set of sequential pages. If a player session ID is specified, this parameter is ignored.

type NextToken

string

param NextToken

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 specify the start of the result set, do not specify a value. If a player session ID is specified, this parameter is ignored.

rtype

dict

returns

Response Syntax

{
    'PlayerSessions': [
        {
            'PlayerSessionId': 'string',
            'PlayerId': 'string',
            'GameSessionId': 'string',
            'FleetId': 'string',
            'CreationTime': datetime(2015, 1, 1),
            'TerminationTime': datetime(2015, 1, 1),
            'Status': 'RESERVED'|'ACTIVE'|'COMPLETED'|'TIMEDOUT',
            'IpAddress': 'string',
            'Port': 123,
            'PlayerData': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    Represents the returned data in response to a request action.

    • PlayerSessions (list) --

      Collection of objects containing properties for each player session that matches the request.

      • (dict) --

        Properties describing a player session. A player session represents either a player reservation for a game session or actual player activity in a game session. A player session object (including player data) is automatically passed to a game session when the player connects to the game session and is validated.

        Player session-related operations include:

        • CreatePlayerSession

        • CreatePlayerSessions

        • DescribePlayerSessions

        • PlayerSessionId (string) --

          Unique identifier for a player session.

        • PlayerId (string) --

          Unique identifier for a player that is associated with this player session.

        • GameSessionId (string) --

          Unique identifier for the game session that the player session is connected to.

        • FleetId (string) --

          Unique identifier for a fleet that the player's game session is running on.

        • CreationTime (datetime) --

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

        • TerminationTime (datetime) --

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

        • Status (string) --

          Current status of the player session.

          Possible player session statuses include the following:

          • RESERVED – The player session request has been received, but the player has not yet connected to the server process and/or been validated.

          • ACTIVE – The player has been validated by the server process and is currently connected.

          • COMPLETED – The player connection has been dropped.

          • TIMEDOUT – A player session request was received, but the player did not connect and/or was not validated within the time-out limit (60 seconds).

        • IpAddress (string) --

          Game session IP address. All player sessions reference the game session location.

        • Port (integer) --

          Port number for the game session. To connect to a Amazon GameLift server process, an app needs both the IP address and port number.

        • PlayerData (string) --

          Developer-defined information related to a player. Amazon GameLift does not use this data, so it can be formatted as needed for use in the game.

    • NextToken (string) --

      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.

DescribeScalingPolicies (updated) Link ¶
Changes (response)
{'ScalingPolicies': {'MetricName': {'QueueDepth', 'WaitTime'}}}

Retrieves all scaling policies applied to a fleet.

To get a fleet's scaling policies, specify the fleet ID. You can filter this request by policy status, such as to retrieve only active scaling policies. Use the pagination parameters to retrieve results as a set of sequential pages. If successful, set of ScalingPolicy objects is returned for the fleet.

See also: AWS API Documentation

Request Syntax

client.describe_scaling_policies(
    FleetId='string',
    StatusFilter='ACTIVE'|'UPDATE_REQUESTED'|'UPDATING'|'DELETE_REQUESTED'|'DELETING'|'DELETED'|'ERROR',
    Limit=123,
    NextToken='string'
)
type FleetId

string

param FleetId

[REQUIRED]

Unique identifier for a fleet to retrieve scaling policies for.

type StatusFilter

string

param StatusFilter

Scaling policy status to filter results on. A scaling policy is only in force when in an ACTIVE status.

  • ACTIVE – The scaling policy is currently in force.

  • UPDATEREQUESTED – A request to update the scaling policy has been received.

  • UPDATING – A change is being made to the scaling policy.

  • DELETEREQUESTED – A request to delete the scaling policy has been received.

  • DELETING – The scaling policy is being deleted.

  • DELETED – The scaling policy has been deleted.

  • ERROR – An error occurred in creating the policy. It should be removed and recreated.

type Limit

integer

param Limit

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

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 specify the start of the result set, do not specify a value.

rtype

dict

returns

Response Syntax

{
    'ScalingPolicies': [
        {
            'FleetId': 'string',
            'Name': 'string',
            'Status': 'ACTIVE'|'UPDATE_REQUESTED'|'UPDATING'|'DELETE_REQUESTED'|'DELETING'|'DELETED'|'ERROR',
            'ScalingAdjustment': 123,
            'ScalingAdjustmentType': 'ChangeInCapacity'|'ExactCapacity'|'PercentChangeInCapacity',
            'ComparisonOperator': 'GreaterThanOrEqualToThreshold'|'GreaterThanThreshold'|'LessThanThreshold'|'LessThanOrEqualToThreshold',
            'Threshold': 123.0,
            'EvaluationPeriods': 123,
            'MetricName': 'ActivatingGameSessions'|'ActiveGameSessions'|'ActiveInstances'|'AvailablePlayerSessions'|'CurrentPlayerSessions'|'IdleInstances'|'QueueDepth'|'WaitTime'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    Represents the returned data in response to a request action.

    • ScalingPolicies (list) --

      Collection of objects containing the scaling policies matching the request.

      • (dict) --

        Rule that controls how a fleet is scaled. Scaling policies are uniquely identified by the combination of name and fleet ID.

        • FleetId (string) --

          Unique identifier for a fleet that is associated with this scaling policy.

        • Name (string) --

          Descriptive label that is associated with a scaling policy. Policy names do not need to be unique.

        • Status (string) --

          Current status of the scaling policy. The scaling policy is only in force when in an ACTIVE status.

          • ACTIVE – The scaling policy is currently in force.

          • UPDATE_REQUESTED – A request to update the scaling policy has been received.

          • UPDATING – A change is being made to the scaling policy.

          • DELETE_REQUESTED – A request to delete the scaling policy has been received.

          • DELETING – The scaling policy is being deleted.

          • DELETED – The scaling policy has been deleted.

          • ERROR – An error occurred in creating the policy. It should be removed and recreated.

        • ScalingAdjustment (integer) --

          Amount of adjustment to make, based on the scaling adjustment type.

        • ScalingAdjustmentType (string) --

          Type of adjustment to make to a fleet's instance count (see FleetCapacity ):

          • ChangeInCapacity – add (or subtract) the scaling adjustment value from the current instance count. Positive values scale up while negative values scale down.

          • ExactCapacity – set the instance count to the scaling adjustment value.

          • PercentChangeInCapacity – increase or reduce the current instance count by the scaling adjustment, read as a percentage. Positive values scale up while negative values scale down.

        • ComparisonOperator (string) --

          Comparison operator to use when measuring a metric against the threshold value.

        • Threshold (float) --

          Metric value used to trigger a scaling event.

        • EvaluationPeriods (integer) --

          Length of time (in minutes) the metric must be at or beyond the threshold before a scaling event is triggered.

        • MetricName (string) --

          Name of the Amazon GameLift-defined metric that is used to trigger an adjustment.

          • ActivatingGameSessions – number of game sessions in the process of being created (game session status = ACTIVATING ).

          • ActiveGameSessions – number of game sessions currently running (game session status = ACTIVE ).

          • CurrentPlayerSessions – number of active or reserved player sessions (player session status = ACTIVE or RESERVED ).

          • AvailablePlayerSessions – number of player session slots currently available in active game sessions across the fleet, calculated by subtracting a game session's current player session count from its maximum player session count. This number does include game sessions that are not currently accepting players (game session PlayerSessionCreationPolicy = DENY_ALL ).

          • ActiveInstances – number of instances currently running a game session.

          • IdleInstances – number of instances not currently running a game session.

    • NextToken (string) --

      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.

ListAliases (updated) Link ¶
Changes (response)
{'Aliases': {'AliasArn': 'string'}}

Retrieves a collection of alias records for this AWS account. You can filter the result set by alias name and/or routing strategy type. Use the pagination parameters to retrieve results in sequential pages.

Note

Aliases are not listed in any particular order.

See also: AWS API Documentation

Request Syntax

client.list_aliases(
    RoutingStrategyType='SIMPLE'|'TERMINAL',
    Name='string',
    Limit=123,
    NextToken='string'
)
type RoutingStrategyType

string

param RoutingStrategyType

Type of routing to filter results on. Use this parameter to retrieve only aliases of a certain type. To retrieve all aliases, leave this parameter empty.

Possible routing types include the following:

  • SIMPLE – The alias resolves to one specific fleet. Use this type when routing to active fleets.

  • TERMINAL – The alias does not resolve to a fleet but instead can be used to display a message to the user. A terminal alias throws a TerminalRoutingStrategyException with the RoutingStrategy message embedded.

type Name

string

param Name

Descriptive label that is associated with an alias. Alias names do not need to be unique.

type Limit

integer

param Limit

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

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 specify the start of the result set, do not specify a value.

rtype

dict

returns

Response Syntax

{
    'Aliases': [
        {
            'AliasId': 'string',
            'Name': 'string',
            'AliasArn': 'string',
            'Description': 'string',
            'RoutingStrategy': {
                'Type': 'SIMPLE'|'TERMINAL',
                'FleetId': 'string',
                'Message': 'string'
            },
            'CreationTime': datetime(2015, 1, 1),
            'LastUpdatedTime': datetime(2015, 1, 1)
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    Represents the returned data in response to a request action.

    • Aliases (list) --

      Collection of alias records that match the list request.

      • (dict) --

        Properties describing a fleet alias.

        Alias-related operations include:

        • CreateAlias

        • ListAliases

        • DescribeAlias

        • UpdateAlias

        • DeleteAlias

        • AliasId (string) --

          Unique identifier for an alias; alias IDs are unique within a region.

        • Name (string) --

          Descriptive label that is associated with an alias. Alias names do not need to be unique.

        • AliasArn (string) --

          Unique identifier for an alias; alias ARNs are unique across all regions.

        • Description (string) --

          Human-readable description of an alias.

        • RoutingStrategy (dict) --

          Alias configuration for the alias, including routing type and settings.

          • Type (string) --

            Type of routing strategy.

            Possible routing types include the following:

            • SIMPLE – The alias resolves to one specific fleet. Use this type when routing to active fleets.

            • TERMINAL – The alias does not resolve to a fleet but instead can be used to display a message to the user. A terminal alias throws a TerminalRoutingStrategyException with the RoutingStrategy message embedded.

          • FleetId (string) --

            Unique identifier for a fleet that the alias points to.

          • Message (string) --

            Message text to be used with a terminal routing strategy.

        • CreationTime (datetime) --

          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) --

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

    • NextToken (string) --

      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.

PutScalingPolicy (updated) Link ¶
Changes (request)
{'MetricName': {'QueueDepth', 'WaitTime'}}

Creates or updates a scaling policy for a fleet. An active scaling policy prompts Amazon GameLift to track a certain metric for a fleet and automatically change the fleet's capacity in specific circumstances. Each scaling policy contains one rule statement. Fleets can have multiple scaling policies in force simultaneously.

A scaling policy rule statement has the following structure:

If [MetricName] is [ComparisonOperator] [Threshold] for [EvaluationPeriods] minutes, then [ScalingAdjustmentType] to/by [ScalingAdjustment] .

For example, this policy: "If the number of idle instances exceeds 20 for more than 15 minutes, then reduce the fleet capacity by 10 instances" could be implemented as the following rule statement:

If [IdleInstances] is [GreaterThanOrEqualToThreshold] [20] for [15] minutes, then [ChangeInCapacity] by [-10].

To create or update a scaling policy, specify a unique combination of name and fleet ID, and set the rule values. All parameters for this action are required. If successful, the policy name is returned. Scaling policies cannot be suspended or made inactive. To stop enforcing a scaling policy, call DeleteScalingPolicy.

See also: AWS API Documentation

Request Syntax

client.put_scaling_policy(
    Name='string',
    FleetId='string',
    ScalingAdjustment=123,
    ScalingAdjustmentType='ChangeInCapacity'|'ExactCapacity'|'PercentChangeInCapacity',
    Threshold=123.0,
    ComparisonOperator='GreaterThanOrEqualToThreshold'|'GreaterThanThreshold'|'LessThanThreshold'|'LessThanOrEqualToThreshold',
    EvaluationPeriods=123,
    MetricName='ActivatingGameSessions'|'ActiveGameSessions'|'ActiveInstances'|'AvailablePlayerSessions'|'CurrentPlayerSessions'|'IdleInstances'|'QueueDepth'|'WaitTime'
)
type Name

string

param Name

[REQUIRED]

Descriptive label that is associated with a scaling policy. Policy names do not need to be unique. A fleet can have only one scaling policy with the same name.

type FleetId

string

param FleetId

[REQUIRED]

Unique identifier for a fleet to apply this policy to.

type ScalingAdjustment

integer

param ScalingAdjustment

[REQUIRED]

Amount of adjustment to make, based on the scaling adjustment type.

type ScalingAdjustmentType

string

param ScalingAdjustmentType

[REQUIRED]

Type of adjustment to make to a fleet's instance count (see FleetCapacity ):

  • ChangeInCapacity – add (or subtract) the scaling adjustment value from the current instance count. Positive values scale up while negative values scale down.

  • ExactCapacity – set the instance count to the scaling adjustment value.

  • PercentChangeInCapacity – increase or reduce the current instance count by the scaling adjustment, read as a percentage. Positive values scale up while negative values scale down; for example, a value of "-10" scales the fleet down by 10%.

type Threshold

float

param Threshold

[REQUIRED]

Metric value used to trigger a scaling event.

type ComparisonOperator

string

param ComparisonOperator

[REQUIRED]

Comparison operator to use when measuring the metric against the threshold value.

type EvaluationPeriods

integer

param EvaluationPeriods

[REQUIRED]

Length of time (in minutes) the metric must be at or beyond the threshold before a scaling event is triggered.

type MetricName

string

param MetricName

[REQUIRED]

Name of the Amazon GameLift-defined metric that is used to trigger an adjustment.

  • ActivatingGameSessions – number of game sessions in the process of being created (game session status = ACTIVATING ).

  • ActiveGameSessions – number of game sessions currently running (game session status = ACTIVE ).

  • CurrentPlayerSessions – number of active or reserved player sessions (player session status = ACTIVE or RESERVED ).

  • AvailablePlayerSessions – number of player session slots currently available in active game sessions across the fleet, calculated by subtracting a game session's current player session count from its maximum player session count. This number includes game sessions that are not currently accepting players (game session PlayerSessionCreationPolicy = DENY_ALL ).

  • ActiveInstances – number of instances currently running a game session.

  • IdleInstances – number of instances not currently running a game session.

rtype

dict

returns

Response Syntax

{
    'Name': 'string'
}

Response Structure

  • (dict) --

    Represents the returned data in response to a request action.

    • Name (string) --

      Descriptive label that is associated with a scaling policy. Policy names do not need to be unique.

UpdateAlias (updated) Link ¶
Changes (response)
{'Alias': {'AliasArn': 'string'}}

Updates properties for a fleet alias. To update properties, specify the alias ID to be updated and provide the information to be changed. To reassign an alias to another fleet, provide an updated routing strategy. If successful, the updated alias record is returned.

See also: AWS API Documentation

Request Syntax

client.update_alias(
    AliasId='string',
    Name='string',
    Description='string',
    RoutingStrategy={
        'Type': 'SIMPLE'|'TERMINAL',
        'FleetId': 'string',
        'Message': 'string'
    }
)
type AliasId

string

param AliasId

[REQUIRED]

Unique identifier for a fleet alias. Specify the alias you want to update.

type Name

string

param Name

Descriptive label that is associated with an alias. Alias names do not need to be unique.

type Description

string

param Description

Human-readable description of an alias.

type RoutingStrategy

dict

param RoutingStrategy

Object that specifies the fleet and routing type to use for the alias.

  • Type (string) --

    Type of routing strategy.

    Possible routing types include the following:

    • SIMPLE – The alias resolves to one specific fleet. Use this type when routing to active fleets.

    • TERMINAL – The alias does not resolve to a fleet but instead can be used to display a message to the user. A terminal alias throws a TerminalRoutingStrategyException with the RoutingStrategy message embedded.

  • FleetId (string) --

    Unique identifier for a fleet that the alias points to.

  • Message (string) --

    Message text to be used with a terminal routing strategy.

rtype

dict

returns

Response Syntax

{
    'Alias': {
        'AliasId': 'string',
        'Name': 'string',
        'AliasArn': 'string',
        'Description': 'string',
        'RoutingStrategy': {
            'Type': 'SIMPLE'|'TERMINAL',
            'FleetId': 'string',
            'Message': 'string'
        },
        'CreationTime': datetime(2015, 1, 1),
        'LastUpdatedTime': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    Represents the returned data in response to a request action.

    • Alias (dict) --

      Object that contains the updated alias configuration.

      • AliasId (string) --

        Unique identifier for an alias; alias IDs are unique within a region.

      • Name (string) --

        Descriptive label that is associated with an alias. Alias names do not need to be unique.

      • AliasArn (string) --

        Unique identifier for an alias; alias ARNs are unique across all regions.

      • Description (string) --

        Human-readable description of an alias.

      • RoutingStrategy (dict) --

        Alias configuration for the alias, including routing type and settings.

        • Type (string) --

          Type of routing strategy.

          Possible routing types include the following:

          • SIMPLE – The alias resolves to one specific fleet. Use this type when routing to active fleets.

          • TERMINAL – The alias does not resolve to a fleet but instead can be used to display a message to the user. A terminal alias throws a TerminalRoutingStrategyException with the RoutingStrategy message embedded.

        • FleetId (string) --

          Unique identifier for a fleet that the alias points to.

        • Message (string) --

          Message text to be used with a terminal routing strategy.

      • CreationTime (datetime) --

        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) --

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