Amazon GameLift

2019/07/09 - Amazon GameLift - 3 updated api methods

Changes  Update gamelift client to latest version

CreateMatchmakingConfiguration (updated) Link ¶
Changes (request, response)
Request
{'BackfillMode': 'AUTOMATIC | MANUAL'}
Response
{'Configuration': {'BackfillMode': 'AUTOMATIC | MANUAL'}}

Defines a new matchmaking configuration for use with FlexMatch. A matchmaking configuration sets out guidelines for matching players and getting the matches into games. You can set up multiple matchmaking configurations to handle the scenarios needed for your game. Each matchmaking ticket ( StartMatchmaking or StartMatchBackfill) specifies a configuration for the match and provides player attributes to support the configuration being used.

To create a matchmaking configuration, at a minimum you must specify the following: configuration name; a rule set that governs how to evaluate players and find acceptable matches; a game session queue to use when placing a new game session for the match; and the maximum time allowed for a matchmaking attempt.

There are two ways to track the progress of matchmaking tickets: (1) polling ticket status with DescribeMatchmaking; or (2) receiving notifications with Amazon Simple Notification Service (SNS). To use notifications, you first need to set up an SNS topic to receive the notifications, and provide the topic ARN in the matchmaking configuration. Since notifications promise only "best effort" delivery, we recommend calling DescribeMatchmaking if no notifications are received within 30 seconds.

Learn more

Design a FlexMatch Matchmaker

Setting up Notifications for Matchmaking

Related operations

  • CreateMatchmakingConfiguration

  • DescribeMatchmakingConfigurations

  • UpdateMatchmakingConfiguration

  • DeleteMatchmakingConfiguration

  • CreateMatchmakingRuleSet

  • DescribeMatchmakingRuleSets

  • ValidateMatchmakingRuleSet

  • DeleteMatchmakingRuleSet

See also: AWS API Documentation

Request Syntax

client.create_matchmaking_configuration(
    Name='string',
    Description='string',
    GameSessionQueueArns=[
        'string',
    ],
    RequestTimeoutSeconds=123,
    AcceptanceTimeoutSeconds=123,
    AcceptanceRequired=True|False,
    RuleSetName='string',
    NotificationTarget='string',
    AdditionalPlayerCount=123,
    CustomEventData='string',
    GameProperties=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ],
    GameSessionData='string',
    BackfillMode='AUTOMATIC'|'MANUAL'
)
type Name:

string

param Name:

[REQUIRED]

Unique identifier for a matchmaking configuration. This name is used to identify the configuration associated with a matchmaking request or ticket.

type Description:

string

param Description:

Meaningful description of the matchmaking configuration.

type GameSessionQueueArns:

list

param GameSessionQueueArns:

[REQUIRED]

Amazon Resource Name ( ARN) that is assigned to a game session queue and uniquely identifies it. Format is arn:aws:gamelift:<region>:<aws account>:gamesessionqueue/<queue name>. These queues are used when placing game sessions for matches that are created with this matchmaking configuration. Queues can be located in any region.

  • (string) --

type RequestTimeoutSeconds:

integer

param RequestTimeoutSeconds:

[REQUIRED]

Maximum duration, in seconds, that a matchmaking ticket can remain in process before timing out. Requests that fail due to timing out can be resubmitted as needed.

type AcceptanceTimeoutSeconds:

integer

param AcceptanceTimeoutSeconds:

Length of time (in seconds) to wait for players to accept a proposed match. If any player rejects the match or fails to accept before the timeout, the ticket continues to look for an acceptable match.

type AcceptanceRequired:

boolean

param AcceptanceRequired:

[REQUIRED]

Flag that determines whether a match that was created with this configuration must be accepted by the matched players. To require acceptance, set to TRUE.

type RuleSetName:

string

param RuleSetName:

[REQUIRED]

Unique identifier for a matchmaking rule set to use with this configuration. A matchmaking configuration can only use rule sets that are defined in the same region.

type NotificationTarget:

string

param NotificationTarget:

SNS topic ARN that is set up to receive matchmaking notifications.

type AdditionalPlayerCount:

integer

param AdditionalPlayerCount:

Number of player slots in a match to keep open for future players. For example, if the configuration's rule set specifies a match for a single 12-person team, and the additional player count is set to 2, only 10 players are selected for the match.

type CustomEventData:

string

param CustomEventData:

Information to be added to all events related to this matchmaking configuration.

type GameProperties:

list

param GameProperties:

Set of custom properties for a game session, formatted as key:value pairs. These properties are passed to a game server process in the GameSession object with a request to start a new game session (see Start a Game Session). This information is added to the new GameSession object that is created for a successful match.

  • (dict) --

    Set of key-value pairs that contain information about a game session. When included in a game session request, these properties communicate details to be used when setting up the new game session, such as to specify a game mode, level, or map. Game properties are passed to the game server process when initiating a new game session; the server process uses the properties as appropriate. For more information, see the Amazon GameLift Developer Guide.

    • Key (string) -- [REQUIRED]

      Game property identifier.

    • Value (string) -- [REQUIRED]

      Game property value.

type GameSessionData:

string

param GameSessionData:

Set of custom game session properties, formatted as a single string value. This data is passed to a game server process in the GameSession object with a request to start a new game session (see Start a Game Session). This information is added to the new GameSession object that is created for a successful match.

type BackfillMode:

string

param BackfillMode:

Method used to backfill game sessions created with this matchmaking configuration. Specify MANUAL when your game manages backfill requests manually or does not use the match backfill feature. Specify AUTOMATIC to have GameLift create a StartMatchBackfill request whenever a game session has one or more open slots. Learn more about manual and automatic backfill in Backfill Existing Games with FlexMatch.

rtype:

dict

returns:

Response Syntax

{
    'Configuration': {
        'Name': 'string',
        'Description': 'string',
        'GameSessionQueueArns': [
            'string',
        ],
        'RequestTimeoutSeconds': 123,
        'AcceptanceTimeoutSeconds': 123,
        'AcceptanceRequired': True|False,
        'RuleSetName': 'string',
        'NotificationTarget': 'string',
        'AdditionalPlayerCount': 123,
        'CustomEventData': 'string',
        'CreationTime': datetime(2015, 1, 1),
        'GameProperties': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ],
        'GameSessionData': 'string',
        'BackfillMode': 'AUTOMATIC'|'MANUAL'
    }
}

Response Structure

  • (dict) --

    Represents the returned data in response to a request action.

    • Configuration (dict) --

      Object that describes the newly created matchmaking configuration.

      • Name (string) --

        Unique identifier for a matchmaking configuration. This name is used to identify the configuration associated with a matchmaking request or ticket.

      • Description (string) --

        Descriptive label that is associated with matchmaking configuration.

      • GameSessionQueueArns (list) --

        Amazon Resource Name ( ARN) that is assigned to a game session queue and uniquely identifies it. Format is arn:aws:gamelift:<region>:<aws account>:gamesessionqueue/<queue name>. These queues are used when placing game sessions for matches that are created with this matchmaking configuration. Queues can be located in any region.

        • (string) --

      • RequestTimeoutSeconds (integer) --

        Maximum duration, in seconds, that a matchmaking ticket can remain in process before timing out. Requests that fail due to timing out can be resubmitted as needed.

      • AcceptanceTimeoutSeconds (integer) --

        Length of time (in seconds) to wait for players to accept a proposed match. If any player rejects the match or fails to accept before the timeout, the ticket continues to look for an acceptable match.

      • AcceptanceRequired (boolean) --

        Flag that determines whether a match that was created with this configuration must be accepted by the matched players. To require acceptance, set to TRUE.

      • RuleSetName (string) --

        Unique identifier for a matchmaking rule set to use with this configuration. A matchmaking configuration can only use rule sets that are defined in the same region.

      • NotificationTarget (string) --

        SNS topic ARN that is set up to receive matchmaking notifications.

      • AdditionalPlayerCount (integer) --

        Number of player slots in a match to keep open for future players. For example, if the configuration's rule set specifies a match for a single 12-person team, and the additional player count is set to 2, only 10 players are selected for the match.

      • CustomEventData (string) --

        Information to attach to all events related to the matchmaking configuration.

      • 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").

      • GameProperties (list) --

        Set of custom properties for a game session, formatted as key:value pairs. These properties are passed to a game server process in the GameSession object with a request to start a new game session (see Start a Game Session). This information is added to the new GameSession object that is created for a successful match.

        • (dict) --

          Set of key-value pairs that contain information about a game session. When included in a game session request, these properties communicate details to be used when setting up the new game session, such as to specify a game mode, level, or map. Game properties are passed to the game server process when initiating a new game session; the server process uses the properties as appropriate. For more information, see the Amazon GameLift Developer Guide.

          • Key (string) --

            Game property identifier.

          • Value (string) --

            Game property value.

      • GameSessionData (string) --

        Set of custom game session properties, formatted as a single string value. This data is passed to a game server process in the GameSession object with a request to start a new game session (see Start a Game Session). This information is added to the new GameSession object that is created for a successful match.

      • BackfillMode (string) --

        Method used to backfill game sessions created with this matchmaking configuration. MANUAL indicates that the game makes backfill requests or does not use the match backfill feature. AUTOMATIC indicates that GameLift creates StartMatchBackfill requests whenever a game session has one or more open slots. Learn more about manual and automatic backfill in Backfill Existing Games with FlexMatch.

DescribeMatchmakingConfigurations (updated) Link ¶
Changes (response)
{'Configurations': {'BackfillMode': 'AUTOMATIC | MANUAL'}}

Retrieves the details of FlexMatch matchmaking configurations. With this operation, you have the following options: (1) retrieve all existing configurations, (2) provide the names of one or more configurations to retrieve, or (3) retrieve all configurations that use a specified rule set name. When requesting multiple items, use the pagination parameters to retrieve results as a set of sequential pages. If successful, a configuration is returned for each requested name. When specifying a list of names, only configurations that currently exist are returned.

Learn more

Setting Up FlexMatch Matchmakers

Related operations

  • CreateMatchmakingConfiguration

  • DescribeMatchmakingConfigurations

  • UpdateMatchmakingConfiguration

  • DeleteMatchmakingConfiguration

  • CreateMatchmakingRuleSet

  • DescribeMatchmakingRuleSets

  • ValidateMatchmakingRuleSet

  • DeleteMatchmakingRuleSet

See also: AWS API Documentation

Request Syntax

client.describe_matchmaking_configurations(
    Names=[
        'string',
    ],
    RuleSetName='string',
    Limit=123,
    NextToken='string'
)
type Names:

list

param Names:

Unique identifier for a matchmaking configuration(s) to retrieve. To request all existing configurations, leave this parameter empty.

  • (string) --

type RuleSetName:

string

param RuleSetName:

Unique identifier for a matchmaking rule set. Use this parameter to retrieve all matchmaking configurations that use this rule set.

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 limited to 10.

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

rtype:

dict

returns:

Response Syntax

{
    'Configurations': [
        {
            'Name': 'string',
            'Description': 'string',
            'GameSessionQueueArns': [
                'string',
            ],
            'RequestTimeoutSeconds': 123,
            'AcceptanceTimeoutSeconds': 123,
            'AcceptanceRequired': True|False,
            'RuleSetName': 'string',
            'NotificationTarget': 'string',
            'AdditionalPlayerCount': 123,
            'CustomEventData': 'string',
            'CreationTime': datetime(2015, 1, 1),
            'GameProperties': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ],
            'GameSessionData': 'string',
            'BackfillMode': 'AUTOMATIC'|'MANUAL'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    Represents the returned data in response to a request action.

    • Configurations (list) --

      Collection of requested matchmaking configuration objects.

      • (dict) --

        Guidelines for use with FlexMatch to match players into games. All matchmaking requests must specify a matchmaking configuration.

        • Name (string) --

          Unique identifier for a matchmaking configuration. This name is used to identify the configuration associated with a matchmaking request or ticket.

        • Description (string) --

          Descriptive label that is associated with matchmaking configuration.

        • GameSessionQueueArns (list) --

          Amazon Resource Name ( ARN) that is assigned to a game session queue and uniquely identifies it. Format is arn:aws:gamelift:<region>:<aws account>:gamesessionqueue/<queue name>. These queues are used when placing game sessions for matches that are created with this matchmaking configuration. Queues can be located in any region.

          • (string) --

        • RequestTimeoutSeconds (integer) --

          Maximum duration, in seconds, that a matchmaking ticket can remain in process before timing out. Requests that fail due to timing out can be resubmitted as needed.

        • AcceptanceTimeoutSeconds (integer) --

          Length of time (in seconds) to wait for players to accept a proposed match. If any player rejects the match or fails to accept before the timeout, the ticket continues to look for an acceptable match.

        • AcceptanceRequired (boolean) --

          Flag that determines whether a match that was created with this configuration must be accepted by the matched players. To require acceptance, set to TRUE.

        • RuleSetName (string) --

          Unique identifier for a matchmaking rule set to use with this configuration. A matchmaking configuration can only use rule sets that are defined in the same region.

        • NotificationTarget (string) --

          SNS topic ARN that is set up to receive matchmaking notifications.

        • AdditionalPlayerCount (integer) --

          Number of player slots in a match to keep open for future players. For example, if the configuration's rule set specifies a match for a single 12-person team, and the additional player count is set to 2, only 10 players are selected for the match.

        • CustomEventData (string) --

          Information to attach to all events related to the matchmaking configuration.

        • 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").

        • GameProperties (list) --

          Set of custom properties for a game session, formatted as key:value pairs. These properties are passed to a game server process in the GameSession object with a request to start a new game session (see Start a Game Session). This information is added to the new GameSession object that is created for a successful match.

          • (dict) --

            Set of key-value pairs that contain information about a game session. When included in a game session request, these properties communicate details to be used when setting up the new game session, such as to specify a game mode, level, or map. Game properties are passed to the game server process when initiating a new game session; the server process uses the properties as appropriate. For more information, see the Amazon GameLift Developer Guide.

            • Key (string) --

              Game property identifier.

            • Value (string) --

              Game property value.

        • GameSessionData (string) --

          Set of custom game session properties, formatted as a single string value. This data is passed to a game server process in the GameSession object with a request to start a new game session (see Start a Game Session). This information is added to the new GameSession object that is created for a successful match.

        • BackfillMode (string) --

          Method used to backfill game sessions created with this matchmaking configuration. MANUAL indicates that the game makes backfill requests or does not use the match backfill feature. AUTOMATIC indicates that GameLift creates StartMatchBackfill requests whenever a game session has one or more open slots. Learn more about manual and automatic backfill in Backfill Existing Games with FlexMatch.

    • 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.

UpdateMatchmakingConfiguration (updated) Link ¶
Changes (request, response)
Request
{'BackfillMode': 'AUTOMATIC | MANUAL'}
Response
{'Configuration': {'BackfillMode': 'AUTOMATIC | MANUAL'}}

Updates settings for a FlexMatch matchmaking configuration. These changes affect all matches and game sessions that are created after the update. To update settings, specify the configuration name to be updated and provide the new settings.

Learn more

Design a FlexMatch Matchmaker

Related operations

  • CreateMatchmakingConfiguration

  • DescribeMatchmakingConfigurations

  • UpdateMatchmakingConfiguration

  • DeleteMatchmakingConfiguration

  • CreateMatchmakingRuleSet

  • DescribeMatchmakingRuleSets

  • ValidateMatchmakingRuleSet

  • DeleteMatchmakingRuleSet

See also: AWS API Documentation

Request Syntax

client.update_matchmaking_configuration(
    Name='string',
    Description='string',
    GameSessionQueueArns=[
        'string',
    ],
    RequestTimeoutSeconds=123,
    AcceptanceTimeoutSeconds=123,
    AcceptanceRequired=True|False,
    RuleSetName='string',
    NotificationTarget='string',
    AdditionalPlayerCount=123,
    CustomEventData='string',
    GameProperties=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ],
    GameSessionData='string',
    BackfillMode='AUTOMATIC'|'MANUAL'
)
type Name:

string

param Name:

[REQUIRED]

Unique identifier for a matchmaking configuration to update.

type Description:

string

param Description:

Descriptive label that is associated with matchmaking configuration.

type GameSessionQueueArns:

list

param GameSessionQueueArns:

Amazon Resource Name ( ARN) that is assigned to a game session queue and uniquely identifies it. Format is arn:aws:gamelift:<region>:<aws account>:gamesessionqueue/<queue name>. These queues are used when placing game sessions for matches that are created with this matchmaking configuration. Queues can be located in any region.

  • (string) --

type RequestTimeoutSeconds:

integer

param RequestTimeoutSeconds:

Maximum duration, in seconds, that a matchmaking ticket can remain in process before timing out. Requests that fail due to timing out can be resubmitted as needed.

type AcceptanceTimeoutSeconds:

integer

param AcceptanceTimeoutSeconds:

Length of time (in seconds) to wait for players to accept a proposed match. If any player rejects the match or fails to accept before the timeout, the ticket continues to look for an acceptable match.

type AcceptanceRequired:

boolean

param AcceptanceRequired:

Flag that determines whether a match that was created with this configuration must be accepted by the matched players. To require acceptance, set to TRUE.

type RuleSetName:

string

param RuleSetName:

Unique identifier for a matchmaking rule set to use with this configuration. A matchmaking configuration can only use rule sets that are defined in the same region.

type NotificationTarget:

string

param NotificationTarget:

SNS topic ARN that is set up to receive matchmaking notifications. See Setting up Notifications for Matchmaking for more information.

type AdditionalPlayerCount:

integer

param AdditionalPlayerCount:

Number of player slots in a match to keep open for future players. For example, if the configuration's rule set specifies a match for a single 12-person team, and the additional player count is set to 2, only 10 players are selected for the match.

type CustomEventData:

string

param CustomEventData:

Information to add to all events related to the matchmaking configuration.

type GameProperties:

list

param GameProperties:

Set of custom properties for a game session, formatted as key:value pairs. These properties are passed to a game server process in the GameSession object with a request to start a new game session (see Start a Game Session). This information is added to the new GameSession object that is created for a successful match.

  • (dict) --

    Set of key-value pairs that contain information about a game session. When included in a game session request, these properties communicate details to be used when setting up the new game session, such as to specify a game mode, level, or map. Game properties are passed to the game server process when initiating a new game session; the server process uses the properties as appropriate. For more information, see the Amazon GameLift Developer Guide.

    • Key (string) -- [REQUIRED]

      Game property identifier.

    • Value (string) -- [REQUIRED]

      Game property value.

type GameSessionData:

string

param GameSessionData:

Set of custom game session properties, formatted as a single string value. This data is passed to a game server process in the GameSession object with a request to start a new game session (see Start a Game Session). This information is added to the new GameSession object that is created for a successful match.

type BackfillMode:

string

param BackfillMode:

Method used to backfill game sessions created with this matchmaking configuration. Specify MANUAL when your game manages backfill requests manually or does not use the match backfill feature. Specify AUTOMATIC to have GameLift create a StartMatchBackfill request whenever a game session has one or more open slots. Learn more about manual and automatic backfill in Backfill Existing Games with FlexMatch.

rtype:

dict

returns:

Response Syntax

{
    'Configuration': {
        'Name': 'string',
        'Description': 'string',
        'GameSessionQueueArns': [
            'string',
        ],
        'RequestTimeoutSeconds': 123,
        'AcceptanceTimeoutSeconds': 123,
        'AcceptanceRequired': True|False,
        'RuleSetName': 'string',
        'NotificationTarget': 'string',
        'AdditionalPlayerCount': 123,
        'CustomEventData': 'string',
        'CreationTime': datetime(2015, 1, 1),
        'GameProperties': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ],
        'GameSessionData': 'string',
        'BackfillMode': 'AUTOMATIC'|'MANUAL'
    }
}

Response Structure

  • (dict) --

    Represents the returned data in response to a request action.

    • Configuration (dict) --

      Object that describes the updated matchmaking configuration.

      • Name (string) --

        Unique identifier for a matchmaking configuration. This name is used to identify the configuration associated with a matchmaking request or ticket.

      • Description (string) --

        Descriptive label that is associated with matchmaking configuration.

      • GameSessionQueueArns (list) --

        Amazon Resource Name ( ARN) that is assigned to a game session queue and uniquely identifies it. Format is arn:aws:gamelift:<region>:<aws account>:gamesessionqueue/<queue name>. These queues are used when placing game sessions for matches that are created with this matchmaking configuration. Queues can be located in any region.

        • (string) --

      • RequestTimeoutSeconds (integer) --

        Maximum duration, in seconds, that a matchmaking ticket can remain in process before timing out. Requests that fail due to timing out can be resubmitted as needed.

      • AcceptanceTimeoutSeconds (integer) --

        Length of time (in seconds) to wait for players to accept a proposed match. If any player rejects the match or fails to accept before the timeout, the ticket continues to look for an acceptable match.

      • AcceptanceRequired (boolean) --

        Flag that determines whether a match that was created with this configuration must be accepted by the matched players. To require acceptance, set to TRUE.

      • RuleSetName (string) --

        Unique identifier for a matchmaking rule set to use with this configuration. A matchmaking configuration can only use rule sets that are defined in the same region.

      • NotificationTarget (string) --

        SNS topic ARN that is set up to receive matchmaking notifications.

      • AdditionalPlayerCount (integer) --

        Number of player slots in a match to keep open for future players. For example, if the configuration's rule set specifies a match for a single 12-person team, and the additional player count is set to 2, only 10 players are selected for the match.

      • CustomEventData (string) --

        Information to attach to all events related to the matchmaking configuration.

      • 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").

      • GameProperties (list) --

        Set of custom properties for a game session, formatted as key:value pairs. These properties are passed to a game server process in the GameSession object with a request to start a new game session (see Start a Game Session). This information is added to the new GameSession object that is created for a successful match.

        • (dict) --

          Set of key-value pairs that contain information about a game session. When included in a game session request, these properties communicate details to be used when setting up the new game session, such as to specify a game mode, level, or map. Game properties are passed to the game server process when initiating a new game session; the server process uses the properties as appropriate. For more information, see the Amazon GameLift Developer Guide.

          • Key (string) --

            Game property identifier.

          • Value (string) --

            Game property value.

      • GameSessionData (string) --

        Set of custom game session properties, formatted as a single string value. This data is passed to a game server process in the GameSession object with a request to start a new game session (see Start a Game Session). This information is added to the new GameSession object that is created for a successful match.

      • BackfillMode (string) --

        Method used to backfill game sessions created with this matchmaking configuration. MANUAL indicates that the game makes backfill requests or does not use the match backfill feature. AUTOMATIC indicates that GameLift creates StartMatchBackfill requests whenever a game session has one or more open slots. Learn more about manual and automatic backfill in Backfill Existing Games with FlexMatch.