create_matchmaking_configuration
¶
create_matchmaking_configuration(
*,
config_overrides: Optional[GameLiftClientConfig] = None,
name: Optional[MatchmakingIdStringModel] = None,
description: Optional[NonZeroAndMaxString] = None,
game_session_queue_arns: Optional[QueueArnsList] = None,
request_timeout_seconds: Optional[MatchmakingRequestTimeoutInteger] = None,
acceptance_timeout_seconds: Optional[MatchmakingAcceptanceTimeoutInteger] = None,
acceptance_required: Optional[BooleanModel] = None,
rule_set_name: Optional[MatchmakingRuleSetName] = None,
notification_target: Optional[SnsArnStringModel] = None,
additional_player_count: Optional[WholeNumber] = None,
custom_event_data: Optional[CustomEventData] = None,
game_properties: Optional[GamePropertyList] = None,
game_session_data: Optional[GameSessionData] = None,
backfill_mode: Optional[BackfillMode] = None,
flex_match_mode: Optional[FlexMatchMode] = None,
tags: Optional[TagList] = None,
) -> CreateMatchmakingConfigurationOutput
This API works with the following fleet types: EC2, Anywhere, Container
Defines a new matchmaking configuration for use with FlexMatch. Whether you are using FlexMatch with Amazon GameLift Servers hosting or as a standalone matchmaking service, the matchmaking configuration sets out rules for matching players and forming teams. If you're also using Amazon GameLift Servers hosting, it defines how to start game sessions for each match. Your matchmaking system can use multiple configurations to handle different game scenarios. All matchmaking requests identify the matchmaking configuration to use and provide player attributes consistent with that configuration.
To create a matchmaking configuration, you must provide the following: configuration name and FlexMatch mode (with or without Amazon GameLift Servers hosting); a rule set that specifies how to evaluate players and find acceptable matches; whether player acceptance is required; and the maximum time allowed for a matchmaking attempt. When using FlexMatch with Amazon GameLift Servers hosting, you also need to identify the game session queue to use when starting a game session for the match.
In addition, you must set up an Amazon Simple Notification Service topic to receive matchmaking notifications. Provide the topic ARN in the matchmaking configuration.
Learn more
Set up FlexMatch event notification
Parameters:
-
name(Optional[MatchmakingIdStringModel], default:None) –A unique identifier for the matchmaking configuration. This name is used to identify the configuration associated with a matchmaking request or ticket.
-
description(Optional[NonZeroAndMaxString], default:None) –A human-readable description of the matchmaking configuration.
-
game_session_queue_arns(Optional[QueueArnsList], default:None) –The Amazon Resource Name (ARN) that is assigned to a Amazon GameLift Servers game session queue resource and uniquely identifies it. ARNs are unique across all Regions. Format is
arn:aws:gamelift:. Queues can be located in any Region. Queues are used to start new Amazon GameLift Servers-hosted game sessions for matches that are created with this matchmaking configuration. A matchmaking configuration supports only one queue; if you specify more than one ARN, the request fails with an::gamesessionqueue/ InvalidRequestException. IfFlexMatchModeis set toSTANDALONE, do not set this parameter. -
request_timeout_seconds(Optional[MatchmakingRequestTimeoutInteger], default:None) –The 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.
-
acceptance_timeout_seconds(Optional[MatchmakingAcceptanceTimeoutInteger], default:None) –The length of time (in seconds) to wait for players to accept a proposed match, if acceptance is required.
-
acceptance_required(Optional[BooleanModel], default:None) –A 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. With this option enabled, matchmaking tickets use the statusREQUIRES_ACCEPTANCEto indicate when a completed potential match is waiting for player acceptance. -
rule_set_name(Optional[MatchmakingRuleSetName], default:None) –A unique identifier for the matchmaking rule set to use with this configuration. You can use either the rule set name or ARN value. A matchmaking configuration can only use rule sets that are defined in the same Region.
-
notification_target(Optional[SnsArnStringModel], default:None) –An SNS topic ARN that is set up to receive matchmaking notifications. See Setting up notifications for matchmaking for more information.
-
additional_player_count(Optional[WholeNumber], default:None) –The 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. This parameter is not used if
FlexMatchModeis set toSTANDALONE. -
custom_event_data(Optional[CustomEventData], default:None) –Information to be added to all events related to this matchmaking configuration.
-
game_properties(Optional[GamePropertyList], default:None) –A set of key-value pairs that can store custom data in a game session. For example:
{"Key": "difficulty", "Value": "novice"}. This information is added to the newGameSessionobject that is created for a successful match. This parameter is not used ifFlexMatchModeis set toSTANDALONE.-
Avoid using periods (".") in property keys if you plan to search for game sessions by properties. Property keys containing periods cannot be searched and will be filtered out from search results due to search index limitations.
-
If you use SearchGameSessions API, there is a limit of 500 game property keys across all game sessions and all fleets per region. If the limit is exceeded, there will potentially be game session entries missing from SearchGameSessions API results.
-
-
game_session_data(Optional[GameSessionData], default:None) –A set of custom game session properties, formatted as a single string value. This data is passed to a game server process with a request to start a new game session. For more information, see Start a game session. This information is added to the new
GameSessionobject that is created for a successful match. This parameter is not used ifFlexMatchModeis set toSTANDALONE. -
backfill_mode(Optional[BackfillMode], default:None) –The method used to backfill game sessions that are created with this matchmaking configuration. Specify
MANUALwhen your game manages backfill requests manually or does not use the match backfill feature. SpecifyAUTOMATICto have Amazon GameLift Servers create a backfill request whenever a game session has one or more open slots. Learn more about manual and automatic backfill in Backfill Existing Games with FlexMatch. Automatic backfill is not available whenFlexMatchModeis set toSTANDALONE. -
flex_match_mode(Optional[FlexMatchMode], default:None) –Indicates whether this matchmaking configuration is being used with Amazon GameLift Servers hosting or as a standalone matchmaking solution.
-
STANDALONE - FlexMatch forms matches and returns match information, including players and team assignments, in a MatchmakingSucceeded event.
-
WITH_QUEUE - FlexMatch forms matches and uses the specified Amazon GameLift Servers queue to start a game session for the match.
-
-
tags(Optional[TagList], default:None) –A list of labels to assign to the new matchmaking configuration resource. Tags are developer-defined key-value pairs. Tagging Amazon Web Services resources is useful for resource management, access management and cost allocation. For more information, see Tagging Amazon Web Services Resources in the Amazon Web Services General Reference.
Raises:
-
InternalServiceException–The service encountered an unrecoverable internal failure while processing the request. Clients can retry such requests immediately or after a waiting period.
-
InvalidRequestException–One or more parameter values in the request are invalid. Correct the invalid parameter values before retrying.
-
LimitExceededException–The requested operation would cause the resource to exceed the allowed service limit. Resolve the issue before retrying.
-
NotFoundException–The requested resource was not found. The resource was either not created yet or deleted.
-
TaggingFailedException–The requested tagging operation did not succeed. This may be due to invalid tag format or the maximum tag limit may have been exceeded. Resolve the issue before retrying.
-
UnsupportedRegionException–The requested operation is not supported in the Region specified.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_gamelift/_services/game_lift.py
1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 | |