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
1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 | |