listScripts method
This API works with the following fleet types: EC2
Retrieves script records for all Realtime scripts that are associated with the Amazon Web Services account in use.
Learn more
Amazon GameLift Servers Amazon GameLift Servers Realtime
Related actions
May throw InternalServiceException.
May throw InvalidRequestException.
May throw UnauthorizedException.
Parameter limit :
The maximum number of results to return. Use this parameter with
NextToken to get results as a set of sequential pages.
Parameter nextToken :
A token that indicates the start of the next sequential page of results.
Use the token that is returned with a previous call to this operation. To
start at the beginning of the result set, do not specify a value.
Implementation
Future<ListScriptsOutput> listScripts({
int? limit,
String? nextToken,
}) async {
_s.validateNumRange(
'limit',
limit,
1,
1152921504606846976,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'GameLift.ListScripts'
};
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 ListScriptsOutput.fromJson(jsonResponse.body);
}