updateGameSessionQueue method
- required String name,
- List<
GameSessionQueueDestination> ? destinations, - List<
PlayerLatencyPolicy> ? playerLatencyPolicies, - int? timeoutInSeconds,
Updates settings for a game session queue, which determines how new game session requests in the queue are processed. 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
Related operations
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 destinations
:
A list of fleets that can be used to fulfill game session placement
requests in the queue. Fleets are identified by either a fleet ARN or a
fleet alias ARN. Destinations are listed in default preference order. When
updating this list, provide a complete list of destinations.
Parameter playerLatencyPolicies
:
A collection of latency policies to apply when processing game sessions
placement requests with player latency information. Multiple policies are
evaluated in order of the maximum latency value, starting with the lowest
latency values. With just one policy, the policy is enforced at the start
of the game session placement for the duration period. With multiple
policies, each policy is enforced consecutively for its duration period.
For example, a queue might enforce a 60-second policy followed by a
120-second policy, and then no policy for the remainder of the placement.
When updating policies, provide a complete collection of policies.
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,
List<GameSessionQueueDestination>? destinations,
List<PlayerLatencyPolicy>? playerLatencyPolicies,
int? timeoutInSeconds,
}) async {
ArgumentError.checkNotNull(name, 'name');
_s.validateStringLength(
'name',
name,
1,
256,
isRequired: true,
);
_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 (destinations != null) 'Destinations': destinations,
if (playerLatencyPolicies != null)
'PlayerLatencyPolicies': playerLatencyPolicies,
if (timeoutInSeconds != null) 'TimeoutInSeconds': timeoutInSeconds,
},
);
return UpdateGameSessionQueueOutput.fromJson(jsonResponse.body);
}