updateGameSessionQueue method
This API works with the following fleet types: EC2, Anywhere, Container
Updates the configuration of a game session queue, which determines how the queue processes new game session requests. To update settings, specify the queue name to be updated and provide the new settings. When updating destinations, provide a complete list of destinations.
Learn more
May throw InternalServiceException.
May throw InvalidRequestException.
May throw NotFoundException.
May throw UnauthorizedException.
Parameter name :
A descriptive label that is associated with game session queue. Queue
names must be unique within each Region. You can use either the queue ID
or ARN value.
Parameter customEventData :
Information to be added to all events that are related to this game
session queue.
Parameter destinations :
A list of fleets and/or fleet aliases that can be used to fulfill game
session placement requests in the queue. Destinations are identified by
either a fleet ARN or a fleet alias ARN, and are listed in order of
placement preference. When updating this list, provide a complete list of
destinations.
Parameter filterConfiguration :
A list of locations where a queue is allowed to place new game sessions.
Locations are specified in the form of Amazon Web Services Region codes,
such as us-west-2. If this parameter is not set, game
sessions can be placed in any queue location. To remove an existing filter
configuration, pass in an empty set.
Parameter notificationTarget :
An SNS topic ARN that is set up to receive game session placement
notifications. See
Setting up notifications for game session placement.
Parameter playerLatencyPolicies :
A set of policies that enforce a sliding cap on player latency when
processing game sessions placement requests. Use multiple policies to
gradually relax the cap over time if Amazon GameLift Servers can't make a
placement. Policies are evaluated in order starting with the lowest
maximum latency value. When updating policies, provide a complete
collection of policies.
Parameter priorityConfiguration :
Custom settings to use when prioritizing destinations and locations for
game session placements. This configuration replaces the FleetIQ default
prioritization process. Priority types that are not explicitly named will
be automatically applied at the end of the prioritization process. To
remove an existing priority configuration, pass in an empty set.
Parameter timeoutInSeconds :
The 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.
Implementation
Future<UpdateGameSessionQueueOutput> updateGameSessionQueue({
required String name,
String? customEventData,
List<GameSessionQueueDestination>? destinations,
FilterConfiguration? filterConfiguration,
String? notificationTarget,
List<PlayerLatencyPolicy>? playerLatencyPolicies,
PriorityConfiguration? priorityConfiguration,
int? timeoutInSeconds,
}) async {
_s.validateNumRange(
'timeoutInSeconds',
timeoutInSeconds,
0,
1152921504606846976,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'GameLift.UpdateGameSessionQueue'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'Name': name,
if (customEventData != null) 'CustomEventData': customEventData,
if (destinations != null) 'Destinations': destinations,
if (filterConfiguration != null)
'FilterConfiguration': filterConfiguration,
if (notificationTarget != null)
'NotificationTarget': notificationTarget,
if (playerLatencyPolicies != null)
'PlayerLatencyPolicies': playerLatencyPolicies,
if (priorityConfiguration != null)
'PriorityConfiguration': priorityConfiguration,
if (timeoutInSeconds != null) 'TimeoutInSeconds': timeoutInSeconds,
},
);
return UpdateGameSessionQueueOutput.fromJson(jsonResponse.body);
}