describeGameServer method
This operation is used with the Amazon GameLift FleetIQ solution and game server groups.
Retrieves information for a registered game server. Information includes game server status, health check info, and the instance that the game server is running on.
To retrieve game server information, specify the game server ID. If successful, the requested game server object is returned.
Learn more
Related operations
- RegisterGameServer
- ListGameServers
- ClaimGameServer
- DescribeGameServer
- UpdateGameServer
- DeregisterGameServer
May throw InvalidRequestException. May throw NotFoundException. May throw UnauthorizedException. May throw InternalServiceException.
Parameter gameServerGroupName
:
A unique identifier for the game server group where the game server is
running. Use either the GameServerGroup name or ARN value.
Parameter gameServerId
:
A custom string that uniquely identifies the game server information to be
retrieved.
Implementation
Future<DescribeGameServerOutput> describeGameServer({
required String gameServerGroupName,
required String gameServerId,
}) async {
ArgumentError.checkNotNull(gameServerGroupName, 'gameServerGroupName');
_s.validateStringLength(
'gameServerGroupName',
gameServerGroupName,
1,
256,
isRequired: true,
);
ArgumentError.checkNotNull(gameServerId, 'gameServerId');
_s.validateStringLength(
'gameServerId',
gameServerId,
3,
128,
isRequired: true,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'GameLift.DescribeGameServer'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'GameServerGroupName': gameServerGroupName,
'GameServerId': gameServerId,
},
);
return DescribeGameServerOutput.fromJson(jsonResponse.body);
}