listGameServerGroups method
This operation is used with the Amazon GameLift FleetIQ solution and game server groups.
Retrieves information on all game servers groups that exist in the current AWS account for the selected Region. Use the pagination parameters to retrieve results in a set of sequential segments.
Learn more
Related operations
- CreateGameServerGroup
- ListGameServerGroups
- DescribeGameServerGroup
- UpdateGameServerGroup
- DeleteGameServerGroup
- ResumeGameServerGroup
- SuspendGameServerGroup
- DescribeGameServerInstances
May throw InvalidRequestException. May throw UnauthorizedException. May throw InternalServiceException.
Parameter limit
:
The maximum number of results to return. Use this parameter with
NextToken
to get results as a set of sequential segments.
Parameter nextToken
:
A token that indicates the start of the next sequential segment of
results. Use the token returned with the previous call to this operation.
To start at the beginning of the result set, do not specify a value.
Implementation
Future<ListGameServerGroupsOutput> listGameServerGroups({
int? limit,
String? nextToken,
}) async {
_s.validateNumRange(
'limit',
limit,
1,
1152921504606846976,
);
_s.validateStringLength(
'nextToken',
nextToken,
1,
1024,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'GameLift.ListGameServerGroups'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (limit != null) 'Limit': limit,
if (nextToken != null) 'NextToken': nextToken,
},
);
return ListGameServerGroupsOutput.fromJson(jsonResponse.body);
}