describeGameSessionPlacement method
- required String placementId,
This API works with the following fleet types: EC2, Anywhere, Container
Retrieves information, including current status, about a game session placement request.
To get game session placement details, specify the placement ID.
This operation is not designed to be continually called to track game
session status. This practice can cause you to exceed your API limit,
which results in errors. Instead, you must configure an Amazon Simple
Notification Service (SNS) topic to receive notifications from FlexMatch
or queues. Continuously polling with
DescribeGameSessionPlacement should only be used for games in
development with low game session usage. For a reference implementation of
event-based game session placement tracking, see
Event-based game session placement guidance in the Amazon GameLift
Toolkit.
May throw InternalServiceException.
May throw InvalidRequestException.
May throw NotFoundException.
May throw UnauthorizedException.
Parameter placementId :
A unique identifier for a game session placement to retrieve.
Implementation
Future<DescribeGameSessionPlacementOutput> describeGameSessionPlacement({
required String placementId,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'GameLift.DescribeGameSessionPlacement'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'PlacementId': placementId,
},
);
return DescribeGameSessionPlacementOutput.fromJson(jsonResponse.body);
}