Copyright | (c) 2013-2018 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Language | Haskell2010 |
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.
Player acceptance -- In each configuration, you have the option to require that all players accept participation in a proposed match. To enable this feature, set AcceptanceRequired to true and specify a time limit for player acceptance. Players have the option to accept or reject a proposed match, and a match does not move ahead to game session placement unless all matched players accept.
Matchmaking status notification -- 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 (see Setting up Notifications for Matchmaking ). Since notifications promise only "best effort" delivery, we recommend calling DescribeMatchmaking
if no notifications are received within 30 seconds.
Operations related to match configurations and rule sets include:
CreateMatchmakingConfiguration
DescribeMatchmakingConfigurations
UpdateMatchmakingConfiguration
DeleteMatchmakingConfiguration
CreateMatchmakingRuleSet
DescribeMatchmakingRuleSets
ValidateMatchmakingRuleSet
Synopsis
- createMatchmakingConfiguration :: Text -> Natural -> Bool -> Text -> CreateMatchmakingConfiguration
- data CreateMatchmakingConfiguration
- cmcGameProperties :: Lens' CreateMatchmakingConfiguration [GameProperty]
- cmcAcceptanceTimeoutSeconds :: Lens' CreateMatchmakingConfiguration (Maybe Natural)
- cmcNotificationTarget :: Lens' CreateMatchmakingConfiguration (Maybe Text)
- cmcCustomEventData :: Lens' CreateMatchmakingConfiguration (Maybe Text)
- cmcGameSessionData :: Lens' CreateMatchmakingConfiguration (Maybe Text)
- cmcDescription :: Lens' CreateMatchmakingConfiguration (Maybe Text)
- cmcAdditionalPlayerCount :: Lens' CreateMatchmakingConfiguration (Maybe Natural)
- cmcName :: Lens' CreateMatchmakingConfiguration Text
- cmcGameSessionQueueARNs :: Lens' CreateMatchmakingConfiguration [Text]
- cmcRequestTimeoutSeconds :: Lens' CreateMatchmakingConfiguration Natural
- cmcAcceptanceRequired :: Lens' CreateMatchmakingConfiguration Bool
- cmcRuleSetName :: Lens' CreateMatchmakingConfiguration Text
- createMatchmakingConfigurationResponse :: Int -> CreateMatchmakingConfigurationResponse
- data CreateMatchmakingConfigurationResponse
- cmcrsConfiguration :: Lens' CreateMatchmakingConfigurationResponse (Maybe MatchmakingConfiguration)
- cmcrsResponseStatus :: Lens' CreateMatchmakingConfigurationResponse Int
Creating a Request
createMatchmakingConfiguration Source #
:: Text | |
-> Natural | |
-> Bool | |
-> Text | |
-> CreateMatchmakingConfiguration |
Creates a value of CreateMatchmakingConfiguration
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
cmcGameProperties
- Set of custom properties for a game session, formatted as key:value pairs. These properties are passed to a game server process in theGameSession
object with a request to start a new game session (see Start a Game Session ). This information is added to the newGameSession
object that is created for a successful match.cmcAcceptanceTimeoutSeconds
- 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.cmcNotificationTarget
- SNS topic ARN that is set up to receive matchmaking notifications.cmcCustomEventData
- Information to attached to all events related to the matchmaking configuration.cmcGameSessionData
- Set of custom game session properties, formatted as a single string value. This data is passed to a game server process in theGameSession
object with a request to start a new game session (see Start a Game Session ). This information is added to the newGameSession
object that is created for a successful match.cmcDescription
- Meaningful description of the matchmaking configuration.cmcAdditionalPlayerCount
- 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.cmcName
- Unique identifier for a matchmaking configuration. This name is used to identify the configuration associated with a matchmaking request or ticket.cmcGameSessionQueueARNs
- Amazon Resource Name (ARN ) that is assigned to a game session queue and uniquely identifies it. Format isarn:aws:gamelift:region::fleet/fleet-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912
. These queues are used when placing game sessions for matches that are created with this matchmaking configuration. Queues can be located in any region.cmcRequestTimeoutSeconds
- Maximum duration, in seconds, that a matchmaking ticket can remain in process before timing out. Requests that time out can be resubmitted as needed.cmcAcceptanceRequired
- Flag that determines whether or not a match that was created with this configuration must be accepted by the matched players. To require acceptance, set to TRUE.cmcRuleSetName
- 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.
data CreateMatchmakingConfiguration Source #
Represents the input for a request action.
See: createMatchmakingConfiguration
smart constructor.
Instances
Request Lenses
cmcGameProperties :: Lens' CreateMatchmakingConfiguration [GameProperty] Source #
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.
cmcAcceptanceTimeoutSeconds :: Lens' CreateMatchmakingConfiguration (Maybe Natural) Source #
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.
cmcNotificationTarget :: Lens' CreateMatchmakingConfiguration (Maybe Text) Source #
SNS topic ARN that is set up to receive matchmaking notifications.
cmcCustomEventData :: Lens' CreateMatchmakingConfiguration (Maybe Text) Source #
Information to attached to all events related to the matchmaking configuration.
cmcGameSessionData :: Lens' CreateMatchmakingConfiguration (Maybe Text) Source #
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.
cmcDescription :: Lens' CreateMatchmakingConfiguration (Maybe Text) Source #
Meaningful description of the matchmaking configuration.
cmcAdditionalPlayerCount :: Lens' CreateMatchmakingConfiguration (Maybe Natural) Source #
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.
cmcName :: Lens' CreateMatchmakingConfiguration Text Source #
Unique identifier for a matchmaking configuration. This name is used to identify the configuration associated with a matchmaking request or ticket.
cmcGameSessionQueueARNs :: Lens' CreateMatchmakingConfiguration [Text] Source #
Amazon Resource Name (ARN ) that is assigned to a game session queue and uniquely identifies it. Format is arn:aws:gamelift:region::fleet/fleet-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912
. These queues are used when placing game sessions for matches that are created with this matchmaking configuration. Queues can be located in any region.
cmcRequestTimeoutSeconds :: Lens' CreateMatchmakingConfiguration Natural Source #
Maximum duration, in seconds, that a matchmaking ticket can remain in process before timing out. Requests that time out can be resubmitted as needed.
cmcAcceptanceRequired :: Lens' CreateMatchmakingConfiguration Bool Source #
Flag that determines whether or not a match that was created with this configuration must be accepted by the matched players. To require acceptance, set to TRUE.
cmcRuleSetName :: Lens' CreateMatchmakingConfiguration Text Source #
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.
Destructuring the Response
createMatchmakingConfigurationResponse Source #
Creates a value of CreateMatchmakingConfigurationResponse
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
cmcrsConfiguration
- Object that describes the newly created matchmaking configuration.cmcrsResponseStatus
- -- | The response status code.
data CreateMatchmakingConfigurationResponse Source #
Represents the returned data in response to a request action.
See: createMatchmakingConfigurationResponse
smart constructor.
Instances
Response Lenses
cmcrsConfiguration :: Lens' CreateMatchmakingConfigurationResponse (Maybe MatchmakingConfiguration) Source #
Object that describes the newly created matchmaking configuration.
cmcrsResponseStatus :: Lens' CreateMatchmakingConfigurationResponse Int Source #
- - | The response status code.